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

Update to Svelte 5 with runes #176

Draft
wants to merge 36 commits into
base: master
Choose a base branch
from
Draft

Update to Svelte 5 with runes #176

wants to merge 36 commits into from

Conversation

TeyKey1
Copy link
Member

@TeyKey1 TeyKey1 commented Mar 3, 2024

This is a WIP PR aiming to update svelte-konva to Svelte 5 and the new Svelte runes. Currently based on the Svelte 5 preview releases.

svelte-konva aims to be compatible with Svelte 5's runes-only mode, to allow all dependents to use runes-only mode if desired.

Svelte 5 WIP docs: https://svelte-5-preview.vercel.app/docs
Svelte 5 Runes: https://svelte.dev/blog/runes

TODO:

  • Make sure the basic examples in the svelte-konva examples work as expected
  • Update svelte-konva TS docs if needed
  • Create a migration guide for svelte-konva if needed
  • Update konva.org docs if needed
  • Update konva.org doc examples
  • Test for performance differences between the current and new version of svelte-konva

Known issues:

  • The component config is not reactive when bound with staticConfig != true. The config data updates correctly, but any reactive statements depending on config do not trigger
  • Stage handle cannot be exported as const prop due to being initialized once the wrapper div is rendered (Needs a solution possibly using stores)
  • Tests currently do not work due to testing-library being on Svelte 4
  • Figure out a way to split the konvaEvents from restProps in the Stage Component (otherwise konva event hooks might also be called on div events)
  • Tests not passing
  • Some CSS layout issues on the examples webpage (Canvas clipping into source code view)
  • $effect is not deeply reactive leading to unreactive config changes in svelte-konva components
  • config props are not typed (eg. any) after library build
  • Split config prop into its properties -> Allows for fine-grained reactivity and a lot more efficiency in the svelte-konva code

…across library components, remove svelte compiler hints for config change
…Make container nodes accept children and switch from slot to @render blocks
…g, update svelte package (fixes dist output types)
…te's guarantees on contexts prevent context altering in those components to affect any parent elements
… create svelte-konva v1 migration guide (WIP)
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.

None yet

1 participant