forked from storybookjs/addon-svelte-csf
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Continuation of experimental support for Svelte v5
#1
Draft
xeho91
wants to merge
18
commits into
tsar-boomba:main
Choose a base branch
from
xeho91:support-svelte-v5
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced May 6, 2024
xeho91
commented
May 7, 2024
xeho91
commented
May 7, 2024
v5
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is an attempt to fully support Svelte
v5
.I did not consider supporting the legacy
v4
.I'm not sure if we should do it(?). AFAIK, if anyone uses legacy features, they will still work in Svelte
v5
. However as for this addon, I think it's best to migrate everything - to using runes & snippets. And I meant for what is being internally used there. For example the componentsTemplate
andStory
.For this reason, I've removed deprecated methods and properties, and used Svelte runes whenever possible.
Removed (breaking changes)
Meta
component and the codebase (especially in parser) which were related to itcollect-stories.ts
&extract-stories.ts
Issues
render
fromsvelte/render
instead ofmount
- I'm not sure how to deal with this one yet. Perhaps using environment variableTEST
?setContext
on the server side - if we used' therender
instead ofmount
, it would break AFAIK.Actions
tab doesn't work, I couldn't figure out whether is related to the breaking change thaton:*
should be replaced withon*
(removed colon)Typings forargs
used in{#snippet children(args)}
- no idea yet how to crack this oneSetting thelayout
in export meta parameters is broken, I can'tcenter
while testing it on my personal side projectNew features
<Story />
and &<Template />
componentstyped(meta)
to boost TypeScript experience - heavily inspired by Export typed Story and Template components storybookjs/addon-svelte-csf#155What I haven't done yet