From f71445952ff1fc8a395e4baf995577e73223eee7 Mon Sep 17 00:00:00 2001 From: Pablo Torres Date: Mon, 24 Aug 2026 10:05:14 -0400 Subject: [PATCH] presetBrowser: swap detail status and action styles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Grid/Params/Versions elements looked like they were clickable, cause they were outlined in accent, but they aren't buttons. They are indicators of what loadDetail() has hydrated. Meanwhile the row that is interactive (Load preset / Audition / Refresh detail / Convert) read as less prominent. I tried to click the status row. Swap them: - Status becomes a dot-and-label strip following the existing .gate and .leg precedent — dot inherits currentColor, --textfaint when pending, --ok when loaded. Accent is dropped here; it is the app's active signal and a main reason the row read as tabs. - .load-action takes the vacated mono/uppercase/letter-spaced treatment and gains :hover and :focus-visible, reusing the .preset-row precedent. Grid floor 104px -> 124px so OPEN IN CONVERTER fits. - The .runtime-detail block restated the same three facts in prose; removed, with its wording moved into each item's title/aria-label and the version count folded into the label. .runtime-error is untouched. The label/title derivation moves to presetBrowserWorkbenchDetailStatus.ts so it is unit-testable — Vitest runs in node with no DOM and .svelte files are never mounted. data-status/data-loaded/data-action attributes are added for a future e2e spec, which needs a preset-library mock in the mold of gridMock.ts and is deliberately out of scope here. Co-Authored-By: Claude Opus 5 --- .../AxisPresetBrowserPartPanel.svelte | 85 +++++++++-------- .../presetBrowserWorkbenchDetailStatus.ts | 44 +++++++++ ...presetBrowserWorkbenchDetailStatus.test.ts | 93 +++++++++++++++++++ 3 files changed, 185 insertions(+), 37 deletions(-) create mode 100644 src/lib/axis-workbench/presetBrowser/presetBrowserWorkbenchDetailStatus.ts create mode 100644 src/lib/axis-workbench/test/presetBrowserWorkbenchDetailStatus.test.ts diff --git a/src/lib/axis-workbench/panels/preset-browser/AxisPresetBrowserPartPanel.svelte b/src/lib/axis-workbench/panels/preset-browser/AxisPresetBrowserPartPanel.svelte index b5daba8..e4aa08c 100644 --- a/src/lib/axis-workbench/panels/preset-browser/AxisPresetBrowserPartPanel.svelte +++ b/src/lib/axis-workbench/panels/preset-browser/AxisPresetBrowserPartPanel.svelte @@ -40,6 +40,7 @@ import { applyRowCap } from '../../presetBrowser/presetBrowserWorkbenchLayout'; import { AXIS_PB_QUICK_TAGS } from '../../presetBrowser/presetBrowserWorkbenchQuery'; import { axisPbRowAnatomy } from '../../presetBrowser/presetBrowserWorkbenchRowChips'; + import { detailStatusItems } from '../../presetBrowser/presetBrowserWorkbenchDetailStatus'; import { tick } from 'svelte'; import { specsBySlug, @@ -843,9 +844,17 @@
- Grid - Params - 0}>Versions + {#each detailStatusItems(selectedDetail) as item} + + {item.label} + + {/each}
@@ -880,38 +889,30 @@ {#if data.selectedEntry.converted} - - {:else} - {#if data.selectedEntry.sourceId === 'device' && data.selectedEntry.number != null} - {/if} - - {/if} - {#if selectedDetail} -
- {selectedDetail.paramsLoaded ? 'Params loaded' : 'Summary params only'} - {selectedDetail.gridLoaded ? 'Grid preview ready' : 'No grid preview'} - {selectedDetail.versions.length} version{selectedDetail.versions.length === 1 ? '' : 's'} -
- {/if} -