Skip to content

Framework: Extract notices state from editor module #6388

@aduth

Description

@aduth

Notices are not an editor-specific feature, yet the current notices state lives within editor. Before plugins start integrating more with this functionality, we should consider whether to extract it, either to its own module (like viewport), or to components, or perhaps even to a new concept of "data-bound components".

See also #5316 which highlights some issues with the viewport approach of independent data modules exporting their own components, as it can result in circular dependencies between components and the individual module.

Proposal options:

  • Create new notices folder, which creates its own data state
    • Either exposes a data-bound component which editor uses to render, or this component lives elswhere
  • Add new notices component to components directory, which bundles its own data state

Open questions:

Do we need concepts of scoped notices? If a plugin adds a notice and intends for it to be shown in the editor, how does this scale out to a more general solution? Is this something we need to address now?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Backwards CompatibilityIssues or PRs that impact backwards compatability[Type] EnhancementA suggestion for improvement.[Type] Plugin InteroperabilityIncompatibilities between a specific plugin and the block editor. Close with workaround notes.[Type] TaskIssues or PRs that have been broken down into an individual action to take

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions