Skip to content

Commit 773965a

Browse files
committed
fix(dashboard): fix tracking setup page scroll and clean up tabs DS
- Fix scroll by making hidden-toolbar wrapper a flex container so child pages can use flex-1 overflow-y-auto properly - Align tracking page with other settings pages (max-w-2xl, p-5, space-y-6) - Add gap-1.5 to Tabs.Tab for icon-text spacing - Add visual grouping to Tabs.List (border, bg, padding) - Update active tab style to bg-background + shadow for clear selection state
1 parent 0db292c commit 773965a

File tree

4 files changed

+16
-9
lines changed

4 files changed

+16
-9
lines changed

apps/dashboard/app/(main)/websites/[id]/_components/tabs/tracking-setup-tab.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -755,14 +755,14 @@ export function WebsiteTrackingSetupTab({ websiteId }: TrackingSetupTabProps) {
755755
};
756756

757757
return (
758-
<div className="space-y-4">
758+
<>
759759
<TrackingStatusBanner
760760
isRefreshing={isRefreshing}
761761
isSetup={isSetup}
762762
onRefresh={handleRefresh}
763763
/>
764764

765-
<div className="space-y-4">
765+
<div className="space-y-6">
766766
{/* Step 1: Install */}
767767
<Card className="gap-0 py-0">
768768
<Card.Content className="p-0">
@@ -839,6 +839,6 @@ export function WebsiteTrackingSetupTab({ websiteId }: TrackingSetupTabProps) {
839839
</a>
840840
</Button>
841841
</div>
842-
</div>
842+
</>
843843
);
844844
}

apps/dashboard/app/(main)/websites/[id]/layout.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ export default function WebsiteLayout({ children }: WebsiteLayoutProps) {
112112
)}
113113

114114
{hideToolbar ? (
115-
<div className="min-h-0 flex-1 overflow-hidden">{children}</div>
115+
<div className="flex min-h-0 flex-1 flex-col overflow-hidden">
116+
{children}
117+
</div>
116118
) : (
117119
<div className="min-h-0 flex-1 overflow-y-auto overscroll-none">
118120
{showTrackingSetup ? (

apps/dashboard/app/(main)/websites/[id]/settings/tracking/page.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ export default function TrackingSetupPage() {
88
const websiteId = params.id as string;
99

1010
return (
11-
<div className="flex-1 overflow-y-auto px-4 py-6 sm:px-6">
12-
<WebsiteTrackingSetupTab websiteId={websiteId} />
11+
<div className="flex-1 overflow-y-auto">
12+
<div className="mx-auto max-w-2xl space-y-6 p-5">
13+
<WebsiteTrackingSetupTab websiteId={websiteId} />
14+
</div>
1315
</div>
1416
);
1517
}

apps/dashboard/components/ds/tabs.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ function List({
1717
}: ComponentPropsWithoutRef<typeof BaseTabs.List>) {
1818
return (
1919
<BaseTabs.List
20-
className={cn("relative flex gap-0.5", className)}
20+
className={cn(
21+
"relative flex gap-0.5 rounded-lg border bg-secondary/50 p-1",
22+
className
23+
)}
2124
{...rest}
2225
/>
2326
);
@@ -30,10 +33,10 @@ function Tab({
3033
return (
3134
<BaseTabs.Tab
3235
className={cn(
33-
"inline-flex h-7 cursor-pointer select-none items-center rounded-md px-2.5 font-medium text-muted-foreground text-xs",
36+
"inline-flex h-7 cursor-pointer select-none items-center gap-1.5 rounded-md px-2.5 font-medium text-muted-foreground text-xs",
3437
"transition-colors duration-(--duration-quick) ease-(--ease-smooth)",
3538
"hover:bg-interactive-hover hover:text-foreground",
36-
"data-active:bg-secondary data-active:text-foreground",
39+
"data-active:bg-background data-active:text-foreground data-active:shadow-sm",
3740
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",
3841
"disabled:pointer-events-none disabled:opacity-50",
3942
className

0 commit comments

Comments
 (0)