Skip to content
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

Merged
merged 14 commits into from
Mar 23, 2023
Merged

Coverage improvements #449

merged 14 commits into from
Mar 23, 2023

Conversation

emilybrick
Copy link
Contributor

@emilybrick emilybrick commented Mar 22, 2023

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

    • Popover
    • Button group
  • Removed outdated button usage UI pattern docs, moved relevant info into the button component docs

  • Cleaned up some minor things and updated URLS

@emilybrick emilybrick requested a review from a team as a code owner March 22, 2023 17:29
@emilybrick emilybrick temporarily deployed to github-pages March 22, 2023 18:32 — with GitHub Actions Inactive
@emilybrick emilybrick temporarily deployed to github-pages March 22, 2023 21:14 — with GitHub Actions Inactive
@emilybrick emilybrick temporarily deployed to github-pages March 23, 2023 15:35 — with GitHub Actions Inactive
@emilybrick emilybrick temporarily deployed to github-pages March 23, 2023 16:35 — with GitHub Actions Inactive
content/components/button.mdx Outdated Show resolved Hide resolved
emilybrick and others added 3 commits March 23, 2023 18:06
@@ -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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Primary and outline button usage
### Primary button usage

alt="An image showing a button group in medium and small sizes."
/>

### Leading and trailing visuals
Copy link
Contributor Author

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
Copy link
Contributor Author

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

Copy link
Contributor

@mperrotti mperrotti left a 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

content/components/button-group.mdx Outdated Show resolved Hide resolved
content/components/button-group.mdx Outdated Show resolved Hide resolved
content/components/button-group.mdx Show resolved Hide resolved
content/components/button-group.mdx Outdated Show resolved Hide resolved
Comment on lines +74 to +83
### 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."
/>
Copy link
Contributor

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.
Copy link
Contributor

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Comment on lines +30 to +32
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.
Copy link
Contributor

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
Copy link
Contributor

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

emilybrick and others added 3 commits March 23, 2023 14:45
Co-authored-by: Mike Perrotti <mperrotti@github.com>
Co-authored-by: Mike Perrotti <mperrotti@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants