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

Tiled Gallery: Move localized style labels into settings #30752

Merged
merged 1 commit into from
Feb 13, 2019

Conversation

sirreal
Copy link
Member

@sirreal sirreal commented Feb 13, 2019

Including the localized labels in the block constants implies that
evaluating the module depended on calling the _x function provided by
@wordpress/i18n. This lead to wp-i18n being a view-side dependency that
provided no value.

Reorganize so that localized labels are only available in the block
settings where they are required.

Required for #28933

Testing instructions

  • Use Jetpack remove/tiled-gallery-view-dependencies branch
  • Add and Tiled Gallery block
  • Confirm the block styles in the sidebar display correctly (labels)
  • View the block on the frontend and confirm it works as expected

https://jurassic.ninja/create?shortlived&gutenpack&gutenberg&calypsobranch=update/g7g-tg-restructure-drop-view-i18n-dep&branch=remove/tiled-gallery-view-dependencies

Including the localized labels in the block constants implies that
evaluating the module depended on calling the _x function provided by
@wordpress/i18n. This lead to wp-i18n being a view-side dependency that
provided no value.

Reorganize so that localized labels are only available in the block
settings where they are required.
@sirreal sirreal added Jetpack [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Type] Task [Type] Performance [Block] Tiled Gallery labels Feb 13, 2019
@sirreal sirreal self-assigned this Feb 13, 2019
@matticbot
Copy link
Contributor

@sirreal sirreal requested a review from simison February 13, 2019 11:01
sirreal added a commit to Automattic/jetpack that referenced this pull request Feb 13, 2019
With some restructuring, the dependency can be removed.

Depends on:

Automattic/wp-calypso#30752
Copy link
Member

@simison simison left a comment

Choose a reason for hiding this comment

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

Looks good!

Tested with Automattic/jetpack#11326 and confirmed this works in the editor and in view.

Confirmed that in view side window.wp.i18n wasn't available and the gallery still works. 👍

@simison simison added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Feb 13, 2019
@sirreal sirreal merged commit 231b5ef into master Feb 13, 2019
@sirreal sirreal deleted the update/g7g-tg-restructure-drop-view-i18n-dep branch February 13, 2019 14:24
jeherve pushed a commit to Automattic/jetpack that referenced this pull request Feb 26, 2019
* Remove Tiled Gallery view deps

* Restore wp-i18n dep

* Drop wp-i18n again

With some restructuring, the dependency can be removed.

Depends on:

Automattic/wp-calypso#30752

* Drop redundant empty dependencies
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