[בקשת תכונה] יכולת להתאים את סדר הגדרות סוג הרשימה

סיכום מבוסס בינה מלאכותית

In a feature request discussion titled ‘[Feature Request] Ability to adjust order of list type settings’, keegan proposed adding a user interface to reorder items in Discourse theme/plugin settings of type: list, noting that manual CSS fixes like flexbox order are currently needed. sam pointed out that a similar reordering control already exists in Discourse Reactions, suggesting it could be adapted for simple lists. j.jaffeux expressed no objection to elevating this logic in the component hierarchy, while pmusaraj confirmed no prior implementation and supported adding it to simple lists. keegan proactively submitted a PR (#15775) based on the emoji-value-list component. pmusaraj praised the contribution, calling it great work. The feature aims to simplify ordering for non-CSS users and improve theme/plugin flexibility.

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 לייקים

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 @j.jaffeux already knows of a control you can use for your particular use case in themes.

7 לייקים

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 לייקים

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

5 לייקים

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

https://github.com/discourse/discourse/pull/15775

11 לייקים

Thanks for adding this feature @keegan, great work!

4 לייקים