Open jonniebigodes opened 2 weeks ago
Ideally we should detect Svelte CSF files (*.stories.svelte
) and not show the Save from Controls bar at all. If that's not possible, then at least show a better error.
FYI In Svelte CSF 5, every story has an object at parameters.__svelteCSF
that can be used to detect if it's svelte CSF or not:
Describe the bug
When a user tries to use the Save from Controls feature in a Svelte project with template syntax, it throws a cryptic error message without any helpful information to the user when he attempts to use any of the workflow controls (e.g., Update Story, Save new Story). This issue is reproducible in the latest Storybook version and also in the latest pre-release version.
Below is a recording of the issue:
https://github.com/user-attachments/assets/49cf4879-8fca-4b32-8f72-309d5da61363
As an aside, the documentation will be updated to reflect this limitation. However, it would be ideal to turn off the feature for Svelte projects until it is fully supported to avoid confusion or provide a more informative error message to the user when the feature is not supported in the current context.
cc @JReinhold
Reproduction link
https://stackblitz.com/edit/github-vbubyc?file=src%2Fstories%2FButton.stories.svelte
Reproduction steps
Button.stories.svelte
)System
Additional context
No response