-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Docs: Extend details about features integration with theme.json
#22622
Conversation
Size Change: +14 B (0%) Total Size: 1.12 MB
ℹ️ View Unchanged
|
0becf23
to
01f3a5d
Compare
@@ -158,66 +166,108 @@ The list of properties that are currently exposed via this method are: | |||
|
|||
### Features | |||
|
|||
This is being implemented, so it's not currently available. | |||
So far, this function is only enabled for the `global` section in `experimental-theme.json`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we add an intro that sums up the general behavior (see). I'm thinking something along these lines:
Via the features
key we allow controlling some editor and block features:
- The features within
global
will override the default editor settings, which plugins still can modify by hooking into theblock_editor_settings
filter in the server. - The features within each block content will override the default block settings, which plugins can still modify by hooking into the
blocks.registerBlockType
filter in the client.
Block settings take precedence over global settings.
For example, if a feature is enabled for a block by default, although the theme disables it at the global level, the block will still have it enabled. If the theme wants to override a block's default, it has to target that particular block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great idea, how do you like 816f31b?
e7ada48
to
816f31b
Compare
d66c8c4
to
18f45d2
Compare
@nosolosw, I rebased this branch, do you think it's good to go now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see this needs rebase, but the contents here are ready to 🚢
Co-authored-by: Andrés <nosolosw@users.noreply.github.com>
2fb751f
to
9cfaabe
Compare
Thank you for rebasing, much appreciated 😍 |
Description
Follow-up for
and depends on#22291.This PR aims to document all the development happening in #22291 and accompanying PRs that try to expose blocks registration to the server.
The goal of these changes is to make it clear what's the order of applying block editor features depending on the place where they were defined when used with the following helper hook: