-
Notifications
You must be signed in to change notification settings - Fork 65
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(docs): Update modal page to use new layout #713
Conversation
packages/docs/pages/modal.tsx
Outdated
<Code primary>Modals</Code> should require that users take an action. | ||
</>, | ||
<> | ||
<Code primary>Modals</Code> should close when users press the Cancel or Primary button, not when merchants |
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 Cancel or Primary button
should be like this?:
<>... cancel or primary <NextLink href="/button">Button</NextLink>, ...</>
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.
Let's just reword the sentence since it doesn't really make sense.
Modals should close when users press an action button, not when merchants click or tap the area outside the Modal.
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.
My only quandary with this "Do" is that dialogs should behave differently since a user should be able to click outside to close.
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.
Sounds good, I'll updated it, makes more sense.
Regarding your comment about the dialog
. Noticed that in the dialog
example (inside the implementation section), I'm not able to click outside in order to close it. Should I update the prop to closeOnClickOutside={true}
?
Also, should we also add this comment in the Do's
section? :
When using the variant dialog
, users should be able to click outside the dialog to close it by using the closeOnClickOutside
prop
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.
Regarding your comment about the dialog. Noticed that in the dialog example (inside the implementation section), I'm not able to click outside in order to close it. Should I update the prop to closeOnClickOutside={true}?
Probably not, it's really up to the consumer to add that prop.
My only quandary with this "Do" is that dialogs should behave differently since a user should be able to click outside to close.
Probably should have put a 🍹 for this, I was just trying to point out that these Do's and Don'ts were probably written with just the modal
variant in mind, where it's more of an experience that we want the user to not escape out of. The dialog
variant is really intended for destructive actions, like potentially deleting a product, that we want users to escape out of it easily if it wasn't their intended action. Maybe someone from @bigcommerce/product-design can chip in here?
5de4266
to
2185fa3
Compare
What?
Modal page:
do and don'ts
section in the modal page to use new layoutButton page:
<Code primary></Code>
tags.Screenshots/Screen Recordings
Modal page:
Button page:
Kapture.2022-02-11.at.11.13.04.mp4