Skip to content

Provide ways to extend/customize the Global Styles sidebar #48068

Open
@mmtr

Description

@mmtr

What problem does this address?

Gutenberg does not provide any way to extend/customize the Global Styles sidebar for things like:

  • To display extra help content - text or video. For example maybe an organization has branding guidelines about which colors (styles) are suitable and when they ought to be used.
  • Getting other style variations from some source, i.e. ones that are 'generic' and not linked to a theme.
  • Some kind of revision log.

Plugins developers interested in such extensions are forced to manipulate the DOM (e.g. injecting custom React components inside an element located with a CSS selector). But this is very fragile, since Gutenberg can change the DOM without further notice, breaking these extensions.

What is your proposed solution?

Add standard extension points to the Global Styles sidebar such as SlotFills, hooks, or a programmatic API, so plugin developers can customize it with a more robust mechanism.

Seems that the editor sidebar is currently extensible via SlotFills (#13357), so I guess the Global Styles sidebar can follow the same approach.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.jsonNeeds DecisionNeeds a decision to be actionable or relevant[Feature] ExtensibilityThe ability to extend blocks or the editing experience[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    Status

    Needs discussion

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions