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

[Popover] Fix PaperProps.ref breaking positioning #26560

Merged
merged 3 commits into from Jun 7, 2021

Conversation

vedadeepta
Copy link
Contributor

@vedadeepta vedadeepta commented Jun 2, 2021

Fixes #26538

Fixed by making use of useForkRef utility as described in the issue comments.

@mui-pr-bot
Copy link

mui-pr-bot commented Jun 2, 2021

Details of bundle changes (experimental)

Generated by 🚫 dangerJS against c810afd

@eps1lon eps1lon changed the title [Popover]: PaperProps.ref should not break positioning [Popover] PaperProps.ref should not break positioning Jun 2, 2021
Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

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

Thanks for the work.

A couple of minor things:

  1. Did you run yarn prettier and commit the changes?
  2. If you're up to it, please write a separate test without openPopover.
    It was the right decision to reach for existing tools but this particular test is pre-dates our new testing approach. Your change hightlights this issue perfectly where a single added test now affects all existing test. Debugging existing tests became harder and tests should usually not change over time unless breaking changes are introduced.

@eps1lon eps1lon added bug 🐛 Something doesn't work component: Popover The React component. labels Jun 2, 2021
@vedadeepta
Copy link
Contributor Author

vedadeepta commented Jun 2, 2021

Yeah thanks for pointing out, I forgot to run yarn prettier. Meant to push the fix later today.

For (2) - I will try to separate out the test.

@oliviertassinari oliviertassinari changed the title [Popover] PaperProps.ref should not break positioning [Popover] Fix PaperProps.ref breaking positioning Jun 2, 2021
Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

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

Thanks!

@eps1lon eps1lon merged commit 77e0035 into mui:next Jun 7, 2021
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: Popover The React component.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Popover/Menu] Trying to get a ref to the paper element breaks Popover/Menu
4 participants