-
-
Notifications
You must be signed in to change notification settings - Fork 197
Adds docs for creating custom control panel #1909
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
Conversation
Thanks for submitting your first pull request! You are awesome! 🤗
If you haven't done so already, read Plone's Code of Conduct and Contribute to documentation, as this will greatly help the review process.
Welcome to the Plone community! 🎉
...nsha0-control-panel
- Sentence case headings
- Add content to empty headings
- Use appropriate list type, either bulleted or definition
- Indent lists 4 spaces for consistency and visually spotting syntax issues
- Use `{file}` markup for files, directories, and file paths
- Emphasize lines in code block as needed
@stevepiercy
stevepiercy
left a comment
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.
I completed my review by making thoroughly commented commits.
I have a couple of questions for clarification.
This also needs a technical peer review before getting merged.
Thank you for pulling all the pieces together. This is awesome.
stevepiercy
commented
Mar 15, 2025
@plone/classicui-team can I get a review from y'all? This will establish the basis for both Classic UI and Volto.
stevepiercy
commented
Mar 16, 2025
@sneridagh I couldn't find an example of how to create a control panel in Volto. Does a clear how to guide exist anywhere?
We should include that in this page, or if it exists, add a link to that resource.
rohnsha0
commented
Mar 18, 2025
@sneridagh I couldn't find an example of how to create a control panel in Volto. Does a clear how to guide exist anywhere?
-> https://training.plone.org/mastering-plone/registry.html#add-a-custom-control-panel
@stevepiercy the above link is for addon, but it works the same way for other use cases too!
stevepiercy
commented
Mar 18, 2025
@rohnsha0 would you please adapt and add that content to this PR? Then developers can go to a single page to add a control panel, regardless of frontend. FTW!
stevepiercy
commented
Mar 23, 2025
@rohnsha0 I chatted with @sneridagh about this PR, and he said that as long as the control panel uses the basic HTML5 form controls, then they can be mapped to mapped to those in the Storybook. If the control panel does complex things, such as XHR or tabbed interfaces, then that would require significant effort.
rohnsha0
commented
Mar 24, 2025
@rohnsha0 I chatted with @sneridagh about this PR, and he said that as long as the control panel uses the basic HTML5 form controls, then they can be mapped to mapped to those in the Storybook. If the control panel does complex things, such as XHR or tabbed interfaces, then that would require significant effort.
Is this something for Volto. Right?
stevepiercy
commented
Mar 24, 2025
@rohnsha0 yes.
@stevepiercy
stevepiercy
left a comment
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.
A few changes based on response.
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.
Is this also part of the manual process only or both manual and plonecli?
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.
@stevepiercy this needs to be added in any way you use to create the controlpanel, as these include the fields (to be grouped) that needs to be shown in the settings (of the controlpanel)
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.
OK, please see other comments regarding the flow and structure of this chapter. I think we're close to finished with those enhancements.
Co-authored-by: Steve Piercy <web@stevepiercy.com>
@stevepiercy
stevepiercy
left a comment
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.
@rohnsha0 note that the page contents contains six subheadings, but the manual process introduction contains only four items.
Screenshot 2025年04月06日 at 12 43 21 PM
Screenshot 2025年04月06日 at 12 44 28 PM
In the current structure, it appears that they are part of the manual process only, but were omitted from the list of items in its introduction.
But you are saying that they apply for both the plonecli and manual processes. As such the last two items should have one fewer # to appear at the correct level.
If that is correct, then I would also insert a statement that transitions the reader, and add that to the main introduction as well. I'll add other suggestions in another round of review.
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.
OK, please see other comments regarding the flow and structure of this chapter. I think we're close to finished with those enhancements.
Co-authored-by: Steve Piercy <web@stevepiercy.com>
... a syntax highlighter language
@stevepiercy
stevepiercy
left a comment
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.
These comments remain unresolved and need to be addressed before merging. The content is good and ready, but its flow between sections could use some improvement. Thank you!
rohnsha0
commented
Apr 16, 2025
@rohnsha0 note that the page contents contains six subheadings, but the manual process introduction contains only four items.
Screenshot 2025年04月06日 at 12 43 21 PM
Screenshot 2025年04月06日 at 12 44 28 PM
In the current structure, it appears that they are part of the manual process only, but were omitted from the list of items in its introduction.
* [Access your settings in code](https://plone6--1909.org.readthedocs.build/developer-guide/create-control-panel.html#access-your-settings-in-code) * [Register a control panel](https://plone6--1909.org.readthedocs.build/developer-guide/create-control-panel.html#register-a-control-panel)But you are saying that they apply for both the plonecli and manual processes. As such the last two items should have one fewer
#to appear at the correct level.If that is correct, then I would also insert a statement that transitions the reader, and add that to the main introduction as well. I'll add other suggestions in another round of review.
@stevepiercy the registering part is solely for manual procedure as the plonecli already register the configs. However, accessing the code part can be pulled out of the manual process. and ig one # can be removed
rohnsha0
commented
Apr 16, 2025
@stevepiercy ig now the flow of the article looks much better
MrTango
commented
Apr 18, 2025
I have the feeling this went i bit in the wrong direction.
I'll have a more detailed look into it, but for now, just a view points.
As far as i know, the control panel created by plonecli should work out of the box in Volto.
This is the case for all simple control panels, where the fields are defined in the zope.schema and the default is used. If there is more customization involved like custom templates in classic UI, that's not out of the box, in Volto. But this should not be part of the docs here. Maybe in an advanced chapter, for classic ui and Volto, separately.
Also we have to careful not to duplicate the schema relevant parts here. This is all forms related and forms, schema and fields have there own chapter with details.
Uh oh!
There was an error while loading. Please reload this page.
Fixes #4131
Fixes #1304
See #1882
📚 Documentation preview 📚: https://plone6--1909.org.readthedocs.build/developer-guide/create-control-panel.html