-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat(react): add autoAlign
feature to popover
#11508
feat(react): add autoAlign
feature to popover
#11508
Conversation
✅ Deploy Preview for carbon-components-react ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
This looks great! 🔥 Left some comments about maybe adding a few more contextual comments for maintainers, but it's not a dealbreaker. The story seems to be working great. I'm wondering if we should add some tests around this functionality, though? |
@jnm2377 Thanks for looking through it! I think the only way to test it is through a VRT test. Since it's just a visual change, there's no way really to meaningfully test this with RTL. There aren't any VRT tests for Popover yet and I asked @joshblack and he said to hold off on adding one for this variant until it does |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great! Left some comments/questions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great Abbey! 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
Closes #11385
Adds
autoAlign
prop and corresponding feature to Popover component. Popover withautoAlign={true}
will only work on first render so resize and scroll events will currently have no impact on the positioning.Testing / Reviewing
Review code to make sure the approach is okay and go to the 'Automate' story for Popover to see if it is visible in all four instances