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

[RFC] Remove usage of popper.js's API #1963

Closed
oliviertassinari opened this issue Jul 6, 2020 · 1 comment
Closed

[RFC] Remove usage of popper.js's API #1963

oliviertassinari opened this issue Jul 6, 2020 · 1 comment
Milestone

Comments

@oliviertassinari
Copy link
Member

https://github.com/mui-org/material-ui-pickers/blob/b62ce2a71aa1395f02b7d54e11dbbfab8a080ea6/lib/src/_shared/PickerPopper.tsx#L70-L71

we rely on the API of popper.js's (onCreate), however, this leads to 3 issues:

  1. It forces us to write async tests which should almost never be needed.

https://github.com/mui-org/material-ui-pickers/blob/d6134e05c71361f1a6c2d1ea210690e04d544c83/lib/src/__tests__/DateTimePickerTestingLib.test.tsx#L44

Without the wait for, it fails with:

Capture d’écran 2020-07-06 à 12 53 35

  1. It's unclear if this API will stay around in the future Popper changed home material-ui#19358
  2. It could make it harder to expose the API to extern users.

I think that we could consider using a ref, to know when the DOM is safe to be usable

@oliviertassinari oliviertassinari added status: needs triage These issues haven't been looked at yet by a maintainer. and removed status: needs triage These issues haven't been looked at yet by a maintainer. labels Jul 6, 2020
@oliviertassinari oliviertassinari added this to the v5 milestone Jul 30, 2020
@oliviertassinari
Copy link
Member Author

It seems it was already handled

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

No branches or pull requests

1 participant