-
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
Tiled Galllery Block: update Platform implementation to avoid pulling too many dependencies #22445
Comments
Hi @jeherve, thanks for reporting this, I'll take a look. |
Hey @guarani, please let me know if you need any help looking into this! |
👋 Hi @sgomes, thanks for reaching out. A likely solution would be to split My understanding of the issue is that #21849 (the port of Tiled Gallery to native mobile) imported Could you please confirm if this is your understanding as well? If so, the next step is identifying the places where
I want to reproduce this to make sure I have a good understanding of the issue and to be able to test a fix, but I had some issues this week with my Jetpack setup. I think I've been able to resolve these, so my next steps (likely tomorrow) will be to reproduce this in the browser using a local dev env. Alternatively I'll try reproducing in production (it's my understanding this issue is also affecting production). |
Hey @guarani! I'm currently AFK but I'd be happy to help out on Monday, yes!
Yes, that's the issue I able to identify, although it only applies to the frontend; the editor is able to make use of Not the frontend, though. Loading |
I'll go ahead and create a PR to split |
#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.
I've created #22547 to fix this by reverting the changes to I think I've been able to reproduce the original issue on Jetpack When testing the PR locally, Jetpack seems to install fine ( |
This is a follow-up from #21849.
The block update pulls
Platform
, from@wordpress/element
. That is problematic as the whole package (and its dependencies, React, React Dom, and lodash) is then added as a dependency and then enqueued in the editor as well as on the frontend to render the gallery.It would be nice to refactor this so we only add what we need. While we do try to use WordPress packages whenever possible, we aim to be as frugal as possible for frontend dependencies.
cc @illusaen, @guarani, and @SiobhyB who worked on the original PR. Do you think you could take a look?
Thank you!
The text was updated successfully, but these errors were encountered: