Skip to content

Update to Svelte 5 with runes #176

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

Merged
merged 56 commits into from
Aug 2, 2024
Merged

Update to Svelte 5 with runes #176

merged 56 commits into from
Aug 2, 2024

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
  • Split config prop into its properties -> Allows for fine-grained reactivity and a lot more efficiency in the svelte-konva code
  • Make sure examples in doc comments of the components work with new split config props
  • Update migration guideline with split config prop
  • Document new divWrapperProps prop

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
  • Type error on Konva shape instantiations likely caused by Omit type
  • Weird/Wrong initial size and scaling of connect4 stage (might indicate a bug in the stage logic)
  • Fix tests to work with splitted config props
  • call stack overflow in transformer example

TeyKey1 added 30 commits March 3, 2024 09:48
…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
@TeyKey1 TeyKey1 marked this pull request as ready for review August 2, 2024 19:56
@TeyKey1 TeyKey1 merged commit 63ae398 into master Aug 2, 2024
3 of 4 checks passed
@TeyKey1 TeyKey1 deleted the svelte-v5 branch August 2, 2024 19:56
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.

1 participant