Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Remove the dependency on block-editor from frontend blocks #8071

@kmanijak

Description

@kmanijak

Problem statement

As described in this PR, there are three hooks:

  • useBorderProps
  • useColorProps
  • useSpacingProps
    with the dependency on @wordpress/block-editor that has implicit dependency on @wordpress/components. That should be avoided on the frontend, otherwise those dependencies are externalised and loaded on the pages that use blocks with that dependency (+200kB components.min.js and +170kB editor-block.min.js).

Solution

Remove the dependency on the hooks from the frontend code.

Goal

Improve the performance, by decreasing the file transfer on the pages using blocks with those dependencies

pdToLP-fF-p2

Metadata

Metadata

Assignees

Labels

focus: performanceThe issue/PR is related to performance.priority: highThe issue/PR is high priority—it affects lots of customers substantially, but not critically.type: dependenciesPull requests that update a dependency file (used by renovate).

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions