refactor(popover): update styles and add new story#9965
Conversation
|
✔️ Deploy Preview for carbon-react-next ready! 🔨 Explore the source changes: 91b4c65 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-react-next/deploys/6182e4d91d298f000899d83d 😎 Browse the preview: https://deploy-preview-9965--carbon-react-next.netlify.app |
|
✔️ Deploy Preview for carbon-components-react ready! 🔨 Explore the source changes: 91b4c65 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/6182e4d9137b3300078d08e0 😎 Browse the preview: https://deploy-preview-9965--carbon-components-react.netlify.app |
|
✔️ Deploy Preview for carbon-elements ready! 🔨 Explore the source changes: 91b4c65 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/6182e4d9bf78a30007457d80 😎 Browse the preview: https://deploy-preview-9965--carbon-elements.netlify.app |
|
What's the intended behavior for the right/left variants? For me, I would think |
|
@abbeyhrt yeah, the placement/alignment stuff is a little confusing. Basically the popover can be put above, below, or to other side. Then the other part is the caret alignment which so that:
|
|
Hey @laurenmrice! Which preview are you looking at? It should be:
I couldn't figure out the right equivalent since this is using Screen.Recording.2021-10-28.at.10.23.12.movIf these aren't matching, we could use multiple shadows to try and emulate the effect but I wasn't sure what values would be needed. Let me know what you think! |
|
@joshblack Oh, okay got it. I was not looking at the correct link. I will take a look again. Thanks! |
|
bump @aledavila @dakahn @abbeyhrt |
There was a problem hiding this comment.
Storybook demo spec:
- Instead of using a 48px container and a 32px icon for the trigger, lets use a
32px containerand a16px icon. - When the caret tip is set to true: there should be a
4px spacebetween the caret and the container bounding box.

Direction alignments:
When the caret tip is set to true, most of the alignments looks good, but some popovers just need a 2px nudge)
- Top-left (move popover 2px to right)
- Top-right (move popover 2px to left)
- Bottom-left (move popover 2px to right)
- Bottom-right (move popover 2px to left)
- Left-bottom (move popover 2px up)
- Left-top (move popover 2px down)
- Right-bottom (move popover 2px up)
- Right-top (move popover 2px down)
…at/update-popover
|
@laurenmrice should be good to go for a re-review! I tried to spend this afternoon tackling the caret alignment that you brought up and I think I got it so that the caret will automatically center regardless of the size of the trigger and the placement of the caret 🤞 It also was updated to include that 10px offset that we talked about plus the 12px x 6px triangle 🔥 This also works with the |
There was a problem hiding this comment.
-
Directions look great in Safari/Chrome/Firefox! 🎉
-
The only thing we need to adjust now is that the 16px checkbox icon looks like it was enlarged to fill the 16px container around it. The true asset of the 16px icon has some padding around the artwork inside of the 16px container. https://carbon-elements.netlify.app/icons/examples/preview/#Checkbox16
|
@laurenmrice updated! |

Reference #9941
Changelog
New
Changed
Removed
Testing / Reviewing