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

chore: remove intersection-observer for old Safari support #23284

Merged
merged 2 commits into from Jan 29, 2023

Conversation

shuuji3
Copy link
Contributor

@shuuji3 shuuji3 commented Jan 28, 2023

This PR removes the old intersection-observer polyfill library introduced by #3191, similar to the previous PR #22693. The library repository had been archived already: GoogleChromeLabs/intersection-observer: A polyfill for IntersectionObserver - https://github.com/GoogleChromeLabs/intersection-observer.

This feature is natively supported by Safari since March 2019: "intersection-observer" | Can I use... Support tables for HTML5, CSS3, etc.

There's still intersection-observer in yarn.lock. This is because the old version of emoji-mart depends on it but the latest version doesn't have the dependency so it will be removed once we update the version of emoji-mart.

> yarn list
...
├─ emoji-mart@3.0.1-j
│  ├─ @babel/runtime@^7.0.0
│  ├─ intersection-observer@^0.12.0
│  └─ prop-types@^15.6.0
...
├─ intersection-observer@0.12.2 <- removing this
...

I'll open the PR once checked if this removal does not affect codes using IntersectionObserver.

@shuuji3 shuuji3 marked this pull request as draft January 28, 2023 16:43
@shuuji3 shuuji3 marked this pull request as ready for review January 29, 2023 07:52
@shuuji3
Copy link
Contributor Author

shuuji3 commented Jan 29, 2023

Synced to the latest commit and it solved the lint error, which was caused by the old import of object-fit polyfill.

@Gargron Gargron merged commit 9cdd643 into mastodon:main Jan 29, 2023
@shuuji3 shuuji3 deleted the remove-intersection-observer branch January 30, 2023 04:14
btrd pushed a commit to btrd/mastodon that referenced this pull request Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants