plone / volto

React-based frontend for the Plone Content Management System
https://demo.plone.org/
MIT License
427 stars 573 forks source link

Replaces filterControlPanelsSchema setting by unwantedControlPanelsFields #4819

Open wesleybl opened 10 months ago

wesleybl commented 10 months ago

filterControlPanelsSchema has been migrated to Controlpanel.jsx and uses the unwantedControlPanelsFields setting. So, if any portal wants to add fields in the Control Panel, it will be necessary to customize only the unwantedControlPanelsFields configuration, instead of customizing the entire filterControlPanelsSchema function.

This is an improvement for #3904

netlify[bot] commented 10 months ago

Deploy Preview for volto ready!

Name Link
Latest commit 81a6aaaddb4ed0247d00d71e3597202e6285733b
Latest deploy log https://app.netlify.com/sites/volto/deploys/646f8a56c85fd50008e4ff7b
Deploy Preview https://deploy-preview-4819--volto.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

cypress[bot] commented 10 months ago

Passing run #5325 ↗︎

0 493 20 0 Flakiness 0

Details:

Replaces filterControlPanelsSchema setting by
Project: Volto Commit: 81a6aaaddb
Status: Passed Duration: 14:56 💡
Started: May 25, 2023 4:21 PM Ended: May 25, 2023 4:36 PM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

wesleybl commented 10 months ago

Removing support for a custom filterControlPanelsSchema function is a breaking change that could only happen in a new major version of volto.

@davisagli but isn't the master branch for Volto 17, which is a breaking release? Can't we keep filterControlPanelsSchema only on branch 16? If we don't remove it now, when will we remove it? How will we remember to remove it in the future?

davisagli commented 10 months ago

@wesleybl Yeah, we can make this change for 17. In general my bias is to keep backwards compatibility if it's easy. But that does inflate the number of options over time, and in this particular case I doubt the filterControlPanelsSchema setting is being used much. Any preference, @sneridagh?

sneridagh commented 8 months ago

@wesleybl I'm with @davisagli in this one... agreed that it cleans up the implementation, but that is hardly a reason for introducing a breaking if there is not delivering a clear direct advantage over the previous one.