-
Notifications
You must be signed in to change notification settings - Fork 15
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: new element contribution #588
Conversation
🦋 Changeset detectedLatest commit: 25314cd The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
size-limit report 📦
|
packages/pharos/src/components/popover/PharosPopover.react.stories.jsx
Outdated
Show resolved
Hide resolved
packages/pharos/src/components/popover/PharosPopover.react.stories.jsx
Outdated
Show resolved
Hide resolved
packages/pharos/src/components/popover/PharosPopover.react.stories.jsx
Outdated
Show resolved
Hide resolved
packages/pharos/src/components/popover/PharosPopover.react.stories.jsx
Outdated
Show resolved
Hide resolved
packages/pharos/src/components/popover/PharosPopover.react.stories.jsx
Outdated
Show resolved
Hide resolved
packages/pharos/src/components/popover/PharosPopover.react.stories.jsx
Outdated
Show resolved
Hide resolved
…dius var Co-authored-by: Dane Hillard <github@danehillard.com>
…ents on different backgrounds
<div>Some really cool stuff</div> | ||
<div>Some really cool stuff</div> | ||
<div>Some really cool stuff</div> | ||
<div>Some really cool stuff</div> | ||
<div>Some really cool stuff</div> | ||
<div>Some really cool stuff</div> | ||
<div>Some really cool stuff</div> | ||
<div>Some really cool stuff</div> | ||
<div>Some really cool stuff</div> | ||
<div>Some really cool stuff</div> | ||
<div>Some really cool stuff</div> | ||
<div>Some really cool stuff</div> | ||
<div>Some really cool stuff</div> | ||
<div>Some really cool stuff</div> |
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 typically put some slightly higher fidelity content into these for demonstrative purposes. Maybe @lorilundy711 can make a suggestion here that is in keeping with other components' 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.
I converted this to a paragraph of lorem ipsum text as a start but can do whatever if we want different content in there
display: block; | ||
position: fixed; | ||
z-index: 140; | ||
pointer-events: none; |
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.
This is often a red flag for accessibility; I've added @sirrah-tam to review
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.
Not sure if desirable, but I stole this from the dropdown-menu css
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 think as long as the content is inline in the DOM from the triggering element, the use of z-index
and position: fixed
seem okay to me. Depending on the visual layout, we just want to make sure it matches the expected reading order.
list-style-type: none; | ||
padding-left: 0; | ||
padding-inline-start: 0; | ||
box-shadow: 0 1px 2px rgb(18 18 18 / 0.3), 0 4px 8px 3px rgb(18 18 18 / 0.15); |
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.
@lorilundy711 I think this is the first time we've introduced height to a component, is there any concern with the inconsistency here compared to e.g. dropdown menus?
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.
tested in chromatic storybook. worked as i expected 👍
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.
This looks good to me! The popover was perceived as a dialog and the user was able to navigate through it's content without issue. Users are able to perceive the name of the dialog based on its supplied label
attribute and focus is moved to the first interactive element (often close button).
* develop: chore: version packages (#611) Popover: Border radius styling enforcement (#610) Sheet: Component Contribution (#603) docs: add @sirrah-tam as a contributor (#607) Tokens: improve glacier-blue-40 AAA color contrast (#606) chore: bump dependencies and update resolutions (#605) Dropdown: add line rules for light variants (#599) chore: version packages (#601) feat(icon): add compare and side-panel icons (#596) chore(sidenav): fix flaky test (#600) chore: version packages (#595) Popover: new element contribution (#588)
* feat(popover): initial commit of the new popover component * feat(popover): iterating on popover in storybook * feat(popover): allow popover to show and dismiss * feat(popover): add more examples for a popover * feat(popover): clean up component * feat(popover): adding react examples * feat(popover): add changeset * feat(popover): add unit tests * feat(popover): rename unit test names and vars * feat(popover): fix tests initialization, remove unused tests, add aria-label for dialog * feat(popover): simplify template rendering * feat(popover): remove shadow when on background * feat(popver): fix inline style of react storybook and use existing radius var Co-authored-by: Dane Hillard <github@danehillard.com> * feat(popover): update inlines styles for web component storybook * feat(popover): update inlines styles for web component storybook * feat(popover): use storybook dark background * feat(popover): update shadow to latest * feat(popover): fix radius definition * feat(popover): add additional scenario to cover popups with dark contents on different backgrounds * feat(popover): fix focus logic for popover and remove old styles * feat(popover): convert placeholder copy to lorem ipsum * feat(popover): accessibility tweaks for pharos popover * feat(popover): update stories to use label --------- Co-authored-by: Dane Hillard <github@danehillard.com> Co-authored-by: Jialin He <38861633+jialin-he@users.noreply.github.com>
This change: (check at least one)
Is this a breaking change? (check one)
Is the: (complete all)
What does this change address?
Adds a popover element to pharos that fills the role of non-modal dialog
How does this change work?
Adds new popover element that is based heavily off of the existing dropdown-menu component but with relaxed requirements so that any contents can be slotted
Additional context