-
Notifications
You must be signed in to change notification settings - Fork 798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Story block: remove wp-components frontend dependency #28743
Story block: remove wp-components frontend dependency #28743
Conversation
Are you an Automattician? You can now test your Pull Request on WordPress.com. On your sandbox, run
to get started. More details: p9dueE-5Nn-p2 |
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped. Jetpack plugin:
|
The Boost E2E test failure seems unrelated (it's unrelated code, and the failures are timeouts), but I'm not sure how to validate that. |
Yeah, it's unrelated. p1675373367797419-slack-CBG1CP4EN |
5779309
to
b84fea5
Compare
Rebased after the |
b84fea5
to
9155902
Compare
Finally succeeded after a new rebase. |
9155902
to
ecc8998
Compare
ecc8998
to
16ed134
Compare
@twstokes Is that something someone on your team may be able to test? The Story block is an integral part of the app experience, we'd want to make sure it still works as expected from your end as well. Thank you! |
I tested the proposed changes by creating Story blocks in the WordPress app on both iOS and Android. I encountered several issues within the mobile editor, but the issues also occur in Additionally, I noticed that videos within the Story block generally never load within the web editor. Instead, a loading indicator is displayed indefinitely. This occurs in
|
…ponents-dep-from-story-frontend
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.
This tests well for me! 🚢
The story block frontend currently enqueues
wp-components
, which is an absolutely massive 200KB (compressed) dependency, and which comes with other large dependencies of its own.It does this for two different reasons:
wp-primitives
instead; it has the exact same components (wp-components
reexports them), andwp-primitives
has a massively smaller footprint.<Button>
component. None of the usage seems to justify it, so I simply replaced it with<button>
.Note: I can't find a particular team that is currently responsible for this block, so I'm assigning to @Automattic/jetpack-crew. Please feel free to reassign!
This PR should save ~250KB compressed (!!) on pages with story blocks.
Proposed changes:
wp-components
SVG-related components by replacing it with a dependency on thewp-primitives
equivalentswp-components
<Button>
and replace with plain<button>
Other information:
Jetpack product discussion
None, this is a simple performance improvement with no functionality changes.
Does this pull request change what data or activity we track or use?
No.
Testing instructions:
wp-components
is not loaded