Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vite does not show a spinner while loading first story #20250

Closed
tmeasday opened this issue Dec 14, 2022 · 3 comments
Closed

Vite does not show a spinner while loading first story #20250

tmeasday opened this issue Dec 14, 2022 · 3 comments
Assignees

Comments

@tmeasday
Copy link
Member

No description provided.

@tmeasday tmeasday converted this from a draft issue Dec 14, 2022
@tmeasday tmeasday self-assigned this Dec 14, 2022
@tmeasday tmeasday moved this to In Progress in Core Team Projects Dec 14, 2022
@tmeasday
Copy link
Member Author

tmeasday commented Dec 14, 2022

So the issue appears to be that it takes a long time to fetch the project annotations, for whatever reason [1]. We should probably just set the view to showPreparingStory before the annotations have even loaded? -- the problem here is that we don't know if the first entry is a story or a doc (in which case we'd prefer showPreparingDocs) until we load the index, which happens after the annotations.

Perhaps we should reverse that and load the index first?

Image

[1] I think in the example I am looking at (Inkline), that's because the preview file loads a barrel file with all the components:

https://github.com/tmeasday/inkline/blob/ec9cc9a3fa353270889fc1488d06a641ec0c00ed/.storybook/preview.js#L4

@tmeasday
Copy link
Member Author

  • Load index in parallel to preview.js
  • Show the preview compiling bar while waiting on index.

@shilman
Copy link
Member

shilman commented Jan 18, 2023

Boo-yah!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.0-beta.30 containing PR #20425 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb@next upgrade --prerelease

Closing this issue. Please re-open if you think there's still more to do.

@shilman shilman closed this as completed Jan 18, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Core Team Projects Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants