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

docs: Reorganize Storybook sidebar nav to better reflect USWDS docs #785

Merged
merged 4 commits into from
Jan 27, 2021

Conversation

suzubara
Copy link
Contributor

Summary

In the interest of making components easier to find and match to their USWDS counterparts, this PR organizes components in Storybook under groups:

  • Design tokens: stories that illustrate or exemplify USWDS design tokens, utility classes, or other plain HTML that is not part of an exported React component
  • Components: stories for exported USWDS components and sub-components
  • Page templates: stories that illustrate USWDS page templates
  • Other: everything else, such as Truss-designed components. This group may not be long for this world.

Related Issues or PRs

Closes #784

How To Test

  • Start Storybook (yarn storybook)
  • Review the ordering and grouping of sidebar navigation

Screenshots (optional)

image

@suzubara suzubara requested a review from brandonlenz January 13, 2021 23:09
@suzubara suzubara changed the title [docs] Reorganize Storybook sidebar nav to better reflect USWDS docs docs: Reorganize Storybook sidebar nav to better reflect USWDS docs Jan 13, 2021
@suzubara suzubara added the type: documentation Improvements or additions to documentation label Jan 13, 2021
@trussworks-infra-zz
Copy link

trussworks-infra-zz commented Jan 13, 2021

Warnings
⚠️ This PR does not include changes to tests, even though it affects source code.

Generated by 🚫 dangerJS against ad57987

brandonlenz
brandonlenz previously approved these changes Jan 14, 2021
import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'

export const parameters = {
viewport: {
viewports: INITIAL_VIEWPORTS,
},
options: {
storySort: {
method: 'alphabetical',
Copy link
Contributor

@haworku haworku Jan 14, 2021

Choose a reason for hiding this comment

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

nice. Can we put the list below in alphabetical order too with "Components" first? Its also the most important stuff and it seems like by default storybook opens to the first story if you don't have a landing page

Copy link
Contributor

@brandonlenz brandonlenz left a comment

Choose a reason for hiding this comment

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

Looks great! I'll make sure to update the stories for my Breadcrumb PR with this as well.

@suzubara suzubara merged commit a9ff49f into main Jan 27, 2021
@suzubara suzubara deleted the sr-784-storybook-nav branch January 27, 2021 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[docs] Reorganize Storybook component navigation
4 participants