Open AndrewLeedham opened 2 years ago
@AndrewLeedham Yes, we're doing static analysis on the story files in storyStoreV7
mode. It's a breaking change, which is why it's behind an opt-in feature flag.
This is an interesting pattern -- basically a workaround for https://github.com/storybookjs/storybook/issues/9209
If we added that feature (API etc still TBD) would that be a suitable solution for you? cc @tmeasday
@shilman Presumably the static analysis is to speed up discovery for the sidebar, so you don't have to process all the stories on load? Curious what fields it looks at, assuming include/exclude
and title
?
Being able to hide things from the sidebar seems like it would resolve my issue yes, as Chromatic will still be able to find the stories but it won't clog things up on the actual storybook :)
@AndrewLeedham Yes, you can see the test cases here: https://github.com/storybookjs/storybook/blob/next/lib/csf-tools/src/CsfFile.test.ts
For the moment I think the workaround is to not use storyStoreV7
. Longer term, we'll need to come up with a better solution for this, possibly creating a tag system for stories so they can be used selectively in canvas / docs / tests.
@shilman Yeah my plan was to not use storyStoreV7
for now. Thanks :)
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
@shilman could another option be a global excludeStories
option, meaning it could be run as part of main.js
once, rather than statically analysed per story.
Is there any progress on this issue? I was able to find a workaround but it would be better if there was a documented way.
Describe the bug In Storybook 6.3 we are using the following
excludeStories
expression:This no longer works in 6.4 when using the experimental
storyStoreV7
feature. I can only assume it is related to https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#string-literal-titles, is metadata being pulled with static analysis now?To Reproduce I created a repro here: https://github.com/AndrewLeedham/storybook-exclude-stories-repro/tree/master I can't publish it to Chromatic because the build fails because of this issue.
System