-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Button] Add support for two right direction icons in disclosure prop. #11812
Conversation
The two new disclosure icons are `ChevronRightIcon` and `ArrowRightIcon`, which are used to indicate in-context navigation or navigation to another context, respectively.
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.
@jorgenunezsiri the disclosure naming is for creating a popover after a button press. Why can't you do this with an icon in a button?
Button.icon puts the icon on the left side of the Button. This is techinically still a disclosure pattern since it opens the next page of a paged Modal, PositionedOverlay is also about to support horizontal position so that Popover and HoverCard can open left/right. Using UnstyledButton instead would mean copying over hundreds of lines of CSS from Button.css into Web when this is a simple thing that makes sense to support in the system. |
I think the ux here could converge into a single option. I don't see a lot of value in a chevron and arrow right option. |
+1, the arrow doesn't add clarity in my opinion. Where does "I don't want help setting up" navigate the merchant? Was there any exploration into a simplified dismissal action in context, like "Skip" or "Dismiss"? |
@chloerice Thank you for your feedback! There are actually three use cases to consider where we are using the temporary DisclosureIconButton component nowadays:
Please see the video below where I highlight the use cases and also the transitions between the questionnaire cards and from the questionnaire context to the Admin home page context: signup-questionnaire-in-admin.mov
@chloerice Yes, this is exactly right. I also agree that this is technically still a disclosure pattern. For the temporary DisclosureIconButton component we were able to minimize the styling copy & paste since we are only using the |
4c3d641
to
c227341
Compare
Localization quality issues found The following issues may affect the quality of localized translations if they are not addressed:
Please look out for other instances of this issue in your PR and fix them as well if possible. Questions about these messages? Hop in the #help-localization Slack channel. |
WHY are these changes introduced?
Part of https://github.com/Shopify/web/issues/110696
Reasoning: As part of the signup questionnaire in Admin, we have a temporary DisclosureIconButton component that was created as a forked local version of the Button component, to add support for two right direction icons in the disclosure prop:
Having these two icons present in the disclosure prop of the
Button
component directly would allow us to simplify this implementation, by removing the previous temporaryDisclosureIconButton
component and usingButton
component for these Admin use cases.WHAT is this pull request doing?
This PR adds supports for two right direction icons in Button component disclosure prop:
ChevronRightIcon
andArrowRightIcon
, which are used to indicate in-context navigation or navigation to another context, respectively.Results in Storybook
How to 🎩
🎩 checklist
README.md
with documentation changes