Skip to content

Render the Logo and Input stories inline again - #2449

Merged
spaceninja merged 1 commit into
mainfrom
inline-logo-and-input-stories
Aug 24, 2026
Merged

Render the Logo and Input stories inline again#2449
spaceninja merged 1 commit into
mainfrom
inline-logo-and-input-stories

Conversation

@spaceninja

@spaceninjaspaceninja commented Aug 24, 2026

Copy link
Copy Markdown
Member

Overview

Two files disabled inline story rendering for reasons that no longer hold, both traceable to the same removed library. This is the documented half of #2428's Part 2 — the other eleven locations either have a reason that still applies or no recorded reason at all, and are left alone.

Logo's comment names the culprit: html-to-react#144. Storybook 6 used that library to convert story HTML into React elements, and it dropped CSS custom properties from inline styles — which is exactly how Logo works, setting --logo-align, --logo-justify and --logo-scale via a style attribute on the wrapper. Input's comment describes a different symptom, "React syncs all their properties" between identical input elements in the same file, but that can only happen if React is managing those DOM nodes, which required the same conversion step.

Both mechanisms are gone. html-to-react is absent from node_modules and from the lockfile as of #2405, and the Storybook 10 HTML renderer assigns innerHTML — there is no HTML-to-React step left anywhere in @storybook/html or @storybook/addon-docs. Verified against the installed packages rather than inferred from the upgrade.

One consequence worth flagging rather than burying: Elastic Textarea's iframeHeight: '250px' goes too. With the story rendering inline there is no iframe to size, so keeping it would leave exactly the kind of valid-looking-but-inert parameter #2420 removed from Illustrations for the same reason. If a reviewer would rather that story kept its own frame, the fix is to restore inline: false on that story alone rather than to keep the height.

Screenshots

Testing

Both pages should now render their examples directly in the docs page rather than in scrollable frames. The specific things the old workarounds were protecting:

  • Open the deploy preview, go to Components → Logo and the Docs tab. The Basic Options example should show the logo at its normal size.
  • In the Controls panel for that story, change align to start and then end. The logo should visibly move within its box. Then change justify the same way, and set scale to 0.5 — the logo should shrink. This is the behaviour the old library broke, so if any of these controls do nothing, this PR is wrong.
  • Check the Before Alignment and After Alignment examples on the same page still show their side-by-side comparison.
  • Go to Components → Input and the Docs tab. Text Elements, Select Element and Elastic Textarea should each render in full, with no clipping and no internal scrollbars.
  • Compare Text Elements against the production library: each input should keep its own type, placeholder and value. If two inputs that should differ now look identical, that is the property-syncing problem returning.
  • Type several lines into the Elastic Textarea example. It should grow to fit as you type, and the page should reflow around it rather than the box scrolling internally.

Both files disabled inline rendering for reasons that no longer exist, and
both trace to the same removed library. Logo's comment names it: html-to-react,
which Storybook 6 used to convert story HTML into React elements, dropped CSS
custom properties from inline styles -- and Logo sets --logo-align,
--logo-justify and --logo-scale that way. Input's comment describes React
syncing properties between identical input elements, which only happens if
React is managing those nodes, which required the same conversion.
html-to-react is gone from node_modules and the lockfile as of #2405, and the
Storybook 10 HTML renderer assigns innerHTML with no HTML-to-React step
anywhere in @storybook/html or addon-docs. Neither mechanism can apply.
Elastic Textarea's iframeHeight goes too: with the story rendering inline
there is no iframe to size, and a valid-looking parameter that does nothing
is worse than none.
Part of #2428
@changeset-bot

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 6346b90

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

@netlify

netlifyBot commented Aug 24, 2026

Copy link
Copy Markdown

Deploy Preview for cloudfour-patterns ready!

NameLink
🔨 Latest commit6346b90
🔍 Latest deploy loghttps://app.netlify.com/projects/cloudfour-patterns/deploys/6a8c84fc153dc500085a98be
😎 Deploy Previewhttps://deploy-preview-2449--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.

@spaceninja
spaceninja merged commit 9fe6bbf into mainAug 24, 2026
8 checks passed
@spaceninja
spaceninja deleted the inline-logo-and-input-stories branch August 24, 2026 18:03
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