-
Notifications
You must be signed in to change notification settings - Fork 146
refactor(DT-3906): UI Svelte 5 Migrations medium #3368
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
tegan-temporal
merged 6 commits into
codefreeze-05.01.26
from
DT-3906-ui-svelte-5-migrate-medium
May 7, 2026
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d91e527
More trivial migrations
tegan-temporal 1bcd9ce
Remove redundant svelte:options
tegan-temporal c9413dd
Delete orphaned files
tegan-temporal d5c0306
Migrate guards
tegan-temporal 2d37886
Migrate defaut-slots only components to children snippet
tegan-temporal d742777
Update search-attribute-filter components
tegan-temporal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,17 @@ | ||
| <script lang="ts"> | ||
| import { page } from '$app/stores'; | ||
| import type { Snippet } from 'svelte'; | ||
|
|
||
| export let isCloud = false; | ||
| import { page } from '$app/state'; | ||
|
|
||
| let { | ||
| isCloud = false, | ||
| children, | ||
| fallback, | ||
| }: { isCloud?: boolean; children?: Snippet; fallback?: Snippet } = $props(); | ||
| </script> | ||
|
|
||
| {#if isCloud || $page.data?.settings?.runtimeEnvironment?.isCloud} | ||
| <slot /> | ||
| {#if isCloud || page.data?.settings?.runtimeEnvironment?.isCloud} | ||
| {@render children?.()} | ||
| {:else} | ||
| <slot name="fallback" /> | ||
| {@render fallback?.()} | ||
| {/if} |
16 changes: 13 additions & 3 deletions
16
src/lib/components/is-temporal-server-version-guard.svelte
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,23 @@ | ||
| <script lang="ts"> | ||
| import type { Snippet } from 'svelte'; | ||
|
|
||
| import { isCloud } from '$lib/stores/advanced-visibility'; | ||
| import { temporalVersion } from '$lib/stores/versions'; | ||
| import { minimumVersionRequired } from '$lib/utilities/version-check'; | ||
|
|
||
| export let minimumVersion: string; | ||
| let { | ||
| minimumVersion, | ||
| children, | ||
| fallback, | ||
| }: { | ||
| minimumVersion: string; | ||
| children?: Snippet; | ||
| fallback?: Snippet; | ||
| } = $props(); | ||
| </script> | ||
|
|
||
| {#if $isCloud || minimumVersionRequired(minimumVersion, $temporalVersion)} | ||
| <slot /> | ||
| {@render children?.()} | ||
| {:else} | ||
| <slot name="fallback" /> | ||
| {@render fallback?.()} | ||
| {/if} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,9 @@ | ||
| <script lang="ts"> | ||
| import type { Snippet } from 'svelte'; | ||
|
|
||
| let { children }: { children?: Snippet } = $props(); | ||
| </script> | ||
|
|
||
| <div class="*:border-t-0 [&>*:first-child]:border-t"> | ||
| <slot /> | ||
| {@render children?.()} | ||
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,14 @@ | ||
| <script> | ||
| <script lang="ts"> | ||
| import { fly } from 'svelte/transition'; | ||
|
|
||
| import type { Snippet } from 'svelte'; | ||
|
|
||
| let { children }: { children?: Snippet } = $props(); | ||
| </script> | ||
|
|
||
| <div | ||
| in:fly={{ y: -50, duration: 150, delay: 50 }} | ||
| out:fly={{ y: -50, duration: 150 }} | ||
| > | ||
| <slot /> | ||
| {@render children?.()} | ||
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,10 @@ | ||
| <script lang="ts"> | ||
| import type { Snippet } from 'svelte'; | ||
|
|
||
| import { darkMode } from './dark-mode'; | ||
|
|
||
| let { children }: { children?: Snippet } = $props(); | ||
| </script> | ||
|
|
||
| <svelte:body use:darkMode /> | ||
| <slot /> | ||
| {@render children?.()} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I don't think we can bind a derived value. I think we might need something like this 🤔
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.
Just seeing your comment r.e. overriding derived values 👀 And testing it out it seems to work ✅