Skip to content
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

Drop moment support from i18n-calypso. #39030

Merged
merged 2 commits into from
Jan 27, 2020

Conversation

sgomes
Copy link
Contributor

@sgomes sgomes commented Jan 23, 2020

This PR gets rid of moment as a dependency of i18n-calypso, as nothing should be making use of that functionality anymore.

This will also be the final step in getting rid of moment in the login entry point, saving ~20KB (compressed).

Changes proposed in this Pull Request

  • Remove i18n.moment
  • Remove moment prop from i18n.localize
  • Update tests and documentation accordingly
  • Minor lint fixes
  • Remove moment provider from login entry point

Testing instructions

It's hard to provide detailed instructions, since this could potentially affect any part of Calypso. I tried to go through and convert every usage of i18n-calypso's moment into something else in previous PRs, but I may have missed something.

@sgomes sgomes added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Type] Janitorial [Type] Performance labels Jan 23, 2020
@sgomes sgomes requested review from blowery, jsnajdr, sirreal and a team January 23, 2020 16:28
@matticbot
Copy link
Contributor

@matticbot
Copy link
Contributor

matticbot commented Jan 23, 2020

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

App Entrypoints (~20319 bytes removed 📉 [gzipped])

name                   parsed_size           gzip_size
entry-login               -73434 B  (-7.2%)   -19676 B  (-7.4%)
entry-main                  -136 B  (-0.0%)     -101 B  (-0.0%)
entry-domains-landing        -46 B  (-0.0%)     +200 B  (+0.2%)
entry-gutenboarding          +32 B  (+0.0%)     -742 B  (-0.1%)

Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

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.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

Copy link
Member

@jsnajdr jsnajdr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome 💙 Congrats for finishing the long journey!

@sgomes
Copy link
Contributor Author

sgomes commented Jan 24, 2020

This is awesome 💙 Congrats for finishing the long journey!

Thank you for the review and for all your help along the way, @jsnajdr! I'll leave this for Monday, to avoid potential issues over the weekend.

@sgomes sgomes merged commit 2ba30c4 into master Jan 27, 2020
@sgomes sgomes deleted the update/drop-moment-from-i18n-calypso branch January 27, 2020 11:24
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Jan 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants