Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #200
We can't and shouldn't "precombine" tags in the indexer, we should just pass them in, making sure they are in the right order. Storybook will internally combine the tags correctly, with the project-level tags.
Consider the following example:
['dev', 'test']
(this is the default)['!dev', '!test', '!autodocs']
(disable everything)['test', 'autodocs']
(enable tests and docs for this specific story, still keeping sidebar disabled)If the indexer combines the meta and story tags with
combineTags()
, they'll end up as['test', 'autodocs']
('!dev'
will be omitted completely, because it's not enabled). Then this gets passed to Storybook, which combines them with project-level tags, resulting in['dev', 'test', 'autodocs']
. This is wrong,'dev'
should not be there as it was disabled at the meta-level, but Storybook doesn't know that because the indexer already omitted'!dev'
.If we instead don't combine anything and let Storybook do it with the project level tags, it will get the following series:
['dev', 'test', '!dev', '!test', '!autodocs', 'test', 'autodocs']
. Parsing these sequentially will yield the correct result:['test', 'autodocs']
📦 Published PR as canary version:
4.1.7--canary.206.e4feeae.0
✨ Test out this PR locally via:
npm install @storybook/addon-svelte-csf@4.1.7--canary.206.e4feeae.0 # or yarn add @storybook/addon-svelte-csf@4.1.7--canary.206.e4feeae.0
Version
Published prerelease version:
v5.0.0-next.3
Changelog
💥 Breaking Change
@storybook/docs-tools
dependency #190 (@JReinhold)🐛 Bug Fix
autodocs
tag issue and extractingrawCode
#201 (@xeho91)Authors: 4