Repository navigation
test(storybook): long-text and narrow-width SelectableCard stories - #14044
Conversation
Adds a Long Text story (long labels and descriptions that wrap, and one unbroken word that breaks across lines) and a Narrow Width story (cards at 120px, as in a side panel). Both carry the visual-baseline tag, so the visual gate covers wrapping and the selection ring at small sizes.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 5ae36ec |
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
Changes requested: the two stories look right, but the description still misstates their visual-gate impact and needs one edit before approval.
- The description says a
visual-baselinetag adds one default-theme key per story and that the visual plan gains two keys when the baseline is next refreshed, but the plan captures each tagged story in Neutral light and dark (.github/scripts/visual-gate/lib/plan.mjs:679-692), so the canonical plan gains four keys as soon as this merges and release checks list them as added until full-plan baseline maintenance accepts them; please reword both sentences.
No code change is needed. CI has not run on this head yet because the pull request is a draft.
Claims and files checked
Review mode: same-head; reason: none
- Live title "test(storybook): long-text and narrow-width SelectableCard stories": verified (the stories file adds Long Text and Narrow Width).
- No earlier SelectableCard story had long text or a narrow width, and the existing stories were single-select, multi-select, color-variants, with-nested-button and disabled: verified (base story exports; one-line labels; the narrowest card is 140px).
- The component is unchanged and no package code changes: verified (the stories file is the only changed path).
- A visual-baseline tag adds one default-theme key for the story: false (each tagged story adds a light and a dark key,
plan.mjs:679-692,plan.mjs:992-994). - Long Text shows two 260px cards whose text wraps, an unbroken word that breaks across lines, and one selected card: verified (story code; untruncated Text wraps with
break-word,packages/core/src/Text/text.stylex.ts:240-250). - Narrow Width shows two 120px cards in a column with one selected: verified (story code).
- Both stories use the same multi-select state as the existing stories: verified (the same Set toggle as the Multi-Select story).
- Both stories carry the visual-baseline tag, and their baselines come later through full-plan maintenance as for other newly tagged stories: verified (visual-gate README, "Coverage and results"; the tagged Disabled story has no baseline shot yet).
- Chromium renders in light, dark, probe and forced colors show no overflow, console error or missing ring: reported.
- The forced-colors (8/8) and audit (7/7) browser specs pass: reported (CI has not run at this head).
- No workflow changes: verified.
- The visual plan gains two default-theme keys when the baseline is next refreshed: false (four keys enter the canonical plan at merge;
gate.mjs:72,gate.mjs:235,plan.mjs:679-692). - Build, Storybook build, typecheck, Prettier and ESLint pass, and the visual plan command runs: reported.
- No changeset is needed: verified (
scripts/release/changeset-coverage.mjs:285-301treats private packages and stories as not shipped). - No public API, product behavior, visual direction or policy change: verified.
- Public text contains no internal context: verified.
- Overlap with #14031, #14029 and #14039: verified (two merged pull requests and one open issue).
- Rules changed since the earlier review (0): none.
- File:
apps/storybook/stories/SelectableCard.stories.tsx: clear; the finding is in the description only.
There was a problem hiding this comment.
Approved. CI has passed on this head.
The two stories match their description: Long Text's cards wrap long labels and break the unbroken word inside the card, Narrow Width stacks two 120px cards, and both join the canonical visual plan as four default-theme keys (light and dark per story) at merge, listed as added until baseline maintenance accepts them. No changes are needed.
Claims and files checked
Review mode: same-head; reason: none
- Live title "test(storybook): long-text and narrow-width SelectableCard stories": verified (the stories file adds Long Text and Narrow Width).
- No earlier SelectableCard story had long text or a narrow width: reported (the five earlier stories use one-line labels; the narrowest are Color Variants' 140px one-word cards).
- The component is unchanged and no package code changes: verified (the stories file is the only changed path).
- A
visual-baselinetag adds a story to the canonical plan as a light and a dark default-theme key: verified (.github/scripts/visual-gate/lib/plan.mjs:40,:679-693; visual gate README, "Coverage and results"). - Long Text shows two 260px cards whose long labels and descriptions wrap, one unbroken word that breaks across lines, and one selected card: verified (story code; untruncated Text wraps with
break-word,packages/core/src/Text/text.stylex.ts:240-250, and the Text reflow browser spec covers the inline case). - Narrow Width shows two 120px cards in a column with one selected: verified (story code).
- Both stories use the same multi-select state as the existing stories: verified (the same Set toggle as One Selected Card, Multi-Select and Color Variants).
- Both stories carry the visual-baseline tag, and their baseline images come later through full-plan maintenance: verified (no baseline change here; visual gate README).
- Chromium renders in light, dark, probe and forced colors show no console error, no horizontal overflow and the selection ring: reported.
- The forced-colors browser spec passes 8 of 8: verified (CI at this head); the audit browser spec passes 7 of 7: reported.
- No workflow changes: verified.
- The canonical visual plan gains four keys at merge and the release check lists them as added until baseline maintenance accepts them: verified (
lib/plan.mjs:679-693;lib/compare.mjs:125-128,:269-278). - Build, Storybook build, typecheck, Prettier and ESLint pass: verified (CI at this head); the visual plan command runs: reported.
- No changeset is needed: verified (
scripts/release/changeset-coverage.mjs:286-292treats the private Storybook app as not shipped). - No public API, product behavior, visual direction or policy change: verified.
- Public text contains no internal context: verified.
- Overlap with #14031, #14029 and #14039: verified (two merged pull requests and a closed issue).
- changed rules (0): none.
- File
apps/storybook/stories/SelectableCard.stories.tsx: clear.
…ht from one capture Lane 0's #14044 merged after capture run 46320468653, adding four SelectableCard keys (Long text, Narrow width). All eight keys are now accepted from main capture run 46325077823 (7955ed8), which holds both #14046 and #14044: the manifest is reset to main's and gate.mjs accept runs once per group.
CodeBunny on 8a8e0ac: in Narrow width only the descriptions wrap, and the Long text title ends in an unbroken word. gate.mjs accept is re-run from main's manifest and the same capture with that reason. Frames unchanged.
added (#14050) * test(visual): accept the probe Disabled SelectableCard and Neutral ThemeAddedVariant Card shots gate.mjs accept from main capture run 46320468653 (dea3ad6e) for the four keys #14046 added: core-selectablecard--disabled__probe-light/-dark and core-card--theme-added-variant__neutral-light/-dark. * test(visual): also accept #14044's SelectableCard shots; take all eight from one capture Lane 0's #14044 merged after capture run 46320468653, adding four SelectableCard keys (Long text, Narrow width). All eight keys are now accepted from main capture run 46325077823 (7955ed8), which holds both #14046 and #14044: the manifest is reset to main's and gate.mjs accept runs once per group. * test(visual): the #14044 accept record says what its frames show CodeBunny on 8a8e0ac: in Narrow width only the descriptions wrap, and the Long text title ends in an unbroken word. gate.mjs accept is re-run from main's manifest and the same capture with that reason. Frames unchanged.
Maintainer impact
SelectableCard had no story with long text and none at a narrow width, so a regression in how card text wraps, or in how the selection ring and padding look on a small card, had no story to show it and no visual-gate coverage. A maintainer changing Card, Text or SelectableCard could break those cases without a signal.
Intended invariant
The component itself is unchanged. The visual gate covers tagged Core stories (
.github/scripts/visual-gate/README.md, "Coverage and results"): avisual-baselinetag adds the story to the canonical plan in the default theme, as a light and a dark key.Change
apps/storybook/stories/SelectableCard.stories.tsxgains two stories:core-selectablecard--long-text): two 260px cards with long labels and descriptions that wrap; one label holds an unbroken word, which breaks across lines; one card is selected.core-selectablecard--narrow-width): two 120px cards in a column, as in a side panel; one is selected.Both use the same multi-select state as the existing stories and carry
tags: ['visual-baseline']. As with the other newly tagged stories, their baseline images are added through the visual gate's explicit full-plan maintenance, not in this pull request.Evidence
core-selectablecard--*listssingle-select,multi-select,color-variants,with-nested-buttonanddisabled).scrollWidthequalsclientWidth). The selected card shows its ring, and under forced colors its 2pxHighlightring.SelectableCardForcedColors.a11y.chromium.spec.ts(8/8) andSelectableCardAudit.a11y.chromium.spec.ts(7/7) pass against the new Storybook build.Scope
Components: SelectableCard (stories only)
Overlap checked: #14031, #14029, #14039 (#14031 tagged the Disabled story in the same file and is merged; #14029 is the merged forced-colors ring these stories also show; #14039 is the forced-colors follow-up issue, which changes no story)
Testing
pnpm build,pnpm storybook:build, and the Storybook typecheck (tsc --noEmit) pass; Prettier and ESLint are clean on the stories file.pnpm visual:planruns.node scripts/release/changeset-coverage.mjs pr: nothing here ships to consumers, so no changeset.