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
If a developer has subclassed AbstractMainMenu or AbstractFlatMenu, and modified properties panels, content_panels or settings_panel, as described in the documentation, then these changes won't flow through to the admin pages.
A developer can achieve the same outcome by modifying instead the edit_handler in the subclassed admin views, and to me this is better aligned to SnippetViewSet behaviour and clearer than relying on some different magic within the admin view class.
This wasn't an intentional change on my part, it was missed in the ModelAdmin to Snippet changeover, and the tests didn't pick up change in behaviour.
A side effect of this change, as I see it, is that the properties content_panels and settings_panel are no longer required in the AbstractMainMenu and AbstractFlatMenu classes, which means that we can solve #464.
It is probably worth some discussion to determine if this changed behaviour in 4.0 should be documented, or the change reverted. I'd especially like to hear from any developers who have subclassed AbstractMainMenu or AbstractFlatMenu.
Depending on the agreed course of action, I'm happy to prepare PRs accordingly. Of course, I'm also happy if others want to have a go at the PRs.
It would be good to also fix #488 so that any new documentation is more readily visible.
The text was updated successfully, but these errors were encountered:
In #472, I ended up removing the
wagtailmenus.views.MenuTabbedInterfaceMixin
class, which included code like this:wagtailmenus/wagtailmenus/views.py
Lines 47 to 60 in 2adac82
In the replacement
SnippetViewSet
s, eg.MainMenuAdmin
, I directly coded theedit_handler
as follows:wagtailmenus/wagtailmenus/menuadmin.py
Lines 93 to 97 in 56f98d2
If a developer has subclassed
AbstractMainMenu
orAbstractFlatMenu
, and modified propertiespanels
,content_panels
orsettings_panel
, as described in the documentation, then these changes won't flow through to the admin pages.A developer can achieve the same outcome by modifying instead the
edit_handler
in the subclassed admin views, and to me this is better aligned toSnippetViewSet
behaviour and clearer than relying on some different magic within the admin view class.This wasn't an intentional change on my part, it was missed in the
ModelAdmin
toSnippet
changeover, and the tests didn't pick up change in behaviour.A side effect of this change, as I see it, is that the properties
content_panels
andsettings_panel
are no longer required in theAbstractMainMenu
andAbstractFlatMenu
classes, which means that we can solve #464.It is probably worth some discussion to determine if this changed behaviour in 4.0 should be documented, or the change reverted. I'd especially like to hear from any developers who have subclassed
AbstractMainMenu
orAbstractFlatMenu
.Depending on the agreed course of action, I'm happy to prepare PRs accordingly. Of course, I'm also happy if others want to have a go at the PRs.
It would be good to also fix #488 so that any new documentation is more readily visible.
The text was updated successfully, but these errors were encountered: