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 5 Migration #42

Open
2 tasks done
oneezy opened this issue Apr 29, 2024 · 8 comments
Open
2 tasks done

🈷️ Svelte 5 Migration #42

oneezy opened this issue Apr 29, 2024 · 8 comments

Comments

@oneezy
Copy link

oneezy commented Apr 29, 2024

Double-Check

Clear description of the requested feature

With the recent Svelte Summit Spring talk, Svelte 5 has been moved into Release Candidate (RC) stage. How hard would it be to migrate Kitbook from 4 -> 5 ?

Suggested solution

Create breaking version change for Kitbook to use for Svelte v5

Alternative

No response

Additional context

No response

@jacob-8
Copy link
Owner

jacob-8 commented Apr 30, 2024

I'm very interested in making it work for Svelte 5. It would be trivial to make the variants, compositions, and documentation aspects work in Svelte 5. However, presently the Viewer aspect is blocked because it relies on Svelte internals. Read this comment to learn more. Since the internals are radically different now, I'm not even sure that what I'm doing in building up a component tree w/ associated elements is possible yet. Edit: not possible yet. However, since they officially support that svelte-devtools and @ignatiusmb is on the core team I'm confident that they will provide a way to accomplish this by the time 5.0 is released. Whatever ends up working for svelte-devtools will also work for Kitbook.

In the meantime, feel free to fork the project and release a Kitbook version w/o the Viewer. I'll update the docs to help people use it. I however, have projects in production that need to wait until 5.0, and I only like using Kitbook on real projects. I find it's not helpful for me to maintain a release that I'm not actually using myself as there's much higher likelihood of unnoticed bugs.

Follow this and this for updates.

@jacob-8
Copy link
Owner

jacob-8 commented Apr 30, 2024

Yes, this task depends on sveltejs/svelte#11389

@oneezy
Copy link
Author

oneezy commented May 1, 2024

thanks! yeah, i've also had my ui lib break because of svelte/internals. thanks for the links, will keep an eye out!

@kristianmandrup
Copy link

I love where this project is going. I've been trying out Svelte 5 lately but still too many compatibility issues to make it worthwhile. I'd love to help as we get closer to a more compatible release. Cheers!

@jacob-8
Copy link
Owner

jacob-8 commented Aug 31, 2024

I really like what I've been able to accomplish with Kitbook's Viewer in how it can connect to components, see their current state and edit it, but I think I should temporarily put those component connection features on the shelf in favor of moving towards Svelte 5. My current implementation is not very polished and will never be able to make the transition to Svelte 5 due to how Svelte internals have changed so much. I think it's better to remove it, make Kitbook work well for both Svelte 4 and 5, and then bring the component connection features back in once Svelte 5 re-implements this ability in a new way. As linked above, they plan to do it in their 5.x milestone and not 5.0.

So stay tuned, Kitbook is now unblocked, but that doesn't mean we won't run into other Svelte 5 bugs. Yes, at some point I will start work on a 2.0 alpha branch and @kristianmandrup I would appreciate your feedback on how it works, whether you use Svelte 4 or 5, getting feedback from either way would be helpful.

@jycouet
Copy link

jycouet commented Dec 13, 2024

I'm curious to know if you managed the svelte 5 migration 😊

@jacob-8
Copy link
Owner

jacob-8 commented Dec 15, 2024

I'm curious to know if you managed the svelte 5 migration 😊

While I'd still like to see sveltejs/svelte#11389 get some attention before proceeding with a Svelte 5 version, it wouldn't be fair to say that that's what's been holding me back. Rather it was my time availability and not having a Svelte 5 app in production yet. I now am upgrading one of my projects to Svelte 5 and so it's time to bring Kitbook along. Check back after the new year to see how things are coming.

@jycouet
Copy link

jycouet commented Dec 15, 2024

I finally took the time to watch your Svelte Summit video, and I found it awesome!
I’m looking forward to playing around with it soon, and I’m happy to hear that you have plans in the works.
Keep us updated on how everything progresses (no rush)!

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

No branches or pull requests

4 participants