Skip to content

Let the data-view block declare its own editor styles #304

@priethor

Description

@priethor

The data-view block doesn't declare its styles in block.json, so WP won't carry them into the editor iframe on its own. We work around that in Screen.php, reading build/editor.css off disk and inlining it into the iframe's style list. It works, but there's a FIXME on it: we're hand-rolling what WP already does for any block that registers its own assets.

Proposed solution: give the block an editorStyle in block.json so WP loads it into the iframe, then drop the manual inlining in Screen.php.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: canvasBlock editor canvas, blocks, inspector, covers, icons, and document chrome.type: code qualityRefactors, cleanup, tests, and internal structure.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions