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

feat(react): add autoAlign feature to popover #11508

Merged
merged 19 commits into from
Jun 27, 2022

Conversation

abbeyhrt
Copy link
Contributor

Closes #11385

Adds autoAlign prop and corresponding feature to Popover component. Popover with autoAlign={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

@abbeyhrt abbeyhrt requested review from a team as code owners May 31, 2022 18:19
@netlify
Copy link

netlify bot commented May 31, 2022

Deploy Preview for carbon-components-react ready!

Name Link
🔨 Latest commit 5246618
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-react/deploys/62b9dd904fb5da00080aa156
😎 Deploy Preview https://deploy-preview-11508--carbon-components-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented May 31, 2022

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 5246618
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/62b9dd90c1448200085b8f7b
😎 Deploy Preview https://deploy-preview-11508--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@jnm2377
Copy link
Contributor

jnm2377 commented May 31, 2022

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?

@abbeyhrt
Copy link
Contributor Author

@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

Copy link
Contributor

@joshblack joshblack left a 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

packages/react/src/components/Popover/index.js Outdated Show resolved Hide resolved
packages/react/src/components/Popover/index.js Outdated Show resolved Hide resolved
@abbeyhrt abbeyhrt requested review from joshblack and a team and removed request for a team June 1, 2022 21:07
@abbeyhrt abbeyhrt requested a review from aagonzales June 2, 2022 15:33
@aagonzales aagonzales requested review from laurenmrice and removed request for aagonzales June 3, 2022 19:15
Copy link
Member

@laurenmrice laurenmrice left a comment

Choose a reason for hiding this comment

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

Looks great Abbey! 🎉

Copy link
Contributor

@joshblack joshblack left a comment

Choose a reason for hiding this comment

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

🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Adjust Popover to be visible on first render
5 participants