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

Could component mode be detected and shown? #2418

Open
brunnerh opened this issue Jun 25, 2024 · 0 comments
Open

Could component mode be detected and shown? #2418

brunnerh opened this issue Jun 25, 2024 · 0 comments
Labels
feature request New feature or request

Comments

@brunnerh
Copy link
Member

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.

image

Ideally this would be configurable, e.g. via an array specifying the modes one is interested in.
Something like:

{
  "svelte.showComponentMode": ["legacy", "runes"],
}

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

@dummdidumm dummdidumm added the feature request New feature or request label Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants