Skip to content

UI docs storybook#147

Merged
Gbangbolaoluwagbemiga merged 13 commits intoHyperSafeD:mainfrom
clintjeff2:ui-docs-storybook
Feb 26, 2026
Merged

UI docs storybook#147
Gbangbolaoluwagbemiga merged 13 commits intoHyperSafeD:mainfrom
clintjeff2:ui-docs-storybook

Conversation

@clintjeff2
Copy link
Copy Markdown
Contributor

@clintjeff2 clintjeff2 commented Feb 26, 2026

Add UI Component Documentation with Storybook

Closes #122

Summary

Set up Storybook to catalog and document all reusable React components in the Sanctifier frontend. Every component now has a dedicated .stories.tsx file with multiple usage variants and auto-generated docs.

What changed

Area Files
Storybook config .storybook/main.ts, .storybook/preview.ts
Package manifest package.json — added Storybook scripts and devDependencies
Component stories CallGraph.stories.tsx, CodeSnippet.stories.tsx, FindingsList.stories.tsx, SanctityScore.stories.tsx, SeverityFilter.stories.tsx, SummaryChart.stories.tsx, ThemeToggle.stories.tsx

Components documented

Component Stories Key variants
CallGraph 4 Default graph, empty state, functions-only, with severity rings
CodeSnippet 4 Plain code, highlighted line, single line, empty
FindingsList 4 All severities, critical-only filter, no results, empty list
SanctityScore 5 Perfect (A), Grade A/B/C, Grade F
SeverityFilter 3 All selected, critical selected, medium selected
SummaryChart 4 Balanced distribution, critical-heavy, no findings, low-only
ThemeToggle 1 Default (interactive toggle)

How to run

cd frontend
npm install
npm run storybook

Storybook will be available at http://localhost:6006.

How to build (static export)

npm run build-storybook

Output is written to frontend/storybook-static/.

Proof of successful build

image

#Call Graph
Screenshot from 2026-02-26 04-00-41

#Code Snippet
Screenshot from 2026-02-26 04-00-48

#Finding List
Screenshot from 2026-02-26 04-00-55

#Sanctity Score
Screenshot from 2026-02-26 04-01-01

#Severity Filter
Screenshot from 2026-02-26 04-01-23

#Summary Chart
Screenshot from 2026-02-26 04-01-31

#Theme Toggle
Screenshot from 2026-02-26 04-01-45

#Build Succes
Screenshot from 2026-02-26 04-02-19

@Gbangbolaoluwagbemiga Gbangbolaoluwagbemiga merged commit c690d19 into HyperSafeD:main Feb 26, 2026
@clintjeff2
Copy link
Copy Markdown
Contributor Author

@Gbangbolaoluwagbemiga please leave me a warm review.

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.

docs: Add UI component documentation in Storybook

2 participants