refactor(storybook): rationalize sidebar taxonomy and prune variants#1395
Open
danyelf wants to merge 3 commits into
Open
refactor(storybook): rationalize sidebar taxonomy and prune variants#1395danyelf wants to merge 3 commits into
danyelf wants to merge 3 commits into
Conversation
Reorganize storybook into 4 top-level buckets and prune variant
explosions across primitive components.
Sidebar shape:
- Diffs/{Charts, Results}/<check-type> (Forms bucket removed)
- Lineage/LineageCanvas/{CllExperience, ScaleTests}/...
- Lineage/NodeView/{NodeView, LineageTab}
- Checks/* absorbs former App, Editor, Summary, Timeline singletons
- Primitives/* (DiffPrimitives split reverted; merged back)
Story prunes (rely on argType controls instead of per-variant stories):
- SquareIcon 13->3, DataTypeIcon 12->2 (keep AllCategories table)
- ScreenshotBox 9->2, Split 12->4, DropdownValuesInput 16->3
- ExternalLinkConfirmDialog 13->5, MarkdownContent 18->2
- EmptyState 17->5, Toaster 15->3
- DiffText 16->3, RunStatusBadge 12->3
- TimelineEvent 18->9 (constrained by visual.ts regression test IDs)
- EnvInfo 10->7
Drop tags: ["autodocs"] from all stories. The per-component Docs page
duplicated the canvas, amplified Vite cold-start cost, and the
docs-loading smoke loop in verify-ui-stories.visual.ts is replaced by
direct story-ID smoke tests.
Delete HistogramDiffForm + TopKDiffForm stories (broken in storybook —
require a LineageGraphContext that the mocks don't fully satisfy).
Rename HistogramResultView -> HistogramDiffResultView (filename now
matches the exported component).
Net: 428 -> 244 stories.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Danyel Fisher <danyel@gmail.com>
The earlier prune dropped DescriptionChanged, NameChanged, PresetApplied, CommentFromOtherUser, ActorWithoutFullname, and ActorWithoutName, but TimelineEvent.test.tsx imports them via composeStories() as test fixtures. Restoring the six story exports so the unit tests compile and keep their behavioral coverage of event-type rendering and actor fallbacks. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Danyel Fisher <danyel@gmail.com>
Contributor
Author
|
Responses to a self-review:
The page did not render -- it showed an internal error that the LineageGraphContext mock wasn't working. I'd add ot that the forms themselves are barely load-bearing; they're not the pieces I'm most worried about inspecting.
Because we've had many broken stories in the test without actually turning this red, I'm not sure that it was doing what we wanted it to. I'm ok restoring it (and the autodocs), but I'd like to do so with intent. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR checklist
What type of PR is this?
refactor— storybook-only; no product code or user-facing behavior changes.What this PR does / why we need it:
Storybook had grown to 16 top-level folders and ~428 stories, with two competing taxonomies (
Visualizations/*vs top-levelSchema/,Editor/,Lineage/), singleton folders forApp/Editor/Schema/Summary/Timeline/Data, and a large variant explosion across primitives (EmptyState had 17, Toaster had 15, SquareIcon had 13 — most just demonstrating prop values already covered by argType controls). Finding features in the sidebar was hard.This PR reorganizes the sidebar into 4 top-level buckets and prunes variant-explosion files down to a
Default(with controls) plus the compositions that actually demonstrate something controls can't show.Final sidebar shape:
Notable prunes (16 → 3 pattern, with controls + compositions):
Other cleanup:
tags: ["autodocs"]from every story file. The autodocs page duplicated the canvas and slowed Vite cold-start.HistogramDiffForm+TopKDiffFormstories — broken (require aLineageGraphContextthe storybook mocks don't satisfy).HistogramResultView.stories.tsx→HistogramDiffResultView.stories.tsx(file now matches the exported component).verify-ui-stories.visual.ts(would have broken when autodocs was removed) to load story IDs directly.Net: 428 → 244 stories.
Which issue(s) this PR fixes: N/A
Special notes for your reviewer:
TimelineEvent.visual.ts(Playwright visual regression) and 6 more are consumed byTimelineEvent.test.tsxviacomposeStories()as unit-test fixtures.pnpm --filter @datarecce/storybook exec tscare MUI-augmentation drift, not regressions — they exist onmainand are fixed by a possible follow-up tsconfig PR. Canonicalcd js && pnpm type:checkpasses clean.Does this PR introduce a user-facing change?:
NONE