You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const config = {
stories: [
{
directory: '../src',
titlePrefix: 'Custom', // 👈 Configure the title prefix
},
],
};
The story will fail to render with "Didn't find 'some-story-id' in CSF file", if it's been written using Svelte CSF.
This happens because the indexer in this addon ignores that title prefix when generating story IDs, but the Storybook CSF processing in the browser does not ignore that title prefix, so the ID it is looking for will not match the IDs in the index.
This bug can probably be fixed by using the makeTitle function that is passed in the indexer options (second parameter) to the indexer function. That function can be used to generate titles automatically, also taking into account any user title specified.
Using makeTitle to fix this bug will likely also solve #129 .
The text was updated successfully, but these errors were encountered:
Describe the bug
Originally discussed at #120.
If a stories specifier uses the advanced pattern with a title prefix like this:
The story will fail to render with "Didn't find 'some-story-id' in CSF file", if it's been written using Svelte CSF.
This happens because the indexer in this addon ignores that title prefix when generating story IDs, but the Storybook CSF processing in the browser does not ignore that title prefix, so the ID it is looking for will not match the IDs in the index.
Steps to reproduce the behavior
Reproduction: https://github.com/mcmxcdev/storybookjs-addon-svelte-csf-120
Screenshots and/or logs
Additional context
This bug can probably be fixed by using the
makeTitle
function that is passed in the indexer options (second parameter) to the indexer function. That function can be used to generate titles automatically, also taking into account any user title specified.Using
makeTitle
to fix this bug will likely also solve #129 .The text was updated successfully, but these errors were encountered: