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

Svelte v5 RC: TreeView component is non-function #2639

Open
endigo9740 opened this issue Apr 30, 2024 · 1 comment
Open

Svelte v5 RC: TreeView component is non-function #2639

endigo9740 opened this issue Apr 30, 2024 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@endigo9740
Copy link
Contributor

endigo9740 commented Apr 30, 2024

Current Behavior

This component works as expected in Svelte v4. However, while testing the Svelte v5 RC, there are a number of errors present when using this component. See the screenshot below:

Screenshot 2024-04-30 at 1 17 26 PM

a11y warning:

2:16 The `accessors` option has been deprecated. It will have no effect in runes mode

Expected Behavior

While we won't be utilizing Svelte v5 features in Skeleton until our v3 release, we do expect users to migrate to Svelte v5 prior to migrating to Skeleton v3. This means there will be a period of time while they are running Skeleton v2 + Svelte v5. As such, we should try to resolve these errors as they are breaking issues.

Steps To Reproduce

You can temporarily switch to Svelte v5 RC to test and develop your changes using:

pnpm i -D svelte@next

The doc site should remain fully functional during this. Just make sure to revert these changes before we merge these changes in to the dev branch.

Link to Reproduction / Stackblitz

No response

More Information

It's of the upmost importance that we do not merge the Svelte v5 RC dependency change into dev branch, so take care to add a big markdown note in the PR message please!

ETA for this change is before the Svelte v5 stable release, but the sooner the better for early adopters!

@endigo9740 endigo9740 added the bug Something isn't working label Apr 30, 2024
@endigo9740 endigo9740 added this to the v2.0 milestone Apr 30, 2024
@endigo9740 endigo9740 changed the title TreeView component is non-function in Svelte v5 RC Svelte v5 RC: TreeView component is non-function Apr 30, 2024
@Mahmoud-zino
Copy link
Sponsor Contributor

Regrettably, the tree-view component will not maintain compatibility with both Svelte 4 and Svelte 5 simultaneously due to its dependency on the Svelte 4 API.


In Svelte 4, components are represented as classes, which are utilized within the tree-view to allocate events to its children.
But in Svelte 5, components are functions, so it's impossible to find a solution that fits both Svelte 4 and Svelte 5 methodologies.

see: https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants