-
Notifications
You must be signed in to change notification settings - Fork 303
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
Coverage improvements #449
Conversation
Co-authored-by: Katie Langerman <18661030+langermank@users.noreply.github.com>
@@ -231,6 +231,13 @@ Buttons allow users to initiate an action or command when clicked or tapped. The | |||
|
|||
## Best practices | |||
|
|||
### Primary and outline button usage |
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.
### Primary and outline button usage | |
### Primary button usage |
alt="An image showing a button group in medium and small sizes." | ||
/> | ||
|
||
### Leading and trailing visuals |
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.
@mperrotti I don't know if these should be referred to as Leading and trailing visuals? Wdyt
@@ -13,8 +13,6 @@ export default ComponentLayout | |||
import {Box} from '@primer/react' | |||
import {Caption} from '@primer/gatsby-theme-doctocat' | |||
|
|||
## Overview |
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.
removed bc this is also what the overarching tab is called, so felt confusing. Usage is a section underneath, so can't dupe that here either
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 also remove the links to button usage from content/foundations/responsive.mdx
and content/ui-patterns/saving.mdx
### Leading and trailing visuals | ||
|
||
Similarly to buttons, button segments can optionally include an icon and/or a counter. | ||
|
||
<img | ||
src="https://user-images.githubusercontent.com/586552/226987735-471711f1-5342-4605-903d-889301eace46.png" | ||
role="presentation" | ||
width="960" | ||
alt="An image showing a button group in medium and small sizes." | ||
/> |
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.
Non-blocking nitpick: I think we could get rid of this part and just rely on the button component docs.
@@ -231,6 +231,13 @@ Buttons allow users to initiate an action or command when clicked or tapped. The | |||
|
|||
## Best practices | |||
|
|||
### Primary and outline button usage | |||
|
|||
Limit primary button usage. Only use one primary button on the page, whenever possible, to indicate its emphasis relative to other actions. Primary buttons have top priority in visual hierarchy, and using too many of them on a single view dilutes their effectiveness. |
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.
❤️
|
||
## Usage | ||
|
||
The popover component is used to deliver context-specific information and functionality. It’s a small dialog to bring attention to specific user interface elements. It can provide additional information, options, or actions related to a specific element or task. Popovers can be helpful for flows that require light onboarding or instruction. |
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.
The popover component is used to deliver context-specific information and functionality. It’s a small dialog to bring attention to specific user interface elements. It can provide additional information, options, or actions related to a specific element or task. Popovers can be helpful for flows that require light onboarding or instruction. | |
The popover component is used to deliver context-specific information and functionality. It’s a small non-modal dialog to bring attention to specific user interface elements. It can provide additional information, options, or actions related to a specific element or task. Popovers can be helpful for flows that require light onboarding or instruction. |
Use sparingly to avoid cognitive overload. Though they can be used for a variety of things, they should be used sparingly to avoid cognitive overload. It's important to consider the context in which the popover appears. Are there other popovers on the page? Does it appear on page load, or require the user to open the popover? | ||
|
||
Unlike other messaging components, popovers should never include critical information (such as errors) and should always include a dismiss action. |
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.
❤️
- [Toasts](https://primer.style/css/components/toasts) | ||
- [Flash alerts](https://primer.style/css/components/alerts) | ||
- [Popovers](https://primer.style/css/components/popover) | ||
- Toasts |
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 we should either add a link or remove this until we add toasts to PRC or PVC
Co-authored-by: Mike Perrotti <mperrotti@github.com>
Co-authored-by: Mike Perrotti <mperrotti@github.com>
This PR is for a few small improvements to docs as well as new usage docs for popover and button group
MVP docs (description + usage) added for
Removed outdated button usage UI pattern docs, moved relevant info into the button component docs
Cleaned up some minor things and updated URLS