Skip to content

Restore the iframe heights docs stories lost in the CSF migration - #2420

Merged
spaceninja merged 1 commit into
mainfrom
fix-docs-iframe-height
Aug 21, 2026
Merged

Restore the iframe heights docs stories lost in the CSF migration#2420
spaceninja merged 1 commit into
mainfrom
fix-docs-iframe-height

Conversation

@spaceninja

Copy link
Copy Markdown
Member

Overview

On docs pages, every story that renders in an iframe is clipped to 100px and scrolls
internally instead of sizing to its content — cards cut in half, text cut mid-sentence.
It affects thirty stories across thirteen files.

The .stories.mdx files set a per-story height on the docs block:

<Storyname="Basic"height="400px">

The CSF3 migration in #2405 did not carry that across, so those stories fall back to
Storybook's 100px default. One of them, Illustrations, was translated — but to
docs.story.height, which is not a parameter Storybook recognises, so it had no effect
either. Storybook 10 spells this parameters.docs.story.iframeHeight.

The values in this PR are the ones the .stories.mdx files used, recovered from the
commit before #2405. This restores the previous rendering rather than picking new numbers.

Two things deliberately left alone:

  • inline: false is untouched.Dependency modernization: Node 24, Vite, and Storybook 10 #2391 lists revisiting those as a follow-up, and it
    still wants doing — but it is a separate question. Some of these stories disable inline
    rendering for a reason that is now obsolete (the html-to-react bug Upgrade to Storybook 10 + Vite, and Twing 7 #2405 removed),
    while others do it so media queries resolve against the example's own viewport, which is
    still valid. Telling those apart changes rendering behaviour; this PR only fixes height.
  • The Illustrations parameter is removed rather than corrected. That story has never
    disabled inline rendering, so it has no iframe to size, and it already renders at full
    height. A valid-looking parameter that does nothing is worse than no parameter.

No changeset: only *.stories.js files change, and those are not in package.json's
files array, so nothing published is affected.

Screenshots

Testing

Run nvm use first — this needs Node 24.19.0. Then npm ci and npm start.

The quickest way to see the problem is to compare against
the current deploy of main, where each of
these examples is a short scrolling box.

  • Open Objects → Deck → Docs. The three examples (Basic, Alignment, Specifying
    Columns) should each show their cards in full, with no internal scrollbar and
    nothing cut off.
  • Scroll to the Horizontal Card example on the same page — it is the tallest, and
    should be fully visible too.
  • Open Objects → Container → Docs. Basic, Prose and Fill should each show their
    full example.
  • Open Components → Ground Nav → Docs. These are the tallest examples in the
    library; each should show the whole navigation without scrolling inside its box.
  • Open Components → Cloud Cover → Docs and check all five examples.
  • Open Objects → Page → Docs, Objects → Overview → Docs, Objects → Hype
    Group → Docs
    , Objects → List → Docs and Objects → Feature Group → Docs.
    Same expectation on each.
  • Open Components → Sky Nav → Docs and Components → Input → Docs (the Elastic
    Textarea example).
  • Open Design → Illustrations → Docs. The "Responsive fallback image" example
    should render at full height, as it does today — this one is not iframed, and the
    only change is removing a parameter that did nothing.
  • Sanity check that the examples still respond to their controls: on Objects → Deck
    → Columns
    , change the columns slider and confirm the layout updates within the
    example.

Every non-inline story on a docs page renders in a 100px iframe, so the
examples are clipped and scroll internally instead of sizing to their content.
The `.stories.mdx` files set a per-story height on the docs block:
<Story name="Basic" height="400px">
The CSF3 migration in #2405 did not carry that across. Thirty stories in
thirteen files lost their height and fell back to Storybook's 100px default.
One, Illustrations, was translated but to `docs.story.height`, which is not a
parameter Storybook recognises, so it had no effect either.
Storybook 10 spells this `parameters.docs.story.iframeHeight`. The values here
are the ones the `.stories.mdx` files used, recovered from the commit before
#2405, so this restores the previous rendering rather than picking new numbers.
Two notes:
- `inline: false` is left alone. Some of those stories disable inline rendering
for a reason that is now obsolete -- the `html-to-react` bug #2405 removed --
but others do it so media queries resolve against the example's own viewport,
which is still valid. Sorting out which is which is its own change; this only
fixes the height.
- The Illustrations parameter is removed rather than corrected. That story has
never disabled inline rendering, so it has no iframe to size, and it renders
at full height already. A valid-looking parameter that does nothing is worse
than none.
@netlify

netlifyBot commented Aug 21, 2026

Copy link
Copy Markdown

Deploy Preview for cloudfour-patterns ready!

NameLink
🔨 Latest commit1c27239
🔍 Latest deploy loghttps://app.netlify.com/projects/cloudfour-patterns/deploys/6a88c14f7d701d00089398b4
😎 Deploy Previewhttps://deploy-preview-2420--cloudfour-patterns.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@changeset-bot

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1c27239

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@spaceninja
spaceninja merged commit d537468 into mainAug 21, 2026
8 checks passed
@spaceninja
spaceninja deleted the fix-docs-iframe-height branch August 21, 2026 21:30
spaceninja added a commit that referenced this pull request Aug 24, 2026
The pre-#2405 MDX set `inline={false}` on this story and the CSF migration
did not carry it across -- the only `inline` attribute in the whole of the
old MDX, and the one genuine drop the #2428 sweep found.
No `iframeHeight` alongside it, matching the original: the component
measures ~45px against Storybook's 100px default, so this cannot reproduce
the clipping #2420 fixed.
Part of #2428
Sign up for freeto 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.

1 participant

@spaceninja