-
Notifications
You must be signed in to change notification settings - Fork 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
Improve addQueryArgs #37606
Improve addQueryArgs #37606
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~1756 bytes added 📈 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~2 bytes removed 📉 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
I was hoping we could drop the entire thing in favor of its counterpart from Feel like codemoddin'? 😬 |
@ockham The goal behind this PR, previous ones, and future ones I had planned, is to replace as much 3rd party code (the deprecated browserified
As such, I'm reluctant to replace this with |
Thanks for explaining, all of this makes sense ❤️
Nah, really just code reuse. Including secondary aspects that follow from that like de-duplication of functionality, single point of maintenace, etc.
Not that I'm aware of (I'm not that directly involved with Core). I mean it definitely seems like that lib would profit from an effort like this; but do feel free to proceed with this one 👍 |
I just noticed that we are actually already using
I'd be more than happy to work on At first glance, it'd require:
Then, on the Calypso side:
That's a lot of changes, and while I don't mind spending the time making them, it is a big change for the library. It feels like something that should be discussed, not just dropped into a PR all of a sudden 😅 |
324dd48
to
d024b54
Compare
Ah right, good point 😬
All the Other than just filing PRs against that repo, you'd need to talk to Gutenberg people, e.g. @youknowriad, @gziolo, or @aduth.
Yeah, makes sense. I think Core typically discusses things like that either in issues in the Gutenberg repo, Core Slack, or make.wordpress.org. (The latter might be better suited for more high-level proposals that involve design or more far-reaching technical decisions.) |
If you are able to refactor |
Related Gutenberg issue: WordPress/gutenberg#13386 In truth, I only recently learned that |
Thank you all! In that case, I'll be happy to take on this work in Closing this PR for now. 👍 |
This PR aims to improve
addQueryArgs
, moving it to its rightful place inlib/url
, and reimplementing it with native URL functionality (instead of the browserified version ofnode
'surl
module).Changes proposed in this Pull Request
addQueryArgs
tolib/url
Testing instructions
The unit tests should provide some measure of comfort, complemented by the E2E tests.