This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 219
Remove assets/js/settings/blocks from sideEffects list #4767
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Aljullu
added
status: needs review
focus: performance
The issue/PR is related to performance.
block: cart
Issues related to the cart block.
block: checkout
Issues related to the checkout block.
block-type: reviews
Issues related to all of the reviews related blocks.
block: filter by price
Issues related to the Filter by Price block.
block: active filters
Issues related to the Active Filters block.
block: mini-cart
Issues related to the Mini-Cart block.
labels
Sep 16, 2021
Size Change: -1.22 kB (0%) Total Size: 1.25 MB
ℹ️ View Unchanged
|
Since this involves a change to the side-effects config, testing will need to be done against a production build ( |
Right, I should have mentioned this. Added a note in the testing instructions. |
senadir
force-pushed
the
update/blocks-settings-side-effects
branch
from
September 21, 2021 13:34
b4eb088
to
f9d4493
Compare
senadir
approved these changes
Sep 21, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebased and tested again and everything working fine! Will merge after tests pass.
github-actions
bot
added
status: ready to merge
and removed
status: needs review
labels
Sep 21, 2021
senadir
force-pushed
the
update/blocks-settings-side-effects
branch
from
September 21, 2021 13:42
f9d4493
to
d62e37b
Compare
senadir
added
the
type: dependencies
Pull requests that update a dependency file (used by renovate).
label
Sep 27, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
block: active filters
Issues related to the Active Filters block.
block: cart
Issues related to the cart block.
block: checkout
Issues related to the checkout block.
block: filter by price
Issues related to the Filter by Price block.
block: mini-cart
Issues related to the Mini-Cart block.
block-type: reviews
Issues related to all of the reviews related blocks.
focus: performance
The issue/PR is related to performance.
type: dependencies
Pull requests that update a dependency file (used by renovate).
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cherry-picks the third commit from #4463.
After some investigation, I noticed that having
./assets/js/settings/blocks/**
listed as scripts with side effects caused several frontend scripts to include thewp-blocks
dependency even if it was not directly used. Affected blocks are:wp-blocks
has several other dependencies, so avoiding it helps in reducing the total downloaded size when rendering those blocks in the frontend.For reference,
./assets/js/settings/blocks/**
was added tosideEffects
in #2042, but I tried to reproduce the issues mentioned there, and I couldn't. In addition, I took a look at the code under/assets/js/settings/blocks/
and I couldn't find anything that would require it being listed as having side effects.Manual Testing
Note: Make sure to test it on a product build (running
npm run build
).Unfortunately, it's difficult to predict the effect this change will have. In theory, any block that imports from
block-settings
might be affected, so I would suggest adding all blocks into a page and verifying they load correctly in the editor and the frontend.Smoke testing the Checkout flow would also be great (validation, payment with some payment methods, etc.).
Performance Impact
A dependency has been removed from several frontend scripts, so it should cause a performance improvement on pages loading those blocks.
Changelog