-
Notifications
You must be signed in to change notification settings - Fork 39
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
add Popover docs #1598
add Popover docs #1598
Conversation
onVisibleChange={setIsOpen} | ||
style={{ maxWidth: '45ch', border: 'none' }} | ||
content={ | ||
<Surface elevation={0}> |
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 had to add border: none
override because Surface always insists on bringing its own border.
Also, for some reason Surface.Body
only brings horizontal padding not vertical.
@FlyersPh9 Is this intentional?
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.
data-iui-padded="true"
does have vertical padding, it's just very little.
The examples on the surface demo page look nice, but the agree button in your screenshot does not look so great. Was the padding changed when we implemented scrollbar-gutter
?
Btw, just now found out scrollbar-gutter
doesn't work in Safari. 😓
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.
@rohan-kadkol Reading through these docs will help you make sense of the changes in #1602
examples/Popover.focus.tsx
Outdated
</Text> | ||
|
||
<Button | ||
ref={(el) => el?.focus()} |
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.
nit: It might be helpful if there were an explanation comment here. Something like, "To grab focus when the popover opens".
examples/Popover.focus.tsx
Outdated
<Surface.Body isPadded> | ||
<Flex flexDirection='column' alignItems='start'> | ||
<Text as='p' id={descriptionId}> | ||
(TODO: improve text) Lorem ipsum dolor sit amet consectetur |
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.
@gretanausedaite @rohan-kadkol @siddhantrawal Can somebody suggest better text or a different example? I dunno how this has 3 approvals with TODO text 😅
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 somebody suggest better text or a different example?
How about a "see image preview" popover? If we click on the trigger button that says "show image preview", the popover shows the image preview along with an "OK" button and a "Download" button.
I dunno how this has 3 approvals with TODO text 😅
I thought that TODO was for you so you will handle it yourself 😅 So I gave a preemptive approval to not block the PR because everything else LGTM.
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.
@gretanausedaite @rohan-kadkol @siddhantrawal Can somebody suggest better text or a different example? I dunno how this has 3 approvals with TODO text 😅
Maybe you can add something related to Bentley agreement or terms of use. If not, short summary about what you can add in the popover.
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 somebody suggest better text or a different example?
Some sliders to "tune settings", eg. quality, grain, color, saturation, etc. (like in photoshop) with ok or save / cancel buttons at the bottom.
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 dunno how this has 3 approvals with TODO text
We have more than one todo in repo that is supposed to be solved later.
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.
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.
React Visual Tests related to one of the Color Picker component is failing. |
Changes
Changes to docs: added new
/popover
page with usage and accessibility details.While working on docs, I found I had to make changes to Popover component (now moved into #1602).
Testing
Tested all examples in multiple browsers and with keyboard.
Docs
n/a. These are docs.