From decd6532d7d008546415d4c334cea5d9d3022a9d Mon Sep 17 00:00:00 2001 From: benjamin-small Date: Wed, 23 Sep 2026 15:31:41 -0400 Subject: [PATCH] feat(web): move every lab's controls bar above the canvas The playback/controls bar now sits at the top of the page in every lab, on desktop and in the mobile stack, and precedes the canvas in DOM order so tab order matches the visual order. Border moves from top to bottom of the bar to keep the separator between bar and canvas. --- web/src/lib/components/LabShell.svelte | 85 ++++++++++--------- .../lib/components/__tests__/LabShell.test.ts | 8 ++ 2 files changed, 51 insertions(+), 42 deletions(-) diff --git a/web/src/lib/components/LabShell.svelte b/web/src/lib/components/LabShell.svelte index ea17bdd..597f7c5 100644 --- a/web/src/lib/components/LabShell.svelte +++ b/web/src/lib/components/LabShell.svelte @@ -9,7 +9,7 @@ labId: LabId; /** Left-hand description panel (becomes a slide-in drawer under 768px). */ info: Snippet; - /** Extra playback-bar controls, rendered between the iteration readout and the Speed slider. */ + /** Extra controls-bar controls, rendered between the iteration readout and the Speed slider. */ controls?: Snippet<[LabApi]>; /** Called once the engine is constructed and the frame loop is running. */ onReady?: (api: LabApi) => void; @@ -254,6 +254,40 @@ {@render info()} +
+ {#if playback} + + + + + + + {api.snapshot.iteration} / {api.snapshot.max_iterations} + {api.snapshot.sub_progress.toFixed(2)} + + {/if} + + {@render controls?.(api)} + + {#if playback} + + {/if} +
+
-
- {#if playback} - - - - - - - {api.snapshot.iteration} / {api.snapshot.max_iterations} - {api.snapshot.sub_progress.toFixed(2)} - - {/if} - - {@render controls?.(api)} - - {#if playback} - - {/if} -