storybookjs/storybook

[Bug]: Docs story wrapping issue with fixed positioned elements

開放

#23,586 建立於 2023年7月25日

 (17 則留言) (2 個反應) (1 位負責人)TypeScript (10,058 個分叉)batch import
has workaroundhelp wantedsev:S3upgrade:7.1

倉庫指標

星標
 (89,909 顆星)
PR 合併指標
 (平均合併 7天 22小時) (30 天內合併 184 個 PR)

描述

Describe the bug

Positioning in Docs page is broken for elements with fixed positioning.

Examples: Working deployment (7.0.6): https://storybook-7-0-6-reproduction.surge.sh/?path=/docs/uicomponents-date-picker-date-range--docs

Issue (7.1.0): https://storybook-7-1-0-reproduction.surge.sh/?path=/docs/uicomponents-date-picker-date-range--docs

image

Also found another comment here describing the same issue: https://github.com/storybookjs/storybook/issues/16774#issuecomment-1648367974

To Reproduce

Follow this reproduction link: https://codesandbox.io/p/sandbox/storybook-7-0-6-7-1-0-docs-issue-vkvwwy?file=%2Fpackage.json%3A21%2C27

You can switch the version 7.1.0 to 7.0.6 to reproduce this issue.

System

System:
    OS: Linux 5.15 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
    CPU: (2) x64 AMD EPYC
  Binaries:
    Node: 16.17.0 - /usr/local/bin/node
    Yarn: 3.6.1 - /usr/local/bin/yarn
    npm: 8.15.0 - /usr/local/bin/npm
  npmPackages:
    @storybook/addon-essentials: 7.1.6 => 7.0.6 
    @storybook/addon-interactions: 7.1.6 => 7.0.6 
    @storybook/addon-links: 7.1.6 => 7.0.6 
    @storybook/addons: 7.1.6 => 7.0.6 
    @storybook/react: 7.1.6 => 7.0.6 
    @storybook/react-vite: 7.1.6 => 7.0.6

Additional context

Seems in <7.1.0 zoom was used, which was changed to transform and scale making this break 🤔

貢獻者指南