Skip to content

Audit the CSF migration for dropped props, and the docs pages it left behind #2428

Description

@spaceninja

#2405 migrated 84 .stories.mdx files to CSF3 + .mdx with a purpose-written transformer. #2420 then found that thirty stories across thirteen files had silently lost their height prop and were rendering clipped to 100px — cards cut in half, text cut mid-sentence — and that one file had translated it to docs.story.height, which Storybook does not recognise, so it had no effect either.

#2420 fixed height because that is what the visible symptom pointed at. It explicitly did not check whether the transformer dropped other<Story> props, and that question is still open. This issue is for closing it, plus a second audit that working in the same files turned up.

Part 1: sweep every <Story> prop

Diff the <Story> attributes in the pre-#2405 MDX against what survived into CSF. The commit before #2405 is eb1bb81b; the migration landed in 96fd86e1.

Worth knowing that this defect class is invisible to CI. build-storybook passes, and the headless story sweep passes too, because something does render on those pages — just wrongly. Both defects #2405 shipped were caught by looking at the deploy preview, not by any check.

Candidate props to check for, beyond height:

  • inline
  • decorators
  • parameters
  • args / argTypes set on the story rather than the meta
  • name mismatches that would change a story's ID and break existing links

Outcome is either "nothing else was dropped," which is worth recording so nobody wonders again, or a list of further fixes.

Part 2: audit docs.story.inline: false

Fourteen files currently disable inline rendering. #2420 established that this is not one decision, so it wants auditing story by story rather than a blanket removal — and each change alters rendering:

  • Some disable it because of an html-to-react bug the comments cite. logo.stories.js is explicit about this. That reason is obsoleteUpgrade to Storybook 10 + Vite, and Twing 7 #2405 removed the library, and Storybook 10's HTML renderer inlines natively.
  • Others do it so media queries resolve against the example's own viewport rather than the docs page. overview.stories.js says exactly this. That reason is still valid, and applies to anything demonstrating breakpoint behaviour — Deck's o-deck--3-column@m, Container, Ground Nav.

The fourteen:

src/objects/page/page.stories.js
src/objects/feature-group/feature-group.stories.js
src/objects/container/container.stories.js
src/objects/list/list.stories.js
src/objects/deck/deck.stories.js
src/objects/overview/overview.stories.js
src/objects/hype-group/hype-group.stories.js
src/components/cloud-cover/cloud-cover.stories.js
src/components/input/input.stories.js
src/components/logo/logo.stories.js
src/components/icon/icon.stories.js
src/components/sky-nav/sky-nav.stories.js
src/components/ground-nav/ground-nav.stories.js
src/vendor/wordpress/utilities.stories.js

(#2391 records this as twelve files; it is fourteen as of 0b1748c6.)

The token pages have the same drift problem — see #1143

This originally carried a third part, about the nine design token pages duplicating their table markup. That is already #1143, open since 2021 and filed when the Theo → Style Dictionary switch turned generated story files into hand-maintained ones. Removed from here rather than duplicated; #1143 is the better home and carries history this issue does not, including the JSX errors that blocked an earlier attempt.

The connection is worth recording on both, though: #2424 removed a width: 10% that all nine pages carried, which was breaking token names mid-word. It survived for years because there is nowhere to fix it once — sizes.mdx, motion.mdx and font.mdx each define their owngenerateTokenTable (motion's with a different signature), and the other six write the markup inline. So #1143 is not only a tidiness question; the duplication is what let a visible rendering defect persist.

Why this is not part of #2391 item 6

Item 6 removes Gulp — build tooling. None of the above is build tooling, and #2391 will close when item 6 lands, so these need a home that outlives it.

Related: #2391, #2405, #2420, #2424, #1143.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions