[Feature Request] Ability to adjust order of list type settings

Background

Adding a list type settings to a Discourse theme/plugin is nice and convenient with:

custom_setting:
  type: list
  list_type: simple
  description:
    en: "my description."

However, I’ve often found that whenever I create these types of settings, at one point or another I end up needing to adjust the order of the items. I usually either use flexbox’s order property to resolve this or manually edit the settings.

I was reminded about this with @Nick_Chomey comment on the Custom Header Links theme.

Feature Request

I think it might be convenient to add the ability to adjust the order of all settings of type: list as it could be beneficial for quick adjustments to the order and helpful for those without much CSS knowledge.

This is not an urgent feature request by any means, but I think it could be helpful nonetheless.

Here’s what I was thinking it might look like:

8 Likes

I think we already had a similar control used in Discourse Reactions:

Not sure if we should add this to simple list or not, but a lot of the internals are already there.

Perhaps @joffreyjaffeux already knows of a control you can use for your particular use case in themes.

7 Likes

No objection from me to move this logic higher in the component hierarchy.

@pmusaraj I can’t recall did you already do something similar?

5 Likes

No, I haven’t done something similar to this, adding this to regular simple lists would be nice.

5 Likes

Was eager to get this feature available, so I created a PR for it based off of the emoji-value-list:

11 Likes

Thanks for adding this feature @keegan, great work!

4 Likes