-
Notifications
You must be signed in to change notification settings - Fork 813
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
Conversation
Caution: This PR has changes that must be merged to WordPress.com |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
With some restructuring, the dependency can be removed. Depends on: Automattic/wp-calypso#30752
sirreal, Your synced wpcom patch D24243-code has been updated. |
A fix for the |
There was a problem hiding this 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!
sirreal, Your synced wpcom patch D24243-code has been updated. |
@simison care to re-approve? Calypso-side has landed so this should be easier to test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Related: D24306-code (diff dependency) |
There was a problem hiding this 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. 🚢
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. |
Related discussion: p1550681303020100-slack-jetpack-gutenberg |
Merging this, as Jetpack now has a new version of the blocks including the Calypso part of this change. (#11420) |
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.
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.
Remove unused view dependencies from the Tiled Gallery block.
Fixes Automattic/wp-calypso#28933
Changes proposed in this Pull Request:
Testing instructions:
Test with
calypsobranch=update/g7g-tg-restructure-drop-view-i18n-dep
lodash
wp-i18n
(depends on Tiled Gallery: Move localized style labels into settings wp-calypso#30752)wp-token-list
Proposed changelog entry for your changes: