You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The admin menu as defined in backend_configuration.rb correctly defines object for the first menu level but relies on views for submenu.
This leads to cumbersome development, either requiring too much effort or facilitating the introduction of bugs (e.g. see #3783).
Describe the solution you'd like
By using object for submenu items as well we could make the whole menu generated and let each menu item just define when it needs to be visible/active etc. and let the first level of menus just ask their collection of sub-items for such things.
So for example if we wanted to know if the settings menu should be visible we could just do settings_menu_item.items.any?(&:visible?), or to know if it should be considered "active" we would do settings_menu_item.items.any?(&:active?), etc.
Describe alternatives you've considered
The alternative would be to keep the current situation and manually fix everything, waiting for the next bug to be introduced 🐛
Is your feature request related to a problem? Please describe.
The admin menu as defined in backend_configuration.rb correctly defines object for the first menu level but relies on views for submenu.
This leads to cumbersome development, either requiring too much effort or facilitating the introduction of bugs (e.g. see #3783).
Describe the solution you'd like
By using object for submenu items as well we could make the whole menu generated and let each menu item just define when it needs to be visible/active etc. and let the first level of menus just ask their collection of sub-items for such things.
So for example if we wanted to know if the settings menu should be visible we could just do
settings_menu_item.items.any?(&:visible?)
, or to know if it should be considered "active" we would dosettings_menu_item.items.any?(&:active?)
, etc.Describe alternatives you've considered
The alternative would be to keep the current situation and manually fix everything, waiting for the next bug to be introduced 🐛
Additional context
#3783
The text was updated successfully, but these errors were encountered: