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

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

Closed
kmanijak opened this issue Jan 2, 2023 · 0 comments · Fixed by #9251
Closed

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

kmanijak opened this issue Jan 2, 2023 · 0 comments · Fixed by #9251
Assignees
Labels
focus: performance The issue/PR is related to performance. priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. type: dependencies Pull requests that update a dependency file (used by renovate).

Comments

@kmanijak
Copy link
Contributor

kmanijak commented Jan 2, 2023

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

@kmanijak kmanijak added type: dependencies Pull requests that update a dependency file (used by renovate). focus: performance The issue/PR is related to performance. type: cooldown Things that are queued for a cooldown period (assists with planning). priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. and removed type: cooldown Things that are queued for a cooldown period (assists with planning). labels Jan 2, 2023
@kmanijak kmanijak changed the title Remove the dependency on editor-blocks from frontend blocks Remove the dependency on block-editor from frontend blocks Apr 24, 2023
@mikejolley mikejolley self-assigned this Apr 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
focus: performance The issue/PR is related to performance. priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. type: dependencies Pull requests that update a dependency file (used by renovate).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants