Repository navigation
Add description, group_id, and icon to @controlpanels - #2086
Conversation
Each control panel now carries the description and icon of its configlet, and the id of its group, which doesn't change with the language.
|
@sneridagh thanks for creating this Pull Request and helping to improve Plone! TL;DR: Finish pushing changes, pass all other checks, then paste a comment: To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically. Happy hacking! |
Documentation build overview
|
|
@jenkins-plone-org please run jobs |
|
@jenkins-plone-org please run jobs |
Added definition for JSON Schema.
|
@jenkins-plone-org please run jobs |
|
@davisagli having this one released would be great! Then I can go with the improvements in the main control panels route, both in Volto and Aurora. |
GET @controlpanelslists the control panels with their title and group only. Each configlet inportal_controlpanelalready carries an icon (itsicon_expr) and can carry a description, but the endpoint drops both, so a frontend has to keep its own icon map by panel id and can't show anything for add-on panels. The group is also only available as a translated title.This adds three fields to each control panel, in the listing and in a single control panel:
description: the configlet's description, translated. Plone's core configlets have none yet, so it is""for them for now.group_id: the configlet's category, such asplone-general, which doesn't change with the language.icon: the configlet's icon as itsicon_exprevaluates, such asclockorshield-check. Plone's configlets use Bootstrap Icons names, and add-on configlets already set theirs.Control panels that don't extend
RegistryConfigletPanelget empty values, so nothing changes for them. No existing field changes.Also:
enumConfigletsin CMFPlone.@idwith an f-string instead of.format.Plone Aurora's site setup page will use the icon and description instead of its own map. A follow-up would add descriptions to the core configlets (CMFPlone, plone.app.dexterity, plone.app.discussion).