Skip to content

Review 5490

Cindy Zhang edited this page Aug 26, 2026 · 1 revision

Review 5490 — docs(AspectRatio): fix @example block that breaks Storybook autodocs

josephfarina · internal · #5490 · approved 2026-08-25, auto-merge armed

Head 9f12893d2193cb874724a4195c668e44fb07f960.

The stated problem does not reproduce

The body claims the // comments and blank line inside the @example fence break autodocs so "the rest of the example renders as raw text". Storybook's props table never reads that JSDoc: apps/storybook/stories/AspectRatio.stories.tsx:84 sets ratio's description by hand, and a manual argTypes description overrides docgen entirely.

Rendered before and after are byte-identical — frames captured against the deployed previews for pr/5488 (AspectRatio.tsx as on main) and pr/5490, both opened. Both render ratio* | The aspect ratio as width/height (e.g., 16/9 = 1.777...) | number, no <pre> in either.

Confirmed a second way: grep found the override string verbatim in the story source and in the built AspectRatio.stories-*.js.

What is left is real and small

The example reads better in a source file and an IDE tooltip. Audience: one person, next time they open AspectRatio.tsx. Approved on that basis, with the rationale corrected in the comment.

Not blocking: it adds a third copy of the responsive-override guidance — AspectRatio.doc.mjs already carries it in docs, docsZh and docsDense, and #5413 was rewriting that exact line at the same time. Inline left.

Risk class: low-risk. Two probes banked: autodocs-prop-description.cjs, autodocs-page-dump.cjs — both work against any deployed Storybook, so this claim class needs no local build again.

Clone this wiki locally