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: add svelte portable #390

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

DaniAcu
Copy link
Contributor

@DaniAcu DaniAcu commented Oct 6, 2024

Hi I migrate lenis-svelte to this repo.

The approuch for svelte is using svelte action and svelte stores, things that will work and still working for Svelte 4 and Svelte 5. Despite the changes to runes in Svelte 5 the svelte will still working in that version.

@DaniAcu DaniAcu requested a review from a team as a code owner October 6, 2024 17:57
@DaniAcu DaniAcu requested review from arzafran and GFier October 6, 2024 17:57
Copy link

vercel bot commented Oct 6, 2024

@DaniAcu is attempting to deploy a commit to the darkroom Team on Vercel.

A member of the Team first needs to authorize it.

@feledori
Copy link
Contributor

feledori commented Oct 7, 2024

hello, first of thanks for contributing! we were thinking about adding lenis/svelte and waiting for svelte 5, which should be right around the corner. not to keen on supporting svelte version below 5 as it creates overhead. but open for opinions as I am not to deep in the svelte community. my thought is starting of with svelte 5 so we just have to maintain versions beyond 5, which afaik is the big shift for svelte.

@DaniAcu
Copy link
Contributor Author

DaniAcu commented Oct 7, 2024

Hi! Thanks, related to the svelte migration, there a lot of noice around it that doesn't make too much sense.

Svelte 4 will be compatible with Svelte 5, at least in the features that we are using here (store and actions). Props component and other stuff will change, but it will not break. It will be removed in future versions (svelte 7)

Here the docs: https://svelte-5-preview.vercel.app/docs/faq#breaking-changes-and-migration-no-but-really-am-i-going-to-have-to-rewrite-everything

There no plan for deprecate stores or actions, the motion library svelte/motion has stores an plan to continue having it for a while. https://github.com/sveltejs/svelte/blob/main/packages/svelte/src/motion/spring.js#L62

Implementing a portal with only runes, it will limit the use of the library to apps that needs migration. While store are still usefull, combined with action create a simple portal that will work in Svelte 5 without a change.

I make that choice to support the stable version, and the RC. We don't need to choose right now which will be the better option, because with the combination of stores and action we have a stable a robust solution for old versions and new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants