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

feat: Migrate to new class attributes using sv #393

Closed
cloudymeatball opened this issue Jan 11, 2025 · 1 comment
Closed

feat: Migrate to new class attributes using sv #393

cloudymeatball opened this issue Jan 11, 2025 · 1 comment
Labels
enhancement New feature or request pkg:migrate svelte-migrate

Comments

@cloudymeatball
Copy link

cloudymeatball commented Jan 11, 2025

In light of sveltejs/svelte#14714, "feat: allow objects/arrays for class attribute", is a sv migrate script for class attributes being prepared as we speak? The docs are dissuading use of class: in versions past 5.16. This is just a thought, as I can see this being a bigger migration than $app/state. I would like to see a migration script that can at least partially consolidate existing class: into a single array or object attribute, and to propose possible paths forward when the script is not confident in the migration.

@manuel3108 manuel3108 added enhancement New feature or request pkg:migrate svelte-migrate labels Jan 12, 2025
@manuel3108
Copy link
Member

manuel3108 commented Jan 16, 2025

Thanks for that idea.
We discussed that in the maintainers chat and deemed that it comes down to personal preference if the new syntax is better in all cases, or only in some. Thus we decided providing a migration is not a too good idea.

But we also discussed that the docs are pressing a bit to much on the new syntax.

Unless you’re using an older version of Svelte, consider avoiding class:, since the attribute is more powerful and composable.

There are currently no plans to deprecate the syntax anytime soon. Feel free to open a docs PR on the svelte repo though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pkg:migrate svelte-migrate
Projects
None yet
Development

No branches or pull requests

2 participants