-
Notifications
You must be signed in to change notification settings - Fork 803
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
Fix front-end performance of Tiled Gallery block #22547
Conversation
#22445 reports a performance regression affecting page views where the Tiled Gallery is used. This PR simply reverts the change to `tiled-gallery/layout/mosaic/resize.js` and creates a native-specific file, `resize.native.js`, containing the previous implementation. Later work could remove web-specific code from `resize.native.js`, but that is lower priority, so is not addressed here.
Caution: This PR has changes that must be merged to WordPress.com |
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:
|
I'm not sure how to answer the questions in the PR template:
|
Thank you, @guarani, this looks like a good approach! 👍 This should isolate That said, whether this works or not will depend on how the Jetpack build is set up, and how it treats these |
Thanks @sgomes! I've moved this from Draft to Ready for Review 🙇 |
I've merged the latest from
I hope that fixes the failing CI checks. |
The build is failing with this error:
This appears to be due to the fact that this PR is deleting the |
By migrating this function from the native to the web file, we prevent the build error described here on the web: #22547 (comment)
@anomiex, thank you for highlighting that! We've worked around this by moving the Looking forward to hearing whether this approach seems suitable as well as any other feedback on this PR. 🙇♀️ |
Hey folks! Any progress on this one? It would be great to get a fix shipped on wpcom whenever possible 🙏 |
@sgomes, thanks for checking in! It's been marked as ready for review on our side, so looking forward to hearing any feedback on the code or whether this is good to go :) |
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.
Thank you, @SiobhyB! While I'm not an expert here, I can confirm that this does build correctly, and that it generates a view.assets.php
without a dependency on wp-element
👍
I think it's only the Crew review missing, at this point.
Great news! One last step: head over to your WordPress.com diff, D73985-code, and commit it. Thank you! |
r239679-wpcom |
#22445 reports a performance regression affecting page views where the Tiled Gallery is used.
This PR simply reverts the change to
tiled-gallery/layout/mosaic/resize.js
to its previous contents (prior to #21849) and creates a native-specific file,resize.native.js
, containing the file's current contents.I'm proposing leaving web-specific code in
resize.native.js
since removing it is lower priority and it wasn't immediately obvious which code to remove.Fixes #22445
Changes proposed in this Pull Request:
resize.js
file to a previous version to fix a performance regression on pages using the Tiled Gallery.Jetpack product discussion
The only discussion is that on the issue this PR fixes.
Does this pull request change what data or activity we track or use?
No, it does not.
Testing instructions:
TO-DO