feature/ux-improvements #26

Merged
ilia merged 73 commits from feature/ux-improvements into main 2026-02-18 14:43:05 +00:00
Showing only changes of commit c45429f38d - Show all commits

View File

@@ -16,6 +16,7 @@ import {
controlManager, controlManager,
} from '$features/SetupFont'; } from '$features/SetupFont';
import { throttle } from '$shared/lib/utils'; import { throttle } from '$shared/lib/utils';
import { Skeleton } from '$shared/ui';
let text = $state('The quick brown fox jumps over the lazy dog...'); let text = $state('The quick brown fox jumps over the lazy dog...');
let wrapper = $state<HTMLDivElement | null>(null); let wrapper = $state<HTMLDivElement | null>(null);
@@ -43,6 +44,20 @@ const checkPosition = throttle(() => {
}, 100); }, 100);
</script> </script>
{#snippet skeleton()}
<div class="flex flex-col gap-3 sm:gap-4 p-3 sm:p-4">
{#each Array(5) as _, i}
<div class="flex flex-col gap-1.5 sm:gap-2 p-3 sm:p-4 border rounded-lg sm:rounded-xl border-border-subtle bg-background-40">
<div class="flex items-center justify-between mb-3 sm:mb-4">
<Skeleton class="h-6 sm:h-8 w-1/3" />
<Skeleton class="h-6 sm:h-8 w-6 sm:w-8 rounded-full" />
</div>
<Skeleton class="h-24 sm:h-32 w-full" />
</div>
{/each}
</div>
{/snippet}
<svelte:window <svelte:window
bind:innerHeight bind:innerHeight
onscroll={checkPosition} onscroll={checkPosition}
@@ -54,6 +69,7 @@ const checkPosition = throttle(() => {
itemHeight={220} itemHeight={220}
useWindowScroll={true} useWindowScroll={true}
weight={controlManager.weight} weight={controlManager.weight}
{skeleton}
> >
{#snippet children({ {#snippet children({
item: font, item: font,