impr: optimize virtualizer resizeobserver (#688)

* impr: use one resize observer that observes all elements 1984 style instead of 1 agent per element

* design: tweak VirtualFeed.svelte to have a more modern retry window
This commit is contained in:
xylight authored and GitHub committed 2025-11-19 01:33:43 +00:00
1 parent 2d2a9a5671
commit 568bb3330a
8 files changed
+53 -52

No files matched your search

+4 -2
View File
@@ -16,7 +16,7 @@
</script>
<script lang="ts">
import { onDestroy } from 'svelte'
import { onDestroy, type Snippet } from 'svelte'
import { ExclamationTriangle, Icon } from 'svelte-hero-icons/dist'
import { expoOut } from 'svelte/easing'
import { fly, slide } from 'svelte/transition'
@@ -28,9 +28,10 @@
scope?: string | undefined | null
message?: string
class?: string
children?: Snippet
}
let { scope, message, class: clazz = '' }: Props = $props()
let { scope, message, children, class: clazz = '' }: Props = $props()
let scopedErrors = $derived(
errors.filter((e) => e.scope == scope || e.scope == 'global'),
@@ -63,6 +64,7 @@
{#if message}
{message}
{/if}
{@render children?.()}
{#each scopedErrors as error}
<p>{error.message}</p>
{/each}