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

fix(renderer/svelte): Resolve usage of deprecated <svelte:component> #29405

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

xeho91
Copy link

@xeho91 xeho91 commented Oct 19, 2024

I can't transfer the issue to this repository.

Closes storybookjs/addon-svelte-csf#212

Warning

Needs manual verification if this doesn't break Svelte v4

What I did

I removed usage of deprecated <svelte:component> - source of documented deprecation

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

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/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 canary-release-pr.yml --field pr=<PR_NUMBER>

name before after diff z %
createSize 0 B 0 B 0 B - -
generateSize 78.7 MB 78.7 MB 0 B 3.11 0%
initSize 147 MB 147 MB 1.39 kB 2.71 0%
diffSize 68.3 MB 68.3 MB 1.39 kB 1.94 0%
buildSize 6.79 MB 6.79 MB 0 B 0.67 0%
buildSbAddonsSize 1.5 MB 1.5 MB 0 B -1.11 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.83 MB 1.83 MB 0 B 0.82 0%
buildSbPreviewSize 270 kB 270 kB 0 B -1.11 0%
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.8 MB 3.8 MB 0 B 0.71 0%
buildPreviewSize 2.99 MB 2.99 MB 0 B -1.11 0%
testBuildSize 0 B 0 B 0 B - -
testBuildSbAddonsSize 0 B 0 B 0 B - -
testBuildSbCommonSize 0 B 0 B 0 B - -
testBuildSbManagerSize 0 B 0 B 0 B - -
testBuildSbPreviewSize 0 B 0 B 0 B - -
testBuildStaticSize 0 B 0 B 0 B - -
testBuildPrebuildSize 0 B 0 B 0 B - -
testBuildPreviewSize 0 B 0 B 0 B - -
name before after diff z %
createTime 19.4s 20.3s 948ms 1.59 4.6%
generateTime 19.4s 18.5s -886ms -0.69 -4.8%
initTime 13.1s 12.3s -810ms -0.57 -6.6%
buildTime 8.1s 8.3s 167ms -0.46 2%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 6.3s 5.5s -824ms -1.14 -14.9%
devManagerResponsive 3.9s 3.6s -313ms -1.16 -8.6%
devManagerHeaderVisible 585ms 522ms -63ms -0.87 -12.1%
devManagerIndexVisible 615ms 550ms -65ms -0.87 -11.8%
devStoryVisibleUncached 996ms 924ms -72ms -0.42 -7.8%
devStoryVisible 616ms 551ms -65ms -0.89 -11.8%
devAutodocsVisible 514ms 323ms -191ms -2.41 🔰-59.1%
devMDXVisible 558ms 415ms -143ms -1.59 🔰-34.5%
buildManagerHeaderVisible 548ms 457ms -91ms -1.14 -19.9%
buildManagerIndexVisible 559ms 461ms -98ms -1.14 -21.3%
buildStoryVisible 623ms 517ms -106ms -1.13 -20.5%
buildAutodocsVisible 537ms 406ms -131ms -1.11 -32.3%
buildMDXVisible 492ms 388ms -104ms -1.22 -26.8%

Greptile Summary

This PR removes deprecated <svelte:component> usage in the SlotDecorator.svelte file, addressing compatibility with Svelte 5 while maintaining support for earlier versions.

  • Replaced <svelte:component> with direct component usage in code/renderers/svelte/src/components/SlotDecorator.svelte
  • Added version-specific logic for handling event listeners in Svelte versions below 5
  • Potential impact on Svelte v4 compatibility requires careful verification
  • Changes align with Svelte 5 best practices while attempting to maintain backward compatibility
  • Related to issue No CLI documentation that's helpful D: #212 in the addon-svelte-csf repository, improving Svelte renderer compatibility

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.

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

@JReinhold JReinhold added the ci:daily Run the CI jobs that normally run in the daily job. label Oct 19, 2024
@JReinhold JReinhold self-assigned this Oct 19, 2024
@JReinhold JReinhold added maintenance User-facing maintenance tasks svelte labels Oct 19, 2024
Copy link

nx-cloud bot commented Oct 19, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit b259f5e. 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 target

Sent with 💌 from NxCloud.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:daily Run the CI jobs that normally run in the daily job. maintenance User-facing maintenance tasks svelte
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Deprecation warnings for <svelte:component> with latest pre-release of svelte 5
2 participants