-
-
Notifications
You must be signed in to change notification settings - Fork 206
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
Could component mode be detected and shown? #2418
Comments
I'll implement the code lens for the legacy/runes mode indicator. The migration lens not for now, because it might have false positives (i.e. not do anything or fail) |
adds a runes mode indicator atop of the file via a code lens. Will show "runes mode" if the components is in that mode, "legacy mode" if not, and nothing if it's not Svelte 5 #2418
adds a runes mode indicator atop of the file via a code lens. Will show "runes mode" if the components is in that mode, "legacy mode" if not, and nothing if it's not Svelte 5 #2418
@dummdidumm It seems like the mode lens overwrites the component references lens (#2378), could those be combined? |
@dummdidumm How can I disable the indicator? There's an option like |
I added an option, will release early next week |
Description
During the transition to Svelte 5, if the mode is not globally enforced, unintentionally being in one mode or the other could be undesirable.
E.g. legacy mode leads to coarse grained reactivity which can cause issues and just has worse performance.
Seen unintended mode switches happen when people refactored the last variable using a rune into a separate file.
Proposed solution
If mode is detectable, show mode via CodeLens at the top of the file.
Ideally this would be configurable, e.g. via an array specifying the modes one is interested in.
Something like:
Alternatives
There might be other ways of making users aware of the mode or mode switches happening.
E.g. on switch a notification could be shown, but this seems too intrusive.
Additional Information, eg. Screenshots
No response
The text was updated successfully, but these errors were encountered: