Skip to content

feat: updated storybook stories#7504

Merged
speaker-ender merged 3 commits intomainfrom
feat/updated-storybook-stories
Mar 3, 2026
Merged

feat: updated storybook stories#7504
speaker-ender merged 3 commits intomainfrom
feat/updated-storybook-stories

Conversation

@speaker-ender
Copy link
Contributor

@speaker-ender speaker-ender commented Feb 26, 2026

Ticket []

Description Of Changes

Adding more storybook stories to fidesui with the following goals:

  • Documenting the current state of components exported from fidesui
  • Allowing chromatic to catch visual changes when updating components in fidesui
  • Enabling discoverability and configuration of components in storybook before using in production applications
  • Make default component props more visible so that gaps can be filled in and improve DX

Implementation notes:

  • All components tested in stories are imported from the index.tsx file when possible. The reason is that we want to represent components in the same way that a user of the package would see.
  • Primary stories are for showing the default state and the minimum required arguments for displaying the component. They are also for allowing configuration of the component in storybook via controls.
  • Non-Primary stories are for static visual examples. Configuration through controls are discouraged and the goal is static representations.
  • Types in stories should be derived from the available components/types in fidesui. We want to avoid relying on internal ant types/code as much as possible to avoid extra work.

This also adds the a11y plugin to storybook for more comprehensive accessibility testing.

Note: this is a work in progress and there will need to be further refinements made to stories on an ongoing basis

Code Changes

Steps to Confirm

  1. Confirm that storybook builds and runs without issue
  2. Verify that there are no broken stories
  3. Verify that all components tested are imported from index instead of directly from ant
  4. Verify that styles are being inherited from fidesui and aren't using ant defaults

Pre-Merge Checklist

  • Issue requirements met
  • All CI pipelines succeeded
  • CHANGELOG.md updated
    • Add a db-migration This indicates that a change includes a database migration label to the entry if your change includes a DB migration
    • Add a high-risk This issue suggests changes that have a high-probability of breaking existing code label to the entry if your change includes a high-risk change (i.e. potential for performance impact or unexpected regression) that should be flagged
    • Updates unreleased work already in Changelog, no new entry necessary
  • UX feedback:
    • All UX related changes have been reviewed by a designer
    • No UX review needed
  • Followup issues:
    • Followup issues created
    • No followup issues
  • Database migrations:
    • Ensure that your downrev is up to date with the latest revision on main
    • Ensure that your downgrade() migration is correct and works
      • If a downgrade migration is not possible for this change, please call this out in the PR description!
    • No migrations
  • Documentation:
    • Documentation complete, PR opened in fidesdocs
    • Documentation issue created in fidesdocs
    • If there are any new client scopes created as part of the pull request, remember to update public-facing documentation that references our scope registry
    • No documentation updates required

@vercel
Copy link
Contributor

vercel bot commented Feb 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
fides-plus-nightly Ignored Ignored Preview Mar 2, 2026 5:29pm
fides-privacy-center Ignored Ignored Mar 2, 2026 5:29pm

Request Review

@speaker-ender speaker-ender force-pushed the feat/updated-storybook-stories branch 3 times, most recently from f7e4337 to 9ff173a Compare March 2, 2026 16:49
chore: even more stories

chore: more stories and refinements

chore: even more components

chore: linting

chore: a lot more stories

chore: lint

chore: more stories

feat: rough dark mode support

chore: more stories

lots of clean ups and additions

chore: linting

feat: sorted navigation

feat: table args

chore: clean ups

chore: more storeies and refactors

chore: more storybook

chore: message stories
@speaker-ender speaker-ender force-pushed the feat/updated-storybook-stories branch from 5c6fbed to b266c0c Compare March 2, 2026 17:11
@speaker-ender speaker-ender marked this pull request as ready for review March 2, 2026 17:11
@speaker-ender speaker-ender requested a review from a team as a code owner March 2, 2026 17:11
@speaker-ender speaker-ender requested review from lucanovera and removed request for a team March 2, 2026 17:11
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 2, 2026

Greptile Summary

This PR adds comprehensive Storybook stories for fidesui components to improve documentation, enable visual regression testing with Chromatic, and enhance component discoverability. The implementation includes the @storybook/addon-a11y addon for accessibility testing.

Key Changes:

  • Added 30+ new story files covering typography, data entry, data display, feedback, and navigation components
  • Created reusable content constants and control helpers in clients/fidesui/src/stories/utils/
  • Configured story sorting in Storybook for better organization
  • Updated existing stories to use shared utilities and follow consistent patterns

Issues Found:

  • Empty dataIndex in Table Empty story should be "username"
  • Paragraph.stories.tsx imports GetProps from antd instead of from fidesui index, violating the PR's stated goal of avoiding internal Ant Design types

Note on PR Size:
This PR includes 41 files, which exceeds the repository's guideline of 15 files per PR. However, given the nature of the work (adding individual story files for multiple components) and that this is documented as work in progress, this may be acceptable as a one-time exception for this Storybook documentation effort.

Confidence Score: 4/5

  • This PR is safe to merge after fixing the empty dataIndex bug in Table.stories.tsx
  • Score reflects one syntax error (empty dataIndex) that needs fixing, and one style inconsistency (import from antd). The PR adds documentation/testing infrastructure rather than production code, reducing risk. The large file count is justified by the nature of the work.
  • Pay attention to clients/fidesui/src/components/data-display/Table.stories.tsx for the empty dataIndex fix

Important Files Changed

Filename Overview
clients/fidesui/package.json Added @storybook/addon-a11y dependency for accessibility testing
clients/fidesui/.storybook/main.ts Configured a11y addon in Storybook setup
clients/fidesui/src/components/data-display/Table.stories.tsx Added Table stories with default and empty states; Empty story has empty dataIndex that should be "username"
clients/fidesui/src/components/typography/Paragraph.stories.tsx Added Paragraph typography stories; imports GetProps from antd instead of fidesui index
clients/fidesui/src/components/data-entry/Form.stories.tsx Updated Form stories to use Select from index instead of CustomSelect, added validation examples
clients/fidesui/src/stories/utils/content.ts Added shared content constants for stories (lorem text, menu names, dates)
clients/fidesui/src/stories/utils/controls.tsx Added reusable icon control helper for Storybook

Last reviewed commit: b266c0c

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

41 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

Copy link
Contributor

@kruulik kruulik left a comment

Choose a reason for hiding this comment

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

Excellent! The storybook utilities are great.

@speaker-ender speaker-ender added this pull request to the merge queue Mar 3, 2026
Merged via the queue into main with commit 789ec53 Mar 3, 2026
42 of 45 checks passed
@speaker-ender speaker-ender deleted the feat/updated-storybook-stories branch March 3, 2026 22:02
mfbrown pushed a commit that referenced this pull request Mar 12, 2026
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.

2 participants