[PLIP-Advisories] [Plone development workspace] #10359: Convert control panels to use z3c.form

Change notifications for Plone PLIPs on Trac. plone-plip-advisories at lists.plone.org
Fri Jul 5 10:41:21 UTC 2013


#10359: Convert control panels to use z3c.form
-----------------------+----------------------
  Reporter:  hannosch  |      Owner:
      Type:  PLIP      |     Status:  reopened
  Priority:  minor     |  Milestone:  5.0
 Component:  General   |    Version:
Resolution:            |   Keywords:
-----------------------+----------------------

Comment (by timo):

 Since this PLIP will now hopefully become part of Plone 5, I would like to
 re-evaluate some of the assumptions and design decisions I made during the
 implementation.

 1) My approach to sync the portal properties (old-way) with the new p.a
 .registry-based settings (new way) should be simplified by just ignoring
 the old properties in Plone 5 and write a migration step. This will reduce
 the complexity of the code and more important remove the likelihood of
 strange side effects (in case the two settings are out of sync). What I
 need to do for this is I have to find all occurences of code that amends
 the portal properties and change it. The question is: how and when do we
 mark those as deprecated? Is it sufficient to do this in a Plone 4.3.x
 release? When should I start with that? After the PLIP has been fully
 merged?

 2) So far I used zope.interface to define the control panels:

 https://github.com/plone/plone.app.controlpanel/blob/plip10359-z3cform/plone/app/controlpanel/profiles/default/registry.xml

 This works fine, the default values just need to be defined at the
 interface, otherwise they are all None, which isn't what we want. Though,
 the old way allowed integrators/developer to look at the gs profile and
 just copy and override certain values (e.g. go to
 profiles/default/propertiestool copy & paste it into your profile and
 amend say sitemapDepth).

 If we use zope.interface, this isn't possible because the registry.xml
 looks like the example above. To solve this we could either define the
 values in registry.xml directly (see
 https://pypi.python.org/pypi/plone.app.registry#creating-records) or we do
 this in Products.CMFPlone (this approach would not make sense if we merge
 p.a.contenttypes into P.CMFPlone later).

 If we plan to take the first option (zope.interface) we should make sure
 that it is well documented and always up-to-date how to override those
 values. It is always easy to amend settings TTW and then export the
 registry.xml though.

-- 
Ticket URL: <http://dev.plone.org/ticket/10359#comment:31>
Plone development workspace <https://dev.plone.org/>
Plone Enterprise Content Management System


More information about the PLIP-Advisories mailing list