From 2f0af8e241226fef74a7cd42ed649bd9159ef644 Mon Sep 17 00:00:00 2001 From: jason5ng32 Date: Sun, 23 Aug 2026 20:42:22 +0800 Subject: [PATCH 1/4] Fix(ui): stop Safari shifting the select trigger's value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The shadcn default geometry (h-9 + py-2 + text-sm) leaves an 18px content box for a 20px line, so the button content overflows by 2px. Safari re-centers that overflow only when the content changes, which nudged the selected label up ~2px on every pick; Chrome stayed put. py-1 gives the line room, and the value span drops -webkit-box line-clamp for real flexbox so its vertical position no longer depends on legacy layout. SelectValue keeps ellipsis for plain text by wrapping the default label in a truncating span — as a flex child, a bare text node can't truncate. Co-Authored-By: Claude Opus 5 --- frontend/AGENTS.md | 6 ++++-- frontend/components/ui/select/SelectTrigger.vue | 2 +- frontend/components/ui/select/SelectValue.vue | 8 ++++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/frontend/AGENTS.md b/frontend/AGENTS.md index b0b9f8890..f7d9a184a 100644 --- a/frontend/AGENTS.md +++ b/frontend/AGENTS.md @@ -97,8 +97,10 @@ first-party tunnel `/api/monitoring` to beat ad blockers. **shadcn-vue first.** Check `components/ui/`, then the shadcn-vue docs for something to copy in; hand-rolled Tailwind only when neither fits. Keep when syncing upstream: `Spinner` + `ToolLoadingSkeleton` (project-specific), -`toggle` / `toggle-group`'s deliberate `primary` pressed pair, and the -overlay roots' shortcut suspension. +`toggle` / `toggle-group`'s deliberate `primary` pressed pair, the overlay +roots' shortcut suspension, and `select`'s trigger geometry — `py-1` plus a +flex (not `-webkit-box` line-clamp) value span, because Safari shifts button +content up ~2px once it overflows the trigger's content box. ### Design tokens diff --git a/frontend/components/ui/select/SelectTrigger.vue b/frontend/components/ui/select/SelectTrigger.vue index f8db2dd0e..2765d2413 100644 --- a/frontend/components/ui/select/SelectTrigger.vue +++ b/frontend/components/ui/select/SelectTrigger.vue @@ -8,7 +8,7 @@ defineProps({ class: { type: [String, Array, Object], default: undefined } });