Products.cmfplone: PLIP: Registry Improvements

Created on 24 Mar 2016  路  13Comments  路  Source: plone/Products.CMFPlone

Proposer : vangheem

Seconder : Ramon Navarro Bosch

Abstract

Right now in the Configuration Registry control panel, you are able to view and edit records; however, a user often wants to be able to do more than just that.

Features this plip proposes:

  • ability to split registry.xml files into multiple files
  • provide import/export in control panel
  • provide ability to delete record in control panel
  • provide ability to add new record in control panel
  • the https://github.com/plone/Products.CMFPlone/issues/1406 plip could possibly be merged into this

Motivation

We have made it to the point where we are using the registry for almost everything configuration wise in plone; however, managing the insane number of configuration records is cumbersome. These features make it much easier for an admin and add-on developer to manage it all.

Assumptions

Proposal & Implementation

Multiple files feature:

  • provide registry folder
  • any xml file in folder will then be imported as a registry xml file

Import/Export, Add new record:

  • Use existing GS infrastructure
  • Use tabs in Configuration Registry to allow user to choose Records | Import | Export | Add new record
  • Only support simple field types for new records

Delete record:

  • add delete button in record entry listing
  • only allow users to delete records that are not a part of an interface to prevent users from potentially breaking things when forInterface is used
  • sufficient warning message to user before deleting

Deliverables

There is already a PR: https://github.com/plone/plone.app.registry/pull/15

Risks

  • Allowing users to delete records is potentially risky and could cause people to hose their sites
UX Site Admin in-progress feature (plip) docs

Most helpful comment

Merged

All 13 comments

maybe the delete action should be available to Manager role only.

@hvelarde well I think the entire thing is for Manager only anyway :)

@vangheem about splitting the registry.xml, we have some ideas in https://github.com/plone/Products.CMFPlone/issues/1137

At FWT meeting we talked about this PLIP. I'am responsible 'champion' in the name of the FWT. Voting happens at next FWT meeting in 2 weeks.
From a first view on it:

  • it needs a seconder,
  • it needs documentation,

+1 in general. Though, I'm sceptical about the registry xml split. I see two options:

1) We define which setting goes into which registry.xml file: this is what we had before and that kind of sucked because you always had to remember or look up which settings goes into what flie. This is also hard to check when an xml file is uploaded.

2) We leave that to the developer/integrator. This might lead to even more confusion, if people upload an xml file and the setting is already defined elsewhere. People will start to add settings randomly to different xml files and we will end up in a huge mess...

I agree that one xml file is not optimal. Though, I think this is still better than the two options I outlined. Maybe I'm missing an obvious solution to this though...

@tisto a warning could be shown when importing registry xml files and the same key is imported twice?

Ping. The ability to add registry entries TTW is awesome. Can we get this going again?

This PLIP was accepted and implementation is in progress. I'am assigned from FWT side to help out and review it once finished.

Current state from my POV:

  • we have a PR at plone/plone.app.registry#15 (I'll follow up over there)
  • documentation is missing/ needs an update

Sorry that we did not look at this. In order to make it work again I:

  • rebased
  • fixed author problem (amend)
  • fixed changelog
  • pushed version to 1.6.0 (and branched already 1.5.x away, set coredev 5.0 to it)

read for merge (again)

I did a quick review (big one not needed IMO):

  • tests for 5.1 :green_heart:
  • code style :+1:
  • UI :+1:
  • manual test: :+1:
  • documentation :-1: is still missing, any. UI wise it is self-explaining, just the profiles structure needs a section in the docs.

Overall ready for merge. Some documentation would be a nice to have before merge.

Merged

As the docs are on p.a.registry itself rather than docs.plone.org do we need/want to pull those docs to docs.plone.org if they are not? @plone/documentation-team

the docs.plone.org definitely need some user facing info for the registry

Was this page helpful?
0 / 5 - 0 ratings