Skip to content
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: Fix incorrect context usage in Svelte example #30560

Merged
merged 4 commits into from
Feb 18, 2025

Conversation

Masstronaut
Copy link
Contributor

@Masstronaut Masstronaut commented Feb 17, 2025

https://svelte.dev/docs/svelte/svelte-files

In svelte 5, module scripts should be <script module> instead of the previous <script context="module"> from svelte 4 and before.

What I did

Svelte module scripts are <script module> not <script context>. I think it was just migrated incorrectly from <script context="module">

Checklist for Contributors

Testing

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

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

Manual testing

I don't believe manual testing is necessary for this change.

Documentation

This is a purely documentation update.

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.

Greptile Summary

Updates Svelte CSF story migration documentation to align with Svelte 5's module script syntax, replacing the outdated <script context> with the new <script module> directive.

  • Changed <script context> to <script module> in /docs/_snippets/svelte-csf-story-migration.md to match current Svelte 5 standards

💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!

https://svelte.dev/docs/svelte/svelte-files

In svelte 5, module scripts should be `<script module>` instead of the previous `<script context="module">` from svelte 4 and before.
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@jonniebigodes jonniebigodes self-assigned this Feb 17, 2025
Copy link
Contributor

@jonniebigodes jonniebigodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Masstronaut, thank you for taking the time to put together this pull request and helping us improve the documentation by catching this small typo in the examples. We appreciate it. I've checked, and all is good on my end. I'll gladly merge this once the checklist clears.

Hope you have a great day.

Stay safe

@jonniebigodes jonniebigodes changed the title documentation: Swap context -> module in a svelte snippet Docs: Fix incorrect context usage in Svelte example Feb 18, 2025
@jonniebigodes jonniebigodes added documentation ci:docs Run the CI jobs for documentation checks only. labels Feb 18, 2025
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

Copy link

nx-cloud bot commented Feb 18, 2025

View your CI Pipeline Execution ↗ for commit 87f50e6.

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 2m 3s View ↗

☁️ Nx Cloud last updated this comment at 2025-02-18 14:31:22 UTC

@jonniebigodes jonniebigodes merged commit 59a329f into storybookjs:next Feb 18, 2025
5 checks passed
@github-actions github-actions bot mentioned this pull request Feb 18, 2025
7 tasks
@Masstronaut Masstronaut deleted the patch-1 branch February 23, 2025 07:27
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.

2 participants