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

贡献者指南