From fef0ded76fcfb0f6e027ef50b93211f32339f764 Mon Sep 17 00:00:00 2001 From: Developer Date: Fri, 26 Jun 2026 21:33:19 +0000 Subject: [PATCH] Fix: tabs.tsx data-orientation variants were dead (side-by-side layout) The shared Tabs primitive used data-horizontal:* / data-vertical:* Tailwind variants, but the component sets data-orientation='horizontal' (not data-horizontal). Tailwind v4 data-* variants match attribute names, so data-horizontal:flex-col on the Tabs root never applied -- the TabsList and TabsContent laid out side-by-side instead of stacking. Other consumers (TabbedCard, Settings) wrap their tab children in
s, so the broken flex direction was masked. ServicePage puts TabsList and TabsContent as direct children of , exposing the bug. Fix: switch every dead variant to data-[orientation=horizontal]:* / data-[orientation=vertical]:* (the root flex-col, the list h-8/h-fit/ flex-col, the trigger w-full/justify-start, and the active-indicator after-element positioning). The full orientation system now works as intended for both horizontal and vertical tabs. 117 tests pass; lint/build green. --- frontend/src/components/ui/tabs.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/ui/tabs.tsx b/frontend/src/components/ui/tabs.tsx index 432125c..d52c9db 100644 --- a/frontend/src/components/ui/tabs.tsx +++ b/frontend/src/components/ui/tabs.tsx @@ -14,7 +14,7 @@ function Tabs({ data-slot="tabs" data-orientation={orientation} className={cn( - "group/tabs flex gap-2 data-horizontal:flex-col", + "group/tabs flex gap-2 data-[orientation=horizontal]:flex-col", className )} {...props} @@ -23,7 +23,7 @@ function Tabs({ } const tabsListVariants = cva( - "group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none", + "group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-8 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none", { variants: { variant: { @@ -61,10 +61,10 @@ function TabsTrigger({