Skip to content
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

Block Editor: Allow a theme to override global defaults for editor features #22655

Closed
gziolo opened this issue May 27, 2020 · 0 comments · Fixed by #24275
Closed

Block Editor: Allow a theme to override global defaults for editor features #22655

gziolo opened this issue May 27, 2020 · 0 comments · Fixed by #24275
Assignees
Labels
[Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Package] Block editor /packages/block-editor [Status] In Progress Tracking issues with work in progress [Type] New API New API to be used by plugin developers or package users.

Comments

@gziolo
Copy link
Member

gziolo commented May 27, 2020

Description

Related to #22622.

Follow up for #22291 where initial handling for block editor features were introduced.

Usage:

// edit.js

const Edit = ( props ) => {
    const isDisabled = ! useEditorFeature( 'typography.dropCap' );
    // ...
};

At the moment this feature can be only controlled through the defaults set for the Gutenberg plugin in lib/exeperimental-default-theme.json file in the features section of the global settings. On the block level, it can be controlled through supports.

The idea is to take it to the next level – take & merge data from the global subtree of the experimental-theme.json with the existing data in lib/exeperimental-default-theme.json.

The full proposal from @nosolosw in #22291 (review).

@gziolo gziolo added [Package] Block editor /packages/block-editor [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Type] New API New API to be used by plugin developers or package users. labels May 27, 2020
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Package] Block editor /packages/block-editor [Status] In Progress Tracking issues with work in progress [Type] New API New API to be used by plugin developers or package users.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants