From 5f21c5fc20ae21cbfdabede4c65f5e00f1d0f70e Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 25 Jun 2026 07:34:02 +0000 Subject: [PATCH 1/2] feat(configurator): screenshot QA, mobile ergonomics, control UX MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Item 6 — Screenshot QA - Add tests-e2e/screenshots.spec.js: 9 domains × 3 viewports (1280/768/390px) - Add 'screenshots' project to playwright.config.js Item 7 — Mobile ergonomics - app.css: 44px touch targets for cfg-btn/cfg-input/cfg-select at ≤980px - StudioFrame: hide description and shrink h3 at ≤820px - StudioWorkflow + LayoutStudio: horizontal scroll at ≤480px - ControlSection: default-closed on mobile (window.innerWidth < 768) Item 8 — "What does this control do" - FriendlyControl: "drives N" badge via dependentsCount(); ≥10 = master - ControlPreview: caption label below each preview widget - SmartSettings: drives count in section summary; token count in reset Co-Authored-By: Claude Sonnet 4.6 --- configurator/playwright.config.js | 1 + .../src/components/ControlPreview.svelte | 9 ++++++ .../src/components/ControlSection.svelte | 3 +- .../src/components/FriendlyControl.svelte | 11 +++++-- .../src/components/SmartSettings.svelte | 12 +++++-- .../components/editors/LayoutStudio.svelte | 1 + .../src/components/editors/StudioFrame.svelte | 8 ++++- .../components/editors/StudioWorkflow.svelte | 1 + configurator/src/styles/app.css | 9 ++++++ configurator/tests-e2e/screenshots.spec.js | 32 +++++++++++++++++++ 10 files changed, 81 insertions(+), 6 deletions(-) create mode 100644 configurator/tests-e2e/screenshots.spec.js diff --git a/configurator/playwright.config.js b/configurator/playwright.config.js index f5303d4c..1d5e8f54 100644 --- a/configurator/playwright.config.js +++ b/configurator/playwright.config.js @@ -34,6 +34,7 @@ export default defineConfig({ { name: 'chromium', use: { browserName: 'chromium' } }, { name: 'firefox', use: { browserName: 'firefox' }, testMatch: CROSS_ENGINE }, { name: 'webkit', use: { browserName: 'webkit' }, testMatch: CROSS_ENGINE }, + { name: 'screenshots', use: { browserName: 'chromium' }, testMatch: '**/screenshots.spec.js' }, ], webServer: { command: 'npm run preview -- --port 4173 --strictPort', diff --git a/configurator/src/components/ControlPreview.svelte b/configurator/src/components/ControlPreview.svelte index fdcdf56a..70cafc91 100644 --- a/configurator/src/components/ControlPreview.svelte +++ b/configurator/src/components/ControlPreview.svelte @@ -4,6 +4,13 @@ let { token, value = '', type = 'text', label = '' } = $props(); const active = $derived(value || overrides[token?.name] || token?.value || ''); const stageStyle = $derived(buildPreviewDeclarations(overrides, ui.previewTheme)); + const LABELS = { + color: 'colour', font: 'typeface', radius: 'corner', shadow: 'elevation', + motion: 'timing', 'line-height': 'leading', wrap: 'text wrap', + opacity: 'opacity', gradient: 'gradient', border: 'border style', + media: 'object fit', scale: 'scale', spacing: 'size', + }; + const caption = $derived(LABELS[type] ?? type);
@@ -37,6 +44,7 @@
{/if}
+

{caption}

diff --git a/configurator/src/components/ControlSection.svelte b/configurator/src/components/ControlSection.svelte index c3f18a19..7f778996 100644 --- a/configurator/src/components/ControlSection.svelte +++ b/configurator/src/components/ControlSection.svelte @@ -1,8 +1,9 @@ -
+
(open = e.currentTarget.open)}> {title} diff --git a/configurator/src/components/FriendlyControl.svelte b/configurator/src/components/FriendlyControl.svelte index 7d585877..20d90c93 100644 --- a/configurator/src/components/FriendlyControl.svelte +++ b/configurator/src/components/FriendlyControl.svelte @@ -1,6 +1,7 @@