-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ordering to menu items #2939
Add ordering to menu items #2939
Conversation
Hey I think it's a good idea but how can the menu be reordered by a user? For example what should I do in my app to put a new entry after the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Genrally I like that feature.
Could we not introduce the ordering feature and moving of menu items in the same commit?
Also I think we should not name the sort value order
but position
instead.
This change allows menu items to be ordered. If the order value is nil the menu item will come at the end of the list.
195dc7a
to
fea32b8
Compare
@tvdeyen Changes made, does that work for you? @kennyadsl I added some comments to explain how the position attribute should be used. In most cases, the value doesn't need to be present and the behavior will be exactly the same as it currently is in Solidus. However, if someone wants to alter the ordering they simply add or change the position attribute to match the order they would like the menu to display. Does that make sense, or do I need further changes? |
@jacobherrington I got how you can add new items but I still don't get how you can change existing (in solidus backend) menu items positions into your own app, maybe it's simpler than what I think but can you please provide a simple example? |
@kennyadsl for example edit: realized I forgot to commit the |
@kennyadsl @tvdeyen please let me know if you have any more thoughts on this one! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thanks.
@kennyadsl I think this feature is more for new tabs instead of for reordering existing ones (that still is possible)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This change allows menu items to be ordered. If the order value is nil
the menu item will come at the end of the list.
After: