-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Lodash: Remove from Gallery block #50591
Conversation
Size Change: -2 B (0%) Total Size: 1.39 MB
ℹ️ View Unchanged
|
This looks fine from the web client side as the V1 code path won't be getting called anymore now anyway as far as I can tell. @dcalhoun from the native side do you think we still need to maintain the v1 Gallery code path? The web code is defaulting to v2 now, but the native code still calls this check to determine which version to run. |
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.
The changes make sense to me. Thank you!
I tested empty and populated Galleries — both v1 and v2 — on an iPhone 14 Pro simulator. I did not encounter any issues.
@dcalhoun from the native side do you think we still need to maintain the v1 Gallery code path? The web code is defaulting to v2 now, but the native code still calls this check to determine which version to run.
@glendaviesnz my understanding is we still need this check to continue supporting Gallery v1 in the mobile app. @fluiddot given you helped introduce this check, are you able to confirm this? Should we have timeframe for removing Gallery v1 support or retain it indefinitely?
We'd need to check first the adoption metrics of Gallery V2 in the app, but since we introduce it a while ago, most likely we could remove V1 soon. |
Thank you all 🙌 |
What?
This PR removes Lodash from the Gallery block.
Why?
Lodash is known to unnecessarily inflate the bundle size of packages, and in most cases, it can be replaced with native language functionality. See these for more information and rationale:
@wordpress/api-fetch
package haslodash
as a dependency #39495How?
We're using straightforward native JS functionality instead.
Testing Instructions