Skip to content

Preview: Use width/height instead of min-* in CanvasWrap#35056

Merged
Sidnioulz merged 1 commit into
storybookjs:nextfrom
DevLikhith5:fix/canvas-wrap-firefox-esr-33743
Jun 5, 2026
Merged

Preview: Use width/height instead of min-* in CanvasWrap#35056
Sidnioulz merged 1 commit into
storybookjs:nextfrom
DevLikhith5:fix/canvas-wrap-firefox-esr-33743

Conversation

@DevLikhith5

@DevLikhith5 DevLikhith5 commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Fix full-height layout in Firefox ESR for the story preview area.

PR #33290 changed the CanvasWrap styled component from using width: 100%; height: 100% to min-width: 100%; min-height: 100%. In Firefox ESR, min-height: 100% does not properly fill the available space when the parent has a defined height, causing the preview area to collapse vertically.

Changes:

  • Reverted minWidth: '100%'width: '100%' and minHeight: '100%'height: '100%' in CanvasWrap

Fixes #33743

Manual testing

  • Open chromatic deployed instance in Firefox ESR
  • Check that viewport renders well
  • Enable a custom viewport and check there is no regression

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Improved preview canvas sizing behavior to ensure the component properly fills its container, delivering better layout consistency and responsive design.

Revert the change from PR storybookjs#33290 that switched from explicit
width/height to min-width/min-height, which broke full-height
layout in Firefox ESR.

Fixes storybookjs#33743
@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f520d928-7bfb-4f62-b9c8-feaac7d0c598

📥 Commits

Reviewing files that changed from the base of the PR and between 64ab797 and 2608c37.

📒 Files selected for processing (1)
  • code/core/src/manager/components/preview/utils/components.ts

📝 Walkthrough

Walkthrough

The preview canvas sizing behavior is adjusted in the CanvasWrap component by replacing minimum width and height constraints with explicit width and height properties set to 100%, altering how the component fills its container space.

Changes

Preview Canvas Sizing

Layer / File(s) Summary
CanvasWrap sizing properties
code/core/src/manager/components/preview/utils/components.ts
CanvasWrap replaces minWidth: '100%' / minHeight: '100%' with width: '100%' / height: '100%', changing the component's size constraints within its parent container.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Sidnioulz Sidnioulz requested a review from ghengeveld June 5, 2026 05:23
@Sidnioulz Sidnioulz added bug ci:normal Run our default set of CI jobs (choose this for most PRs). qa:skip Pull Requests that do not need any QA. labels Jun 5, 2026
@Sidnioulz Sidnioulz moved this to Empathy Backlog in Core Team Projects Jun 5, 2026
@Sidnioulz Sidnioulz self-assigned this Jun 5, 2026
@Sidnioulz Sidnioulz self-requested a review June 5, 2026 05:26
@Sidnioulz Sidnioulz changed the title CanvasWrap: Use width/height instead of min-width/min-height Preview: Use width/height instead of min-* in CanvasWrap Jun 5, 2026
Comment thread code/core/src/manager/components/preview/utils/components.ts
@Sidnioulz Sidnioulz merged commit d25d870 into storybookjs:next Jun 5, 2026
139 of 147 checks passed
@github-project-automation github-project-automation Bot moved this from Empathy Backlog to Done in Core Team Projects Jun 5, 2026
@github-actions github-actions Bot mentioned this pull request Jun 5, 2026
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-scan:human bug ci:normal Run our default set of CI jobs (choose this for most PRs). qa:skip Pull Requests that do not need any QA.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Bug]: Docs page not full height in Firefox ESR (140.7esr) after 10.2.x update

2 participants