plone / Products.CMFPlone

The core of the Plone content management system
https://plone.org
GNU General Public License v2.0
243 stars 186 forks source link

Plone 6.0 Classic-UI: where can I set default pattern options #3837

Open fredvd opened 11 months ago

fredvd commented 11 months ago

In Plone 5.2 the Resource Registriese control panel had a tab 'pattern options' where you could set default options for the mockup patterns. This tab is gone in Plone 6.0

Is there any other location/way how I can set these options in code or in the theme? Then we should add them as documentation.

In this particular instance I wanted to set the closing options of data-pat-modal so it doesn't close with a click outside the modal. (related to debugging https://github.com/plone/mockup/issues/1340)

pattern-options
fredvd commented 11 months ago

To answer my own question partly: plone.patternoptions and IPatternsSettings still exist and are still prefilled with the same default values as in Plone 5.2 But you can now only edit them through the configuration registry and added the dict directly.

thet commented 11 months ago

Really, we lost that control panel.

We have to re-create it. But instead of doing a react-pattern based controlpanel which lives in Mockup I'd create it like the others in Products.CMFPlone.controlpanel.

I did look a bit into getting it done via schema generated control panels others but didn't come far yet. plone.base.interfaces.patterns.IPatternSettings doesn't define a schema.

fredvd commented 11 months ago

It doesnt have to take a lot of time to recreate the control panel as we only need to expose a list/dictionairy from the registry. In an add'ons we created this control panel registration with a direct link to the registry edit:

https://github.com/collective/collective.classifiers/blob/b27d5a8fe2f5276bba6132370d42faf5e9c0ffc1/collective/classifiers/profiles/default/controlpanel.xml#L1-L17

There is another more generic issue with this solution: the dictionary editing modal is currently broken, delete section or edit section closes the modal without doing anything. (sorry for the Dutch screenshot)

dict editing modal
petschki commented 6 months ago

Resourceregistry controlpanel is a pure template form, not a z3c schema form. See https://github.com/plone/Products.CMFPlone/blob/master/Products/CMFPlone/controlpanel/browser/resourceregistry.pt .

I personally don't like the configuration registry modals because they look somehow broken.

Why not add a tab to the current RR controlpanel with a tabular listing of patternoptions like it was in Plone 5 ?