storybookjs/storybook

[Bug]: HMR issues on renaming stories

Open

#25,788 opened on Jan 29, 2024

View on GitHub
 (1 comment) (1 reaction) (0 assignees)TypeScript (10,058 forks)batch import
bughelp wantedsev:S3

Repository metrics

Stars
 (89,909 stars)
PR merge metrics
 (Avg merge 7d 22h) (184 merged PRs in 30d)

Description

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

Contributor guide