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

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

Open
fredvd opened this issue Sep 4, 2023 · 4 comments
Open

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

fredvd opened this issue Sep 4, 2023 · 4 comments

Comments

@fredvd
Copy link
Sponsor Member

fredvd commented Sep 4, 2023

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 plone/mockup#1340)

pattern-options
@fredvd
Copy link
Sponsor Member Author

fredvd commented Sep 4, 2023

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
Copy link
Member

thet commented Sep 7, 2023

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
Copy link
Sponsor Member Author

fredvd commented Sep 7, 2023

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
Copy link
Member

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

3 participants