Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Update ripple and tab-scroller to use mdc-dom/ponyfill.matches #4340

Closed
kfranqueiro opened this issue Feb 1, 2019 · 0 comments
Closed

Update ripple and tab-scroller to use mdc-dom/ponyfill.matches #4340

kfranqueiro opened this issue Feb 1, 2019 · 0 comments

Comments

@kfranqueiro
Copy link
Contributor

kfranqueiro commented Feb 1, 2019

We added an mdc-dom package with a common matches function, but we still have 2 packages using their own version: Ripple and Tab Scroller.

Additionally, these packages use a version which is run eagerly ahead-of-time, which poses problems in SSR scenarios. (See material-components/material-components-web-react#654)

Edit: Only Ripple actually runs the function eagerly, although both work in the same manner.

We should update these components to use mdc-dom and remove the duplicate functions.

@abhiomkar abhiomkar added this to the 0.45.0 milestone Feb 4, 2019
acdvorak pushed a commit that referenced this issue Feb 14, 2019
Fixes #4340

`mdc-dom` implements a `matches()` method that wasn't used everywhere. These custom implementations prevented some SSR usage of the material-components library. This commit removes all the custom implementations.

I removed some tests that were testing a now removed method, and I handled to make the other pass.

PS: This is my first contribution here, I hope I did everything right!

BREAKING CHANGE: `getMatchesProperty()` has been removed from `@material/ripple/util`. Use `matches()` from `@material/dom/ponyfill` instead.
acdvorak pushed a commit that referenced this issue Feb 14, 2019
Fixes #4340

`mdc-dom` implements a `matches()` method that wasn't used everywhere. These custom implementations prevented some SSR usage of the material-components library. This commit removes all the custom implementations.

I removed some tests that were testing a now removed method, and I handled to make the other pass.

PS: This is my first contribution here, I hope I did everything right!

BREAKING CHANGE: `getMatchesProperty()` has been removed from `@material/ripple/util` and `@material/tab-scroller/util`. Use `matches()` from `@material/dom/ponyfill` instead.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants