containers / podman-desktop

Podman Desktop is the best free and open source tool to work with Containers and Kubernetes for developers. Get an intuitive and user-friendly interface to effortlessly build, manage, and deploy containers and Kubernetes — all from your desktop.
https://podman-desktop.io
Apache License 2.0
4.73k stars 298 forks source link

Move ui-svelte to svelte 5 (and extensions defer related updates until then) #9332

Open deboer-tim opened 5 days ago

deboer-tim commented 5 days ago

Is your enhancement related to a problem? Please describe

See #9313, and https://github.com/containers/podman-desktop-extension-bootc/pull/900 (error from dependabot build picking up podman-desktop/ui-svelte 1.13 in bootc):

[vite-plugin-svelte] [plugin vite-plugin-svelte] ../../node_modules/@podman-desktop/ui-svelte/dist/tooltip/Tooltip.svelte (76:17): /home/runner/work/podman-desktop-extension-bootc/podman-desktop-extension-bootc/podman-desktop-extension-bootc/node_modules/@podman-desktop/ui-svelte/dist/tooltip/Tooltip.svelte:76:17 $tooltipHidden is an illegal variable name. To reference a global variable called $tooltipHidden, use globalThis.$tooltipHidden

Describe the solution you'd like

We went through a phase where we would dabble in svelte 5 where it made sense; more recently new components have to be svelte 5. However, we are hitting multiple cases where the existing code in ui-svelte has minor issues with v5 and newer typecheck / vite-plugin-svelte is reporting it in adopting repos.

Handling these as one-offs would be painful, and has a higher likelihood that a change like on:x to onX will cause a regression in an extension. We need a focused port to svelte 5 and ensure the build is picking up issues. Prior to this issue, extensions should hold back on updating faster than where ui-svelte is.

Describe alternatives you've considered

No response

Additional context

No response

benoitf commented 4 days ago

I think here, the dependabot is not related to svelte5, it's just a packaging issue

deboer-tim commented 4 days ago

That's good to hear. 👍🏼 Link to PR: #9340.

I think we still need to carry this as tech debt for issues like #9313 though - we need extensions not to push the limits on using svelte 5 with ui-svelte until we have some focus on upgrading more of it. Doing it in pieces / reacting will be more painful and have more releases that break existing use.