-
Notifications
You must be signed in to change notification settings - Fork 3
refactor: migrate to Svelte v5 #17
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
base: main
Are you sure you want to change the base?
Conversation
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR migrates the application from Svelte v3 to v5 with updated dependency versions and syntax modernization. The migration refactors code structure by extracting the header component and updating event handling patterns while maintaining existing functionality.
- Upgrade to Svelte v5 syntax with new reactivity patterns (
$state,$props) - Update UI5 Web Components and build dependencies to latest versions
- Extract header functionality into separate component for better maintainability
Reviewed Changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Update dependencies to Svelte v5 and latest UI5 Web Components |
| vite.config.js | Remove splitVendorChunkPlugin from Vite configuration |
| svelte.config.js | Migrate from svelte-preprocess to vitePreprocess |
| eslint.config.js | Replace legacy ESLint configuration with flat config format |
| src/main.ts | Update app mounting from constructor to mount function |
| src/stores/stores.svelte.ts | Implement new reactive state management with Svelte v5 syntax |
| src/lib/Header.svelte | Extract header component with theme and profile management |
| src/lib/TodoList.svelte | Update props syntax and event handling for v5 compatibility |
| src/lib/TodoItem.svelte | Convert to new props interface and event handler syntax |
| src/App.svelte | Refactor main component using Header component and v5 patterns |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
b6d0df6 to
833d33a
Compare
6fce97c to
88437de
Compare
88437de to
a0df897
Compare
| const handleThemeSettingsToggle = (event) => { | ||
| themeSettingsPopover.opener = event.detail.targetRef; | ||
| themeSettingsPopover.open = true; | ||
| const handleItemInput = (event: any) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could not find any types for this kind of event
https://ui5.github.io/webcomponents/components/Input/#input
| <div class="edit-wrapper"> | ||
| <ui5-label>Title:</ui5-label> | ||
| <ui5-textarea class="title-textarea" show-exceeded-text maxlength="24" bind:this={dialogTextArea} value={itemEditText} /> | ||
| <ui5-textarea class="title-textarea" show-exceeded-text maxlength={24} value={dialogFields.text} onchange={(event: any) => (dialogFields.text = event.target.value)}></ui5-textarea> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could not find types for the onchange event
https://ui5.github.io/webcomponents/components/TextArea/#change
457130c to
995cfa3
Compare
02a8289 to
097d819
Compare
@ui5/webcomponents: 2.16.0svelte: 5.43.1