storybookjs/storybook

[Bug]: HMR issues on renaming stories

開放

#25,788 建立於 2024年1月29日

 (1 則留言) (1 個反應) (0 位負責人)TypeScript (10,058 個分叉)batch import
bughelp wantedsev:S3

倉庫指標

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

描述

Describe the bug

originally filed here

Project: MealDrop Version: 8.0.0-alpha.14 Bug/feedback:

When renaming the story file of which you are visiting, a lot of weird things happen, it's best described in a video:

https://github.com/storybookjs/storybook/assets/1671563/540e03b8-82bf-4893-a0e3-adfe8058cf3f

The issues which happen are: 1 - The story of which you renamed somehow changes order and goes to the bottom of the list (there is no storySort being used) 2 - An importers[path] is not a function error is flashed in the screen:

3 - The UI goes into a funky state where there's some sort of negative margin and the toolbar is unreachable (until you close the addon panel, which is not really closed)

To Reproduce

  1. Go to https://github.com/yannbf/mealdrop/tree/storybook/8.0.0
  2. Visit a story
  3. Rename its story file to something else (e.g. add an A at the end)

System

No response

Additional context

No response

貢獻者指南