-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Docs: Svelte CSF snippets #29546
Docs: Svelte CSF snippets #29546
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit f922ed1. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
30 file(s) reviewed, 50 comment(s)
Edit PR Review Bot Settings | Greptile
```js filename="Page.stories.js" renderer="svelte" language="js" | ||
```svelte filename="Page.stories.svelte" renderer="svelte" language="js" tabTitle="Svelte CSF" | ||
<!-- TK: vet this against recommendation and apply it to the other languages (eg., ts-4-9, ts) --> | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note that TypeScript will complain here, because it doesn't know that this is doable, but it works fine at runtime.
@@ -48,7 +48,9 @@ Storybook for Svelte & Vite is a [framework](../../contribute/framework.mdx) tha | |||
|
|||
#### Automatic migration | |||
|
|||
When running the `upgrade` command above, you should get a prompt asking you to migrate to `@storybook/sveltekit`, which should handle everything for you. In case that auto-migration does not work for your project, refer to the manual migration below. | |||
{/* TK: Vet this for accuracy, the migration never prompted me to opt-in to the @storybook/sveltekit package, instead it updated the package version. Additionally the example refers to svelte-vite, not sveltekit */} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
skipping for now
Update your Storybook configuration file (i.e., `.storybook/main.js|ts`) to enable support for this format. | ||
|
||
{/* prettier-ignore-start */} | ||
|
||
<CodeSnippets path="main-config-csf-addon-register.md" /> | ||
<CodeSnippets path="main-config-svelte-csf-register.md" /> | ||
|
||
{/* prettier-ignore-end */} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is redundant with what is available at /addons/install-addons.mdx#manual-installation
.
I do not think we should set a precedent for including this every time we document the add
command, as that will balloon maintenance efforts.
…js/storybook into docs_adjust_svelte_snippets_v5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything is good on my side.
Massive work @jonniebigodes 👏👏👏
@JReinhold, thank you very much for the assistance and help on this pull request 🙏 ! |
…s_v5 Docs: Svelte CSF snippets (cherry picked from commit c7569a6)
With this pull request, the documentation was updated to contain the first batch of Svelte CSF snippets.
What was done:
native-format
snippetsChecklist for Contributors
Manual testing
docs_adjust_svelte_snippets_v5
web
reponpm run sync-docs
npm run dev
Documentation
MIGRATION.MD
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal
,ci:merged
orci:daily
GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli/src/sandbox-templates.ts
Make sure this PR contains one of the labels below:
Available labels
bug
: Internal changes that fixes incorrect behavior.maintenance
: User-facing maintenance tasks.dependencies
: Upgrading (sometimes downgrading) dependencies.build
: Internal-facing build tooling & test updates. Will not show up in release changelog.cleanup
: Minor cleanup style change. Will not show up in release changelog.documentation
: Documentation only changes. Will not show up in release changelog.feature request
: Introducing a new feature.BREAKING CHANGE
: Changes that break compatibility in some way with current major version.other
: Changes that don't fit in the above categories.@JReinhold, when you have a moment, can you fact-check this and provide some guidance on some of the items? They are tagged accordingly with comments. Thanks in advance.
Greptile Summary
This PR updates Storybook's documentation to modernize Svelte examples by replacing old native-format snippets with new Component Story Format (CSF) examples across multiple documentation files.
@storybook/addon-svelte-csf
package anddefineMeta
function