Skip to content
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

Documentation - add clarity on how to correctly customise edit_handler (publish/comments) #10117

Closed
lb- opened this issue Feb 19, 2023 · 6 comments

Comments

@lb-
Copy link
Member

lb- commented Feb 19, 2023

Pertinent section of the Wagtail docs

https://docs.wagtail.org/en/latest/advanced_topics/customisation/page_editing_interface.html#customising-the-tabbed-interface

Details

Due to the removal of using SettingsPanel in the default set of panels for page editing there is now a bit of a documentation gap in whether this panel is needed with custom edit_handler behaviour.

To ensure that the editing interface can be used for publishing and commenting the CommentPanel and the PublishPanel are now required OR the SettingsPanel must be included (but this will now be an empty panel).

Ideally this nuance should be clarified in the section linked above. Maybe with an example of both ways of doing things.

Additional context

I've just done a quick test with Wagtail 4.2 and a minimal extension to the HomePage installed from the startup guide. I can confirm @laymonage's comments above, that either the Page.settings_panel, or the CommentPanel and PublishingPanel in another panel, are required in the Page edit_handler to get the commenting and full publishing capability.

Now that the Settings tab has vanished, a developer customising the edit_handler and following the new instructions will end up omitting both of the above, and hence lose the commenting and publishing panel functionality. I can understand @laymonage's description that these panels have to be in the edit_handler somewhere, but should this detail be exposed to the developer, or another mechanism found to slip these panels in?
Once decided, the documentation can be adjusted accordingly, but I believe this particular change doesn't accurately describe the behaviour in 4.2.
Originally posted by @dkirkham in #9813 (comment)

@lb-
Copy link
Member Author

lb- commented Feb 19, 2023

@dkirkham / @laymonage - I have split out the discussion to a new issue from #9813 - feel free to add any additional context or suggestions.

I'll flag this as 5.0 as it may be good to resolve this and even backport the docs to 4.2 branch as it does seem like this could cause confusion in the docs on main now and also the docs in 4.2. branch.

@dkirkham
Copy link

Thanks @lb-,

I've loaded up my test code as a gist, for reference. To use, start a fresh Wagtail project (as per the Getting Started guide), replace home/models.py with the gist, do the migrations and runserver. There are a couple of lines hashed out which allows a few scenarios to be tried easily.

@gasman gasman modified the milestones: 5.0, 5.1 May 2, 2023
@gasman gasman modified the milestones: 5.1, 5.2 Jul 18, 2023
@thibaudcolas thibaudcolas modified the milestones: 5.2, 5.3 Oct 18, 2023
@gasman gasman modified the milestones: 6.0, 6.1 Jan 23, 2024
@lb-
Copy link
Member Author

lb- commented Mar 16, 2024

It's possible that this PR #11614 has resolved this issue.

@dkirkham
Copy link

I think it has, although the second example doesn't have the Promote panel. I would have thought that would be desirable, but maybe it isn't necessary.

@gasman
Copy link
Collaborator

gasman commented Apr 25, 2024

I think it has, although the second example doesn't have the Promote panel. I would have thought that would be desirable, but maybe it isn't necessary.

Agreed it can't hurt to add that... Added in #11893.

@gasman
Copy link
Collaborator

gasman commented Apr 25, 2024

Completed in #11614 and #11893

@gasman gasman closed this as completed Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants