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

i18n-loader-webpack-plugin: Move the actual downloading out of the runtime #22265

Merged
merged 11 commits into from
Jan 25, 2022

Conversation

anomiex
Copy link
Contributor

@anomiex anomiex commented Jan 8, 2022

Changes proposed in this Pull Request:

Instead of being provided state that it uses to build the URL and fetch
it, i18n-loader-webpack-plugin now expects to be provided a loader that will do
all the work for it.

This makes the runtime smaller and allows for more flexibility in the future if
we need to change how the fetching works.

The Assets package provides the necessary loader module, as it did the state
module before. The state module is deprecated.

Jetpack product discussion

None.

Does this pull request change what data or activity we track or use?

No

Testing instructions:

  • Load or generate a language pack that provides translations for Instant Search's lazy module. Make sure its UI is still translated.
  • For testing on wpcom, you'll have to grab automattic/jetpack-assets out of the build artifact and put it into wp-content/mu-plugins/jetpack-packages/production/jetpack_vendor/.
    • Also, before this can be deployed to wpcom, we'll similarly have to do a release of assets and update it on wpcom.

…ntime

Instead of being provided state that it uses to build the URL and fetch
it, it now expects to be provided a loader that will do all the work for
it.

This makes the runtime smaller and allows for more flexibility in the
future if we need to change how the fetching works.
@anomiex anomiex added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Status] Needs Review To request a review from Crew. Label will be renamed soon. [Pri] Normal labels Jan 8, 2022
@anomiex anomiex self-assigned this Jan 8, 2022
@anomiex anomiex requested a review from a team as a code owner January 8, 2022 00:11
@github-actions github-actions bot added [JS Package] I18n Loader Webpack Plugin [JS Package] Webpack Config [Package] Assets [Package] Connection UI This package no longer exists in the monorepo. [Package] Identity Crisis This package no longer exists in the monorepo. It was merged into [Package] Connection. [Package] Jitm [Package] Lazy Images This package no longer exists in the monorepo. [Package] My Jetpack [Package] Post List [Package] Search Contains core Search functionality for Jetpack and Search plugins [Package] Tracking This package no longer exists in the monorepo. It was merged into [Package] Connection. [Plugin] Backup A plugin that allows users to save every change and get back online quickly with one-click restores. [Plugin] Boost A feature to speed up the site and improve performance. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ RNA labels Jan 8, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2022

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ All commits were linted before commit.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

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.
Then, add the "[Status] Needs Team review" label and ask someone from your team review the code.
Once you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.


Jetpack plugin:

  • Next scheduled release: February 1, 2022.
  • Scheduled code freeze: January 24, 2022.

Backup plugin:

  • Next scheduled release: February 1, 2022.
  • Scheduled code freeze: January 24, 2022.

Boost plugin:

  • Next scheduled release: January 31, 2022.
  • Scheduled code freeze: January 24, 2022.

@matticbot
Copy link
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Hello anomiex! These changes need to be synced to WordPress.com - If you 're an a11n, please commandeer and confirm D72722-code works as expected before merging this PR. Once this PR is merged, please commit the changes to WP.com. Thank you!
This revision will be updated with each commit to this PR

@kraftbj
Copy link
Contributor

kraftbj commented Jan 18, 2022

This branch in isolation tested well for me. @anomiex could you rebase it and I can give it a quick review to avoid it going stale again?

@kraftbj kraftbj added [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Jan 18, 2022
@anomiex anomiex added [Status] Needs Review To request a review from Crew. Label will be renamed soon. and removed [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! labels Jan 18, 2022
@jeherve jeherve added this to the jetpack/10.6 milestone Jan 24, 2022
Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

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

I have not tested on WordPress.com, but this tested well for me in Jetpack.

@jeherve jeherve added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Jan 25, 2022
@jeherve jeherve enabled auto-merge (squash) January 25, 2022 14:52
@jeherve jeherve merged commit 63db714 into master Jan 25, 2022
@jeherve jeherve deleted the update/better-structure-for-i18n-loader branch January 25, 2022 15:42
@github-actions
Copy link
Contributor

Great news! One last step: head over to your WordPress.com diff, D72722-code, and commit it.
Once you've done so, come back to this PR and add a comment with your changeset ID.

Thank you!

@github-actions github-actions bot removed the [Status] Ready to Merge Go ahead, you can push that green button! label Jan 25, 2022
@jeherve
Copy link
Member

jeherve commented Jan 26, 2022

r238938-wpcom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[JS Package] I18n Loader Webpack Plugin [JS Package] Webpack Config [Package] Assets [Package] Composer Plugin [Package] Connection UI This package no longer exists in the monorepo. [Package] Identity Crisis This package no longer exists in the monorepo. It was merged into [Package] Connection. [Package] Jitm [Package] Lazy Images This package no longer exists in the monorepo. [Package] My Jetpack [Package] Post List [Package] Search Contains core Search functionality for Jetpack and Search plugins [Package] Tracking This package no longer exists in the monorepo. It was merged into [Package] Connection. [Plugin] Backup A plugin that allows users to save every change and get back online quickly with one-click restores. [Plugin] Boost A feature to speed up the site and improve performance. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] Normal RNA Touches WP.com Files [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants