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

[pickers] Fix usage with Shadow DOM #6952

Merged
merged 3 commits into from
Nov 23, 2022

Conversation

flaviendelangle
Copy link
Member

@flaviendelangle flaviendelangle commented Nov 22, 2022

Fixes #6841

Reproduction case before
Reproduction case after

Not sure how to test that
@m4theushw I've also use your utility function for the other occurrence of document.activeElement

@flaviendelangle flaviendelangle self-assigned this Nov 22, 2022
@flaviendelangle flaviendelangle added bug 🐛 Something doesn't work component: pickers This is the name of the generic UI component, not the React module! needs cherry-pick The PR should be cherry-picked to master after merge labels Nov 22, 2022
@mui-bot
Copy link

mui-bot commented Nov 22, 2022

Messages
📖 Netlify deploy preview: https://deploy-preview-6952--material-ui-x.netlify.app/

These are the results for the performance tests:

Test case Unit Min Max Median Mean σ
Filter 100k rows ms 653.1 1,213.5 653.1 911.58 231.75
Sort 100k rows ms 605.4 1,246.9 1,246.9 981.24 242.958
Select 100k rows ms 245.3 396.7 279 294.86 52.474
Deselect 100k rows ms 172.2 304.8 219.4 230.98 44.004

Generated by 🚫 dangerJS against c46859b

@flaviendelangle flaviendelangle marked this pull request as ready for review November 22, 2022 08:32
Copy link
Member

@m4theushw m4theushw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that if you want to add a test you can do by first creating a container, attaching a Shadow DOM to it, then pass its container.shadowRoot to the container option of RTL's render. You'll need to use custom queries because the default ones won't dive into the internals of the Shadow DOM. https://www.npmjs.com/package/shadow-dom-testing-library may help.

@flaviendelangle flaviendelangle merged commit 149934e into mui:next Nov 23, 2022
@flaviendelangle flaviendelangle deleted the shadow-dom-active-element branch November 23, 2022 06:47
flaviendelangle added a commit to flaviendelangle/mui-x that referenced this pull request Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: pickers This is the name of the generic UI component, not the React module! needs cherry-pick The PR should be cherry-picked to master after merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[pickers] DateRangePicker not working properly in Shadow DOM
3 participants