Manager: Restore Docs canvas full height in Firefox ESR#35058
Manager: Restore Docs canvas full height in Firefox ESR#35058HumphreySun98 wants to merge 1 commit into
Conversation
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe ChangesPreview Grid Sizing
🎯 2 (Simple) | ⏱️ ~10 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. Comment |
|
Thanks Danger! Fixed the title format. I can't add the labels myself as a first-time contributor — could a maintainer please add:
Happy to address any review feedback. Thanks! |
Closes storybookjs#33743. PR storybookjs#33290 changed `CanvasWrap`'s `width/height: 100%` to `minWidth/minHeight: 100%` as part of the viewports tool redesign. Firefox ESR 140.7+ does not resolve `min-height: 100%` on a `display: grid` element the same way Chromium does, so the Docs canvas collapses to ~100px and the preview becomes unusable in that browser. The sibling `IframeWrapper` in the same file has always used `width/height: 100%` for the same purpose, so this change restores symmetry with that component while fixing Firefox ESR. The reporter's bisect in the issue isolated the same lines. Verified by reading the bisect in storybookjs#33743 and the diff in storybookjs#33290; I do not have Firefox ESR locally — visual confirmation in FF ESR is left to Chromatic / a maintainer with that browser.
0e1c16d to
efe089f
Compare
|
Thanks for your PR @HumphreySun98! Unfortunately, #35056 was open just before yours to address the same issue with the same fix. To limit the cost of review, we'll close this PR as duplicate. Feel free to pick another issue to work on though! Thanks for your understanding. |
Closes #33743
What I did
PR #33290 (Viewports tool redesign) changed
CanvasWrapincode/core/src/manager/components/preview/utils/components.tsfromwidth/height: 100%tominWidth/minHeight: 100%. Firefox ESR 140.7+ does not resolvemin-height: 100%on adisplay: gridelement the same way Chromium does, so since Storybook 10.2.x the Docs canvas collapses to ~100px in Firefox ESR and the preview becomes unusable.This change replaces the two
min-*values with explicitwidth/height: 100%, matching the siblingIframeWrapperin the same file (which has always usedwidth/height: 100%for the same grid-container purpose). The reporter (@mihkeleidast) isolated the same lines in their bisect comment.Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Viewport.stories.tsxadded in Core: Redesign and refactor Viewports tool #33290No additional test was added because this is a CSS-only revert; the existing visual-regression pipeline (Chromatic) should catch any layout regression on other browsers.
Manual testing
next, run a Storybook sandbox:next(no visual regression on browsers that were not affected).Documentation
Suggested label:
bug.Summary by CodeRabbit