Storybook Structure - NCIOCPL/ncids GitHub Wiki
The following will be the structure for the Storybook. It will be reflected in the NCIDS for All Documentation Site and Figma files for consistency in the user experience.
For each component, there should be a Default, followed by its variants/modifiers. If necessary for the components, also group any examples together and group any test cases together. Use your best judgement as to what is most beneficial for the end user to interact with
-
Default: The component without any variants or modifiers, e.g.
site alert
-
Variants: The same component, but with enough structural HTML changes it becomes special. It's purpose does not change, so it does not warrant a new component. E.g.,
slim site alert
-
Modifiers: Modifications that can be applied to any of the variants. E.g.
emergency default site alert
,info slim slit alert
-
Test Cases: Any component variation with any modifiers that may be missing. Patterns will go here. E.g.
Dismissible emergency site default alert with two column links
- Component
- Default
- Variants
- Modifiers
- Test Cases
- Cgov - when there is a strong need to test Cgov HTML with NCIDS JS
- USWDS - when there is a need to test USWDS HTML with NCIDS JS
- USWDS
- Components
- ??? - Duplication of USWDS stories
- Components
📁 Accordion**
- 📁 Default
- Default
- Default - Multiselectable
- 📁 Variants
- 📁 Bordered
- Bordered
- Bordered - Multiselectable
- 📁 Bordered
- 📁 Test Cases
- 📁 Basic HTML
- Nested Example
- No JS
- 📁 Cancer.gov HTML
- Sample Article
- Nested
- No JS
- 📁 USWDS *
- 📁 Basic HTML
📁 Autocomplete
- 📁 Default
- 📁 Test Cases
- No JS
📁 Banner
- 📁 Default
- English without Language Toggle
- Spanish without Language Toggle
- English with Language Toggle
- Spanish with Language Toggle
📁 Breadcrumb
📁 Button
- 📁 Default
- Default Button (Primary, Secondary, Accent Cool, Accent Warm, Base)
- Default Anchor (Primary, Secondary, Accent Cool, Accent Warm, Base)
- 📁 Modifiers
- 📁 Size
- 📁 Big
- Big Button (Primary, Secondary, Accent Cool, Accent Warm, Base, Outline Primary, Outline Secondary, Outline Inverse)
- Big Anchor (Primary, Secondary, Accent Cool, Accent Warm, Base, Outline Primary, Outline Secondary, Outline Inverse)
- 📁 Small
- Small Button (Primary, Secondary, Accent Cool, Accent Warm, Base, Outline Primary, Outline Secondary, Outline Inverse)
- Small Anchor (Primary, Secondary, Accent Cool, Accent Warm, Base, Outline Primary, Outline Secondary, Outline Inverse)
- 📁 Big
- 📁 Full Width
- Full Width Button (Primary, Secondary, Accent Cool, Accent Warm, Base, Outline Primary, Outline Secondary, Outline Inverse)
- Full Width Anchor (Primary, Secondary, Accent Cool, Accent Warm, Base, Outline Primary, Outline Secondary, Outline Inverse)
- 📁 Icon
- 📁 Icon, left
- Icon, left Button (Primary, Secondary, Accent Cool, Accent Warm, Base, Outline Primary, Outline Secondary, Outline Inverse)
- Icon, left Anchor (Primary, Secondary, Accent Cool, Accent Warm, Base, Outline Primary, Outline Secondary, Outline Inverse)
- 📁 Icon, right
- Icon, right Button (Primary, Secondary, Accent Cool, Accent Warm, Base, Outline Primary, Outline Secondary, Outline Inverse)
- Icon, right Anchor (Primary, Secondary, Accent Cool, Accent Warm, Base, Outline Primary, Outline Secondary, Outline Inverse)
- 📁 Icon, left
- 📁 Size
- 📁 Variants
- 📁 Outline
- Outline Button (Outline Primary, Outline Secondary, Outline Inverse)
- Outline Anchor (Outline Primary, Outline Secondary, Outline Inverse)
- 📁 Unstyled
- Unstyled (Default; Big; Small; Full Width; Icon, Left; Icon, Right)
- 📁 Outline
- 📁 Test Cases
- Unsupported Outline Colors (Primary, Secondary, Accent Cool, Accent Warm, Base)
📁 Card
- 📁 Default
- 📁 Test Cases
- Card In Text Right
- Card in Text Left
- Card Group without Description
📁 Collection
- 📁 Default
- Default
- Media
- Calendar
- 📁 Variants
- Condensed
📁 CTA Strip
- 📁 Default
- 📁 Test Cases
📁 Footer
- 📁 Variants
- 📁 NCI Big
- English
- Spanish
- 📁 NCI Big
- 📁 Test Cases
- NCI Big No JS
- Back to top
📁 Guide Card
- 📁 Default
- Default
- Card Group
- 📁 Variants
- 📁 Guide Card with Image and Description
- Have Guide Card with Image and Description as a single card w/o a heading
- Title Aligned Card Group
- 📁 Guide Card with Image and Description
- 📁 Test Cases
- Guide Card with Image and Description without Description
- Guide Card with Image and Description without Image
- Title Aligned Card Group without Description
- Title Aligned Card Group without Image
📁 Header
- 📁 Default
- Default English
- Default Spanish
- 📁 Variants
- Header with Mega Menu English
- Header with Mega Menu Spanish
- 📁 Test Cases
- 📁 Default
- 📁 Header with Mega Menu
📁 Hero
- 📁 Default
- 📁 Modifiers
- 📁 Variants
- 📁 Test Cases
- 📁 With CTA
📁 List
- 📁 Default
- Ordered List
- Unordered List
- 📁 Modifiers
- Two-Column List (Note: This needs to be created)
- Unstyled List
📁 Promo Block
- 📁 Default
- 📁 Modifiers
- 📁 Dark Theme
- Default
- With Image
- 📁 Alternating Image Right
- With Image
- Dark Theme With Image
- 📁 Dark Theme
- 📁 Variants
- 📁 Test Cases
- Default No Description
- Default With Image No Description
📁 Side Navigation
- 📁 Default
- 📁 Test Cases
📁 Site Alert
- 📁 Default
- Default
- Dismissible
- 📁 Modifiers
- 📁 Emergency
- Emergency default
- Emergency slim
- Dismissible emergency default
- Dismissible emergency slim
- 📁 Info
- Info default
- Info slim
- Dismissible info default
- Dismissible emergency slim
- 📁 Emergency
- 📁 Variants
- Slim
- Dismissible
- 📁 Test Cases
- Emergency default with two column list
- Info default with two column list
📁 Skipnav
- 📁 Default
- Default English
- Default Spanish
📁 Summary Box
- 📁 Default
- Default
- 📁 Test Cases
- Summary Box Row
- Default
- Test Cases
- Default
- Test Cases
-
Card Row
- Should probably get moved to patterns?
- Card In Text Right
- Card in text left
-
Card Row
- Default
- Example (no media or calendar)
- Example with media
- Example with calendar
- Variants
- Condensed
Modifers- Test Cases
- USWDS Default
- USWDS Fancy
- USWDS Media
- USWDS Only Headers
- Default
- Test Cases
- Default
- With Image and Description
- This does not exist. TBH, we have not ever presented one of these without being in the weird grid.
- Test Cases
- Default
-
Guide Card Row
- patterns?
-
Guide Card Row
- with Image and Description
-
2 Guide Card With Image And Description
- patterns?
-
2 Guide Card With Image And Description
- Default
- Header Extended
- English Example†
- NOTE: This would use the auto-initializer with default sources.
- I think this would be NCI Extended Desktop No Js
- Mega Menu Example†
- NOTE: This would be our configuration with the fancy sources.
- I think this replaces NCI Extended Desktop Default using similar html to NCI Extended Desktop No Js
- Spanish Example†
- Maybe this is NCI Extended Desktop NCI Logo ES
- English Example†
- Test Cases
- Header Extended
-
NCI Extended Desktop No Search Field†
- This tests the header without a search.
- NCI Extended Desktop Primary Current Button††
-
NCI Extended Desktop Primary Current Link†
- NOTE: This should have its name updated. This is an example of a long navigation item that is not a mega menu when there is a mega menu.
- NCI Extended Desktop Primary Active Mega Menu††
- NCI Extended Desktop Primary Active Mega Menu Wrap††
- NCI Extended Desktop NCI Logo EN††
- NCI Extended Desktop Longer Primary Item†
- NCI Extended Desktop 2 Primary Items†
-
NCI Extended Desktop Search††
- NOTE: IDK why this exists versus the other examples, even in our non-js world.
- NCI Extended Desktop Search Clear††
- NCI Extended Desktop Bad Primary Nav†
- NCI Extended Mobile Default††
- NCI Extended Mobile First Level††
- NCI Extended Mobile Hover††
- NCI Extended Mobile Second Level††
- NCI Extended Mobile Active Section††
- NCI Extended Mobile Active Section Root††
- Logo CBIIT† (This should use the auto-initializer with default sources)
- Logo DCEG† (This should use the auto-initializer with default sources)
- Logo DCCPS† (This should use the auto-initializer with default sources)
- Logo Mypart† (This should use the auto-initializer with default sources)
-
NCI Extended Desktop No Search Field†
- Header Extended
- Default
- With Cta
- Dark
- Test Cases
- With CTA
- Default
- Variants
- Modifiers
-
Dark Theme
- Have both with and without Image variants (Dark, With Image)
- The current story is HORRIBLY named. (Dark, with Image is named "With Image")
- With Image, Alternating
- Light Theme is missing
- Have both components (Light and Dark, With Image, Alternating) on the page
-
Dark Theme
- Test Cases
We need to figure out what to do about this. It is not exactly a standalone component. It exists in the usa-footer. So we should probably consider deleting the documentation site page, or fixing this issue.
- NCI Banner
- Example without Language Toggle
- Should we have a Spanish example without language toggle?
- English Example with Language Toggle
- Spanish Example with Language Toggle
- Default (Filled)
- Variants
- Outline
- Outline, Primary
- Outline, Secondary
-
Outline, Inverse
- This needs to be updated to have a black background
- Unstyled
- Outline
- Modifers
- Test Cases
- Button element
- Anchor element
- Outline + modifiers
- Unstyled + modifiers
- NCI Big
- English Example†
- This is either:
- I can't see a difference between the two.
- Spanish Example
- We should make a Spanish example, as we have a test for a Spanish back to top on an English footer...
- English Example†
- Test Cases
- NCI Sidenav
- Test Cases
- NCI Sidenav
-
NCI Sidenav Level 1
- IDK what this test is really for that the others do not cover.
-
NCI Sidenav Level 2
- IDK what this test is really for that the others do not cover.
-
NCI Sidenav Level 3
- IDK what this test is really for that the others do not cover.
- NCI Sidenav Long Titles
-
NCI Sidenav Full
- Should probably rename this to "www example"
-
NCI Sidenav Level 1
- NCI Sidenav
This is another one of those "our very first component" and we should really re-evaluate some of our life choices. I dare say the component is kind of broken and we should look at patching or replacing some of the USWDS defaults. This should really have a modifier for size, Standard or Slim and a modifier for colors. The colors should probably behave like USWDS.
- Default
- this is not a story, it does exist, and probably should be replaced with NCI Standard Info.
- NCI Standard Info
- This does not have a story. It is a bland gray.
-
NCI Standard Info Initial†
- Technically this is the NCI Standard size modifier with the NCI Info color modifier.
-
NCI Standard Emergency Initial†
- Same comment as above
- NCI Slim Info
- NCI Slim Emergency
- Test Cases
-
NCI Slim Emergency With Close††
- This needs to be exampled some way with the NCI Slim Info. It is an option passed to the Javascript that enables the thing.
-
NCI Standard Emergency††
- this should be renamed to collapsed or something as that is what it is.
-
NCI Standard Emergency With Close††
- This needs to be exampled some way with the NCI Slim Info. It is an option passed to the Javascript that enables the thing.
- NCI Standard Emergency Expanded††
- NCI Standard Emergency Expanded With Close††
-
NCI Slim Info With Close††
- This needs to be exampled some way with the NCI Slim Info. It is an option passed to the Javascript that enables the thing.
-
NCI Standard Info††
- this should be renamed to collapsed or something.
-
NCI Standard Info With Close††
- This too needs some sort of way to show closable.
- NCI Standard Info Expanded††
- NCI Standard Info Expanded With Close††
-
NCI Slim Emergency With Close††
LEGEND
- *This class has no default yet
- †Storybook needs JS enabled.
- ††Story should be deleted once JS is enabled.