Skip to content

Docs: Snippet fixes for supported frameworks#33676

Merged
jonniebigodes merged 2 commits into
nextfrom
docs_fix_svelte_snippets
Jan 27, 2026
Merged

Docs: Snippet fixes for supported frameworks#33676
jonniebigodes merged 2 commits into
nextfrom
docs_fix_svelte_snippets

Conversation

@jonniebigodes
Copy link
Copy Markdown
Contributor

@jonniebigodes jonniebigodes commented Jan 27, 2026

Closes #

What I did

With this pull request, the examples for our supported frameworks were updated to address inconsistencies, typos and other issues that prevented them from rendering properly.

What was done:

  • First iteration and adjustements to the Svelte, Vue and Angular examples for inconsistencies

Checklist for Contributors

Testing

NOT required

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

NOT required

Caution

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/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.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook publish.yml --field pr=<PR_NUMBER>

Summary by CodeRabbit

  • Documentation
    • Updated code examples throughout documentation for consistency and clarity
    • Standardized import statements and formatting patterns in code snippets
    • Updated Svelte CSF story patterns to align with current best practices
    • Refined example import paths and whitespace for improved readability

✏️ Tip: You can customize this high-level summary in your review settings.

@jonniebigodes jonniebigodes self-assigned this Jan 27, 2026
@jonniebigodes jonniebigodes added documentation ci:docs Run the CI jobs for documentation checks only. labels Jan 27, 2026
@jonniebigodes jonniebigodes merged commit 180186e into next Jan 27, 2026
15 checks passed
@jonniebigodes jonniebigodes deleted the docs_fix_svelte_snippets branch January 27, 2026 18:25
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 27, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This PR updates approximately 80 documentation snippet markdown files with normalization of imports and formatting adjustments. Changes include converting named imports to default imports across Svelte components, updating component import paths with framework-specific extensions, modifying defineMeta destructuring patterns in Svelte CSF examples, and adding blank lines between import statements for consistency.

Changes

Cohort / File(s) Summary
Named-to-Default Import Conversions
addon-a11y-parameter-example.md, addon-a11y-parameter-remove.md, addon-viewport-define-globals.md, arg-types-table.md, automocked-modules-in-story.md, interaction-test-complex.md, interaction-test-fn-mock-spy.md, interaction-test-simple.md, my-component-story-mandatory-export.md
Converts named imports to default imports (e.g., import { Button }import Button) for Svelte and other components across multiple CSF examples.
defineMeta Destructuring Pattern Updates
after-each-in-meta.md, api-doc-block-argtypes-parameter.md, api-doc-block-controls-parameter.md, api-doc-block-description-example.md, api-doc-block-source-parameter.md, api-doc-block-story-parameter.md, before-each-in-meta-mock-date.md
Changes Svelte CSF snippets from const meta = defineMeta({...}) to const { Story } = defineMeta({...}), extracting Story from the defineMeta return value.
Import Path Extensions & Corrections
before-each-in-meta-mock-date.md, loader-story.md, mount-advanced.md, mount-basic.md, my-component-story-mandatory-export.md, storybook-test-fn-mock-spy.md, storybook-test-mock-return-value.md, tags-autodocs-in-meta.md, tags-autodocs-remove-component.md, tags-autodocs-remove-story.md, tags-combo-example.md, tags-docs-only-in-meta.md, tags-in-meta-and-story.md
Updates import paths to include framework-specific extensions (e.g., ./Button./Button.component, ./Page./Page.svelte, ./Page./Page.vue).
Component Reference Renames
addon-a11y-parameter-todo-in-meta.md
Replaces all Button component references with DataTable across snippets, including imports, file names, and type annotations.
Formatting & Whitespace
addon-backgrounds-define-globals.md, addon-backgrounds-disabled.md, addon-backgrounds-grid.md, addon-backgrounds-options-in-meta.md, api-doc-block-canvas-parameter.md, arg-types-default-value.md, arg-types-description.md, arg-types-if.md, arg-types-in-meta.md, arg-types-in-story.md, arg-types-mapping.md, arg-types-name.md, arg-types-options.md, arg-types-type.md, button-group-story.md, button-story-argtypes-with-categories.md, button-story-argtypes-with-subcategories.md, button-story-component-args-primary.md, button-story-component-decorator.md, button-story-decorator.md, button-story-default-export-with-component.md, button-story-rename-story.md, button-story-using-args.md, button-story-with-args.md, button-story-with-emojis.md, code-panel-in-meta-and-story.md, component-story-custom-args-complex.md, component-story-figma-integration.md, component-story-static-asset-cdn.md, component-story-static-asset-with-import.md, component-story-static-asset-without-import.md, foo-bar-baz-story.md, highlight-remove.md, histogram-story.md, list-story-expanded.md, list-story-starter.md, list-story-template.md, list-story-with-unchecked-children.md, my-component-story-use-globaltype.md, nextjs-app-directory-in-meta.md, nextjs-navigation-override-in-story.md, nextjs-navigation-segments-for-use-params-override-in-meta.md, nextjs-navigation-segments-override-in-meta.md, nextjs-router-override-in-story.md, page-story.md, page-story-slots.md, render-custom-in-meta.md, render-custom-in-story.md, rsc-parameter-in-meta.md, storybook-component-layout-param.md, storybook-csf-3-auto-title-redundant.md, storybook-preview-auto-docs-custom-docs-container.md, your-component-with-decorator.md, your-component.md
Adds blank lines between import statements for consistent spacing. Minor formatting adjustments without logic changes.
Multi-File Additions
component-story-with-custom-render-function.md
Adds new Svelte CSF TypeScript story snippet example demonstrating custom render functions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs


Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:docs Run the CI jobs for documentation checks only. documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant