cfpb / design-system-react

A React/Storybook implementation of CFPB's Design System
https://cfpb.github.io/design-system-react/
MIT License
6 stars 4 forks source link

[Exploration] Storybook organization #155

Open natalia-fitzgerald opened 1 year ago

natalia-fitzgerald commented 1 year ago

The goal of this issue is to explore ways of organizing/structuring the CFPB React component library in Storybook.

Task

Storybook libraries

natalia-fitzgerald commented 1 year ago

Exploration 1:

Here's an example from the Storybook website.

It seems like a pretty simple approach:

meissadia commented 1 year ago

Things I like about each Storybook configuration

natalia-fitzgerald commented 1 year ago

GOV.UK

Welcome

Example Application

FORM

Button Checkbox Date field Error summary Error text Fieldset File upload Form group Hint text Input field Input Label text Label Multi choice Radio Search box Select Textarea

TYPOGRAPHY

Caption Details Document Footer Metadata Heading Inset text Lead paragraph List item Ordered list Paragraph Phase banner Table Tag Unordered list Warning text

PAGE & LAYOUT

Footer GlobalStyle Grid col Grid row Main Page Panel Section break Top nav

NAVIGATION

Back link Breadcrumbs Link Pagination Related items Skip link Tabs

UTILITY

Loading box Visually hidden Icons

DOCS

Accessibility API Contributing

USWDS

Welcome

DESIGN TOKENS

Swatches

Page Templates

Authentication Pages Documentation Pages Landing Page Not Found Page

Components

Accordion Alert Banner Breadcrumb Button Button groups Card CharacterCount Checkbox Collection Combo box Date input Date picker Date range picker Dropdown File input Footer Form controls Form elements Form templates Grid Header Icon list Icons Identifier Input prefix or suffix Modal Pagination ProcessList Radio buttons Range slider Search Select Side navigation SiteAlert Step Indicator Summary box Table Tag Text input Textarea Tooltip Typography Validation

CFPB Design System

Foundation

BASICS

Color Grid

TYPOGRAPHY

Fonts Headings Paragraphs

BRAND SYMBOLS

Logo Seal

GRAPHICS

Iconography

Components

ALERTS

Banner notification Notifications

BEHAVIOR

Expandables Summaries

FORM ELEMENTS

Buttons Checkboxes Dropdowns and multiselects Fieldsets Helper text Labels and legends Links Radio buttons Range sliders Text inputs

LISTS AND TABLES

Lists Tables

Patterns

INTERACTION PATTERNS

FORMS

Designing forms E-mail signup forms

NAVIGATION

Filterable list control panels Pagination

TRANSITIONS

Transition patterns

LAYOUT PATTERNS

INTRODUCTIONS

Heroes Text introductions Item introductions

FEATURED CONTENT

Cards Featured content module Wells Taglines

MAIN CONTENT

Info unit groups Interactive charts

Pages

Landing pages Sublanding pages Browse pages Learn pages Filterable list pages Document detail pages Story pages

Development

ATOMIC

Atomic components

LAYOUT

Base images Blocks Column dividers Main content and sidebars

UTILITIES

Helper classes and mixins Media queries Variables

natalia-fitzgerald commented 1 year ago

CFPB Design System - Mapped to GOV.UK

Welcome

Example Application

Form

Checkboxes Buttons Date field (date picker) Dropdowns and multiselects Error summary Error text Fieldsets File upload Form group (USWDS + UK) Form templates (USWDS) Helper text (this is called hint text in USWDS and UK) Labels and legends Alerts -- Notifications -- (this contains in page notifications, inline notifications and form level alerts - should probably be broken up differently for our context) Radio buttons Text fields/inputs (Text input and text area input - should we break these apart?) Search box

Navigation

Breadcrumbs Links Pagination Related links

Page and Layout

Cards “Divider”* (horizontal rule) Footer Grid Header Heroes Item introductions Megamenu Text introductions Wells Taglines

Typography

Headings Icon list (USWDS) Icons Inset text Lead paragraph List item Ordered list Paragraph Table Tag Unordered list

meissadia commented 1 year ago

My attempt at grouping the pieces of the CFPB DS in a more cohesive way

* = Not Implemented @ = Does it belong in DSR?

Design Guidance*@

Links to documentation or things that do not have an associated implementation

Content

Components to structure and style content

Layout

Components to structure pages

User Inputs

Components to gather user input (not always in a Form? ex. Login button used as Nav element)

Utilities

Tools to assist with common dev tasks

meissadia commented 1 year ago

General emphasis on matching heading levels between custom overviews <=> Auto generated