WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.25k stars 4.09k forks source link

Add a filter to control the list of Block Editor preferences #28970

Open aurooba opened 3 years ago

aurooba commented 3 years ago

What problem does this address?

There is no way to control the Block Editor Preferences list at the moment. Ideally, if I wanted to make sure the pre-publish checks were required and no one could turn them off, there's no built-in way to make that happen.

What is your proposed solution?

Ideally there would be a filter like there is one for the editor and other places, that allows removal of certain preferences (or additions through a SlotFill, as well)

mtias commented 1 year ago

This fell through the cracks a bit — @gziolo can we include it in some of the extensibility overviews? Seems like a good step.

gziolo commented 1 year ago

This fell through the cracks a bit — @gziolo can we include it in some of the extensibility overviews? Seems like a good step.

I didn’t find any overview issue that tracks extensibility ideas for the editor. I’ll keep searching, as I’m sure we had one a long time ago. Otherwise, we can start a new one to have a better picture of what issues people submitted.

There is an existing issue that seem to be related to this one: https://github.com/WordPress/gutenberg/issues/25585.

talldan commented 9 months ago

The main things missing seem to be:

So really control over the UI.

I think the API should be there (or mostly there) for controlling the data side of preferences (setting default values and updating values programatically) via the preferences package, though I'm not aware of anyone actively using it.