From 862b499abc6d8f530c0c586fe514762a8bc7bb3b Mon Sep 17 00:00:00 2001 From: Kaan Karaca Date: Fri, 7 Aug 2026 14:42:16 +0300 Subject: [PATCH] fix(desktop): use Tailwind v4 (--var) syntax for Radix CSS variables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tailwind v4 removed v3's implicit var() wrapping inside square-bracket arbitrary values, so `w-[--radix-popover-trigger-width]` now compiles to `width: --radix-popover-trigger-width` — a bare custom-property name where a length belongs. That is invalid CSS, so the browser drops the whole declaration and the class silently does nothing. Converted all nine remaining instances to the v4 `(--var)` shorthand, matching context-menu.tsx which already used the correct form. Real layout impact — dropdown/popover no longer matches its trigger width: - nav-user.tsx, team-switcher.tsx: w-(--radix-dropdown-menu-trigger-width) - picker-content.tsx: w-(--radix-popover-trigger-width); the `width="trigger"` prop was a no-op until now - select.tsx: max-h-(--radix-select-content-available-height); long select menus had no viewport height cap Animation origin fell back to `center` instead of the popper-anchored corner: - dropdown-menu.tsx (x2), select.tsx, popover.tsx, hover-card.tsx, tooltip.tsx Also converts two pre-existing physical Tailwind classes in team-switcher.tsx (text-left -> text-start, ml-auto -> ms-auto) — the pre-commit renderer guard scans whole staged files, so touching the file requires clearing them. Verified: grep for the v3 pattern returns no matches, typecheck:web clean, test:renderer 559 files / 6301 passed. --- apps/desktop/src/renderer/src/components/nav-user.tsx | 2 +- apps/desktop/src/renderer/src/components/team-switcher.tsx | 6 +++--- .../src/renderer/src/components/ui/dropdown-menu.tsx | 4 ++-- apps/desktop/src/renderer/src/components/ui/hover-card.tsx | 2 +- .../renderer/src/components/ui/picker/picker-content.tsx | 2 +- apps/desktop/src/renderer/src/components/ui/popover.tsx | 2 +- apps/desktop/src/renderer/src/components/ui/select.tsx | 2 +- apps/desktop/src/renderer/src/components/ui/tooltip.tsx | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/apps/desktop/src/renderer/src/components/nav-user.tsx b/apps/desktop/src/renderer/src/components/nav-user.tsx index 9c5520d06..0f08f4c28 100644 --- a/apps/desktop/src/renderer/src/components/nav-user.tsx +++ b/apps/desktop/src/renderer/src/components/nav-user.tsx @@ -76,7 +76,7 @@ export function NavUser({ -
+
{activeTeam.name}
- +