anki icon indicating copy to clipboard operation
anki copied to clipboard

Deprecated createEventDispatcher usage in Svelte components

Open leedoughty opened this issue 1 month ago • 3 comments

The codebase currently uses createEventDispatcher (example usage here), which is deprecated in Svelte 5.

The Svelte 5 migration guide recommends using callback props instead of dispatching events. It may be worth refactoring affected components to follow the new pattern and maintain forward compatibility with Svelte 5.

leedoughty avatar Oct 28 '25 18:10 leedoughty

Would be nice to fully migrate to Svelte 5 along the way, but it's a larger task.

abdnh avatar Oct 29 '25 06:10 abdnh

I would like to help out with this issue in Svelte. I was thinking I could start by refactoring a few components to use callback props instead, or is that a non go since you want to try to do everything at once? :)

AmandaSternberg-creator avatar Nov 14 '25 10:11 AmandaSternberg-creator

I could start by refactoring a few components to use callback props instead, or is that a non go since you want to try to do everything at once? :)

I personally think that's fine, but you might want to wait for Damien's opinion before spending time on it. Also, this is likely to conflict with changes in #4029 and #4289 so might be better done after the PRs are merged.

abdnh avatar Nov 17 '25 15:11 abdnh