From b869587bbfaf93600fb019c5bd5621a34871f164 Mon Sep 17 00:00:00 2001 From: Kiro Agent <244629292+kiro-agent@users.noreply.github.com> Date: Fri, 21 Aug 2026 09:59:57 +0000 Subject: [PATCH 1/3] fix(configurator): size the shell by its container, not the viewport MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The studio chrome decided its whole desktop-vs-mobile layout from the browser viewport via Tailwind `md:` (@media 768px). When the configurator is embedded in a container narrower than the viewport — the WP admin page beside the ~160px admin menu, or the plugin's ~420px frontend overlay on a desktop-width page — the viewport is still >=768px, so the full desktop three-column layout (208px labelled rail + 360px panel + preview) was forced into a box that could not hold it. Most visibly, SidebarNav rendered its 208px labelled rail inside the 420px overlay, squeezing the token panel to ~212px ('too narrow for its data'). Make the shell a CSS container (`@container`) and convert the layout-governing breakpoints in App.svelte and SidebarNav.svelte from viewport `md:` to the container variant `@3xl:` (48rem = 768px — the exact same threshold, now measured against the space we're actually given). Standalone is unchanged (container == viewport); embedded hosts now collapse to the compact rail / mobile layout when they're narrow. Unlabelled panels/inputs were already fluid, so no other files change. Note: unnamed container queries don't fall back to the viewport, so a host that mounts SidebarNav without an `@container` ancestor safely gets the compact 56px rail. --- configurator/src/App.svelte | 27 ++++++++++------ .../src/components/shell/SidebarNav.svelte | 31 +++++++++++++------ 2 files changed, 39 insertions(+), 19 deletions(-) diff --git a/configurator/src/App.svelte b/configurator/src/App.svelte index 38ec8a9d..291a72d7 100644 --- a/configurator/src/App.svelte +++ b/configurator/src/App.svelte @@ -354,7 +354,15 @@ {/snippet} -
+ +