-
Notifications
You must be signed in to change notification settings - Fork 90
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
Recalculate menu order on insertion or deletion #275
Conversation
Hi there @schlessera Any news on this PR being merged? Thanks |
Hi @petruchek, Yes, I'd like to move this forward. However, we'll need Behat tests for this first. Can you add tests to assert that the menu IDs are correctly modified? Let me know if you need assistance with writing the tests! |
@schlessera, thank you for your response. Could you please guide me a little, please? I'm assuming I need to modify features/menu-item.feature. Is this correct? Thank you for your time (very much) |
Yes, that's the one to edit.
Please create a separate scenario. In the existing tests, you can already see how the position is being represented in the output lists, so it should be relatively straight-forward to copy one of the existing scenarios and adapt it to test this PR. |
Hi there @schlessera, Is it something that still makes sense doing? Please let me know. |
Hey @petruchek, |
6652091
to
3a3b2a4
Compare
Thanks for the PR, @petruchek ! |
New private method called reorder_menu_items() which is being called after any menu item is being deleted or new menu item is being added and it has explicitly set position.
Issue reported and briefly discussed here: #493