-
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(popover): add popover component and initial styles #7684
feat(popover): add popover component and initial styles #7684
Conversation
Deploy preview for carbon-components-react ready! Built without sensitive environment variables with commit c4aee59 https://deploy-preview-7684--carbon-components-react.netlify.app |
Deploy preview for carbon-elements ready! Built with commit c4aee59 |
…feat/add-popover-component2
…feat/add-popover-component2
…feat/add-popover-component2
…feat/add-popover-component2
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.
Lookin good! 🎉 I have a couple different comments around alignment and spacing:
- When the caret is positioned top/bottom and left/right. The caret needs to be 16px from that specified edge.
Examples story:
- There is a tooltip that comes up as well as a popover. For these examples shouldn’t we only have the popover appear here?
- For the 48px icon buttons, for demoing purposes on this story we need to move the popover over so the caret center aligns with the button, instead of aligning to the container. I can show other different directions with specs if that would be helpful.
Playground story:
- Can we bring the popover more into view on the page, so when people try to play with it they can see the popover better?
@laurenmrice updated! I fixed the caret positioning so it should be good, I also excluded the dev-only stories like I mentioned in Slack so it should just be the playground now 👀 |
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 good to me ! 🙌🏻
Let me know if you have any questions @tay1orjones @emyarod @tw15egan ! |
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.
are some of the stories missing from the storybook preview? Default and Examples aren't appearing
@include box-shadow; | ||
|
||
position: relative; | ||
width: max-content; |
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.
we've been avoiding this but have we already dropped support for IE?
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.
@emyarod the Popover
work is targetting post-IE11 (v11) stuff 👀
); | ||
} | ||
|
||
return ( |
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.
Can all this extra stuff in the story file be removed?
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.
I figured we could keep it for now until we figure out a better alignment story that we can use to verify (or only enable ti for development but not for production kind of thing)
Co-authored-by: TJ Egan <tw15egan@gmail.com>
Co-authored-by: emyarod <emyarod@users.noreply.github.com>
@emyarod correct, some of them are hidden since they are more-so for development working on it versus intended to be used by the end-user. I just don't think we have a good example of a story to use for alignment yet so it's just hidden for now while we figure that out 👀 |
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.
LGTM 👍 ✅
Closes #7713
This PR implements the initial spec for the Popover component, a utility for rendering UI on a layer that sits above the current UI. Currently, it handles the follow situations from the spec in the issue:
PaddingThis will be implement for layouts that use it since the component can both render text and things like menusChangelog
New
_popover.scss
inpackages/components
src/components/Popover
inpackages/react
Changed
useId
helper to referencecanUseDOM
from a sharedenvironment.js
fileRemoved