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: Remove unused view dependencies #11326

Merged
merged 4 commits into from
Feb 26, 2019

Conversation

sirreal
Copy link
Member

@sirreal sirreal commented Feb 12, 2019

Remove unused view dependencies from the Tiled Gallery block.

Fixes Automattic/wp-calypso#28933

Changes proposed in this Pull Request:

  • Remove redundant Tiled Gallery frontend script dependencies.

Testing instructions:

Test with calypsobranch=update/g7g-tg-restructure-drop-view-i18n-dep

Proposed changelog entry for your changes:

  • Remove redundant Tiled Gallery frontend script dependencies.

@sirreal sirreal added the [Feature] Tiled Gallery A different way to display image galleries on your site, in different organizations and shapes. label Feb 12, 2019
@sirreal sirreal added this to the 7.0.1 milestone Feb 12, 2019
@sirreal sirreal self-assigned this Feb 12, 2019
@sirreal sirreal requested review from simison and a team February 12, 2019 13:44
@matticbot
Copy link
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Hello sirreal! These changes need to be synced to WordPress.com - If you 're an a11n, please commandeer, review, and approve D24243-code before merging this PR. Thank you!

@jetpackbot

This comment has been minimized.

@matticbot

This comment has been minimized.

@sirreal sirreal added [Status] Needs Review A Jetpack Crew expert's review is needed. Typically for significant changes to core functionality. [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Focus] Performance labels Feb 13, 2019
With some restructuring, the dependency can be removed.

Depends on:

Automattic/wp-calypso#30752
@matticbot
Copy link
Contributor

sirreal, Your synced wpcom patch D24243-code has been updated.

@sirreal
Copy link
Member Author

sirreal commented Feb 13, 2019

A fix for the wp-i18n dependency: Automattic/wp-calypso#30752

simison
simison previously approved these changes Feb 13, 2019
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.

Works well together with Automattic/wp-calypso#30752

Thanks for the cleanup!

@matticbot
Copy link
Contributor

sirreal, Your synced wpcom patch D24243-code has been updated.

@sirreal
Copy link
Member Author

sirreal commented Feb 13, 2019

@simison care to re-approve? Calypso-side has landed so this should be easier to test.

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.

👍

@sirreal
Copy link
Member Author

sirreal commented Feb 13, 2019

Related: D24306-code (diff dependency)

@jeherve jeherve added [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack [Status] Ready to Merge Go ahead, you can push that green button! labels Feb 13, 2019
@jeherve jeherve removed the [Status] Needs Review A Jetpack Crew expert's review is needed. Typically for significant changes to core functionality. label Feb 13, 2019
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.

works in my tests. 🚢

@sirreal
Copy link
Member Author

sirreal commented Feb 20, 2019

If landed, this would break the master build because it depends on block changes that haven't landed in master yet.

We should likely publish a new version and pull it in before landing this PR.

@sirreal sirreal added the DO NOT MERGE don't merge it! label Feb 20, 2019
@jeherve
Copy link
Member

jeherve commented Feb 20, 2019

Related discussion: p1550681303020100-slack-jetpack-gutenberg

@jeherve jeherve added [Pri] Normal and removed DO NOT MERGE don't merge it! labels Feb 22, 2019
@jeherve
Copy link
Member

jeherve commented Feb 26, 2019

Merging this, as Jetpack now has a new version of the blocks including the Calypso part of this change. (#11420)

@jeherve jeherve merged commit 63f8d6d into master Feb 26, 2019
@ghost ghost removed the [Status] Ready to Merge Go ahead, you can push that green button! label Feb 26, 2019
@jeherve jeherve deleted the remove/tiled-gallery-view-dependencies branch February 26, 2019 17:34
simison added a commit that referenced this pull request Mar 5, 2019
jeherve pushed a commit that referenced this pull request Mar 6, 2019
The previous version of Tiled gallery had `wp-i18n` as a dependency which depends on `wp-polyfill` (https://github.com/WordPress/WordPress/blob/029fcf7791e425303d14328471ed61e9f0ecc1e1/wp-includes/script-loader.php#L424).

We removed view side deps in #11326

By adding `wp-polyfill`, we ensure that `isNaN`, `Array.from` and other methods that need polyfilling to work in IE11.

Editor side dependency isn't _really_ needed here since many other dependencies pull in wp-polyfill as well, but seems like it's good to be explicit?

This fix is an alternative to Automattic/wp-calypso#31228 because of size considerations: Automattic/wp-calypso#31228 (comment):
>wp-polyfill (v7.0.0) 30.7 KB minified
>
>view.js when building minified production versions from Automattic/wp-calypso#31228:
>- without polyfill 7.96 KiB
>- with polyfill 87.6 KiB


#### Changes proposed in this Pull Request:
- Add `wp-polyfill` as a dependency for tiled gallery block view side and editor side.

#### Testing instructions:

- Spin up jurassic ninja with this branch gutenpack-jn
- Add Tiled gallery to a page where no other blocks are not present (to ensure you're not loading `wp-polyfill` via other sources)
- open the saved page in IE11 and observe no more  fatal errors in debugger

Fixes Automattic/wp-calypso#31224

#### Proposed changelog entry for your changes:
Fix regression that caused Tiled Gallery not function in Internet Explorer 11 browsers anymore.
jeherve pushed a commit that referenced this pull request Mar 6, 2019
The previous version of Tiled gallery had `wp-i18n` as a dependency which depends on `wp-polyfill` (https://github.com/WordPress/WordPress/blob/029fcf7791e425303d14328471ed61e9f0ecc1e1/wp-includes/script-loader.php#L424).

We removed view side deps in #11326

By adding `wp-polyfill`, we ensure that `isNaN`, `Array.from` and other methods that need polyfilling to work in IE11.

Editor side dependency isn't _really_ needed here since many other dependencies pull in wp-polyfill as well, but seems like it's good to be explicit?

This fix is an alternative to Automattic/wp-calypso#31228 because of size considerations: Automattic/wp-calypso#31228 (comment):
>wp-polyfill (v7.0.0) 30.7 KB minified
>
>view.js when building minified production versions from Automattic/wp-calypso#31228:
>- without polyfill 7.96 KiB
>- with polyfill 87.6 KiB


#### Changes proposed in this Pull Request:
- Add `wp-polyfill` as a dependency for tiled gallery block view side and editor side.

#### Testing instructions:

- Spin up jurassic ninja with this branch gutenpack-jn
- Add Tiled gallery to a page where no other blocks are not present (to ensure you're not loading `wp-polyfill` via other sources)
- open the saved page in IE11 and observe no more  fatal errors in debugger

Fixes Automattic/wp-calypso#31224

#### Proposed changelog entry for your changes:
Fix regression that caused Tiled Gallery not function in Internet Explorer 11 browsers anymore.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Tiled Gallery A different way to display image galleries on your site, in different organizations and shapes. [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack [Focus] Performance [Pri] Normal 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.

5 participants