mirror of
https://github.com/supabase/supabase.git
synced 2026-12-03 23:18:57 +00:00
## Problem Unified Logs sidebar title and a few other bits fell out of sync after a recent change. ## Solution The Unified Logs filter sidebar hand-rolled its own header instead of using the shared `ProductMenuBar` header, so it drifted from every other section. This brings it back in line. - **Title**: `<p className="text-lg">` → `<h4 className="text-sm">`, matching `ProductMenuBar`. - **Header**: `px-4` → `px-6`, `gap-3` → `gap-2`, and `h-[48px]` → `min-h-(--header-height)`. - **Filter area**: `p-2` → `px-4 py-1.5`, so filter labels share the same left edge as the title. - **"Capture your logs" card**: dropped `mx-2` so it spans the container gutter. - **Reset button**: `variant="text"`, tooltip moved to `side="bottom"`. - **Card surfaces**: removed the ad-hoc `bg-muted/10 border-border/50` override so cards use the default border and inherit the sidebar surface. Note: `FeaturePreviewSidebarPanel` is shared, so the Advisors sidebar card loses the same tint — intentional, it brings all usages in line. | Before | After | |--------|--------| | <img width="293" height="745" alt="Screenshot 2026-11-16 at 19 11 05" src="https://github.com/user-attachments/assets/dc1ec664-382a-4e3b-a85b-40d37a8b479f" /> | <img width="265" height="739" alt="Screenshot 2026-11-16 at 19 10 43" src="https://github.com/user-attachments/assets/315fece5-3b45-4826-8e5c-5f6f9a1c258b" /> | ## Review instructions 1. Open Unified Logs (`/project/_/logs`) with the unified logs preview enabled. 2. Compare the sidebar header ("Logs" + Beta badge) against another section's sidebar header, e.g. Observability (`/project/_/advisors/rules` → Observability menu). The title size, weight and left padding should now match. 3. Confirm the filter labels ("Time Range", etc.) line up with the "Logs" title on the same left edge, and that the "Capture your logs" card spans the same width as the filter rows above it. 4. Apply a filter so the Reset button appears. It should render as a text button (no raised/filled background) and its tooltip should open below it. 5. Check the "Capture your logs" and "Go back to old logs" cards have no tinted background — just a border against the sidebar surface. 6. Check the Advisors sidebar (`/project/_/advisors`) card picks up the same treatment.
39 lines
985 B
TypeScript
39 lines
985 B
TypeScript
import { ReactNode } from 'react'
|
|
import { cn } from 'ui'
|
|
|
|
interface FeaturePreviewSidebarPanelProps {
|
|
title: string
|
|
description: string
|
|
illustration?: ReactNode
|
|
actions?: ReactNode
|
|
className?: string
|
|
}
|
|
|
|
export function FeaturePreviewSidebarPanel({
|
|
title,
|
|
description,
|
|
illustration,
|
|
actions,
|
|
className,
|
|
}: FeaturePreviewSidebarPanelProps) {
|
|
return (
|
|
<div
|
|
className={cn(
|
|
'rounded-lg border p-4 space-y-3',
|
|
// Force left alignment and override any centering
|
|
'text-left **:text-left [&_div]:items-start',
|
|
className
|
|
)}
|
|
>
|
|
{illustration && <div className="flex justify-start items-start">{illustration}</div>}
|
|
|
|
<div className="space-y-1">
|
|
<h3 className="font-medium text-sm text-foreground">{title}</h3>
|
|
<p className="text-xs text-foreground-light">{description}</p>
|
|
</div>
|
|
|
|
{actions && <div className="flex justify-start items-start gap-x-2">{actions}</div>}
|
|
</div>
|
|
)
|
|
}
|