-
Notifications
You must be signed in to change notification settings - Fork 843
Lazy Images: Use W3C IntersectionObserver polyfill #8890
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gravityrail
approved these changes
Feb 20, 2018
Contributor
gravityrail
left a comment
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.
LGTM!
Contributor
Author
|
I've tested in Chrome, Firefox, Safari, and back to IE9 without any issues. This should be good to go. 👍 |
oskosk
approved these changes
Feb 23, 2018
Contributor
oskosk
left a comment
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.
LGTM!
oskosk
added a commit
that referenced
this pull request
Feb 27, 2018
oskosk
added a commit
that referenced
this pull request
Feb 27, 2018
* update changelog.txt * Update readme.txt with scaffolding for 5.9 changelog and release draft shortlink * Add changelog entry for #8243 * Add changelog entry for #8296 * Add changelog entry for #8367 * Add changelog entry for #8686 * Add changelog entry for #8707 * Add changelog entry for #8709 and #8714 * Add changelog entry for #8729 * Add changelog entry for #8777 * Add changelog entry for #8780 * Add changelog entry for #8786 * Add changelog entry for #8787 * Add changelog entry for #8801 #8805 #8832 #8865 and #8804 * Add changelog entry for #8817 * Add changelog entry for #8822 * Add changelog entry for #8823 * Add changelog entry for #8829 * Add changelog entry for #8834 * move some items to major enhancements * Add changelog entry for #8836 * Add changelog entry for #8839 * Add changelog entry for #8861 * Add changelog entry for #8862 * Add changelog entry for #8863 * Add changelog entry for #8866 * Add changelog entry for #8870 * Add changelog entry for #8874 * Add changelog entry for #8875 * Add changelog entry for #8881 * Add changelog entry for #8890 * Add changelog entry for #8911 * Add changelog entry for #8927 * Add changelog entry for #8931 * Add changelog entry for #8933 * Add changelog entry for #8930 * fix wording * typo * minor fixes * replace partner scripts for Jetpack Start in changelog entry * Update to-test.md * Update to-test.md * minor style fixes to to-test.md * minor style fixes to to-test.md * minor fixes on to-test.md * Add changelog entry for #8868 * Add changelog entry for #8844 * Add changelog entry for #8664 * Add changelog entry for #8935 * Add changelog entry for #8425 * Add changelog entry for #8625
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #8821
When we first worked on Lazy Images, we were using the W3TC IntersectionObserver polyfill, but near the end, we moved to another polyfill because the W3TC version had conflicting licenses. Specifically, in one case they were using an Apache 2.0 license which isn't GPL compatible. You can see more discussion about that in #8093.
As of w3c/IntersectionObserver@4a9a908 and w3c/IntersectionObserver@b025731, they have updated their licenses to "W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE", which is GPL compatible!
Since this is the one being worked on by W3C, I imagine that it's the most up-to-date and well tested. Using this polyfill fixes the Twitter embed issue reported in #8821.
We should do regression testing in other browsers before shipping.
Note: This is a large PR, but it is essentially copying and pasting a new polyfill in. 😄
To test:
yarn buildto build the minified filesdefine( 'SCRIPT_DEBUG', true );inwp-config.phpor an integration plugin, which will use the non-minified scriptsChangelog entry