fix(visual): dark-mode-safe borders + sidebar relative + ring-background
Code-review follow-up to PR10b-e: - DetailHeaderStrip + KPITile: border-slate-200 → border-border so dark mode doesn't paint a bright halo around the gradient strip. - Topbar avatar: ring-white → ring-background so the 2px ring tracks the surface (matches the sidebar footer pattern). - KpiTileSkeleton stripe: bg-slate-100 → bg-muted for parity with shadcn skeleton tokens in dark mode. - Sidebar <aside>: add `relative` so the absolute-positioned collapse-toggle button anchors to the sidebar itself rather than the nearest positioned ancestor. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -28,8 +28,8 @@ function formatPercent(value: number): string {
|
|||||||
|
|
||||||
function KpiTileSkeleton() {
|
function KpiTileSkeleton() {
|
||||||
return (
|
return (
|
||||||
<div className="relative overflow-hidden rounded-xl border border-slate-200 bg-card p-5 shadow-sm">
|
<div className="relative overflow-hidden rounded-xl border border-border bg-card p-5 shadow-sm">
|
||||||
<div className="absolute inset-x-0 top-0 h-1 bg-slate-100" aria-hidden />
|
<div className="absolute inset-x-0 top-0 h-1 bg-muted" aria-hidden />
|
||||||
<Skeleton className="h-3 w-24" />
|
<Skeleton className="h-3 w-24" />
|
||||||
<Skeleton className="mt-3 h-7 w-32" />
|
<Skeleton className="mt-3 h-7 w-32" />
|
||||||
<Skeleton className="mt-2 h-3 w-12" />
|
<Skeleton className="mt-2 h-3 w-12" />
|
||||||
|
|||||||
@@ -338,7 +338,7 @@ export function Sidebar({ portRoles, isSuperAdmin = false, user }: SidebarProps)
|
|||||||
{/* Desktop sidebar */}
|
{/* Desktop sidebar */}
|
||||||
<aside
|
<aside
|
||||||
className={cn(
|
className={cn(
|
||||||
'hidden md:flex flex-col h-screen border-r border-[#474e66] transition-all duration-200 ease-in-out shrink-0',
|
'relative hidden md:flex flex-col h-screen border-r border-[#474e66] transition-all duration-200 ease-in-out shrink-0',
|
||||||
sidebarCollapsed ? 'w-sidebar-collapsed' : 'w-sidebar',
|
sidebarCollapsed ? 'w-sidebar-collapsed' : 'w-sidebar',
|
||||||
)}
|
)}
|
||||||
style={{ backgroundColor: '#1e2844' }}
|
style={{ backgroundColor: '#1e2844' }}
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ export function Topbar({ ports, user }: TopbarProps) {
|
|||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
<Button variant="ghost" size="icon" className="rounded-full">
|
<Button variant="ghost" size="icon" className="rounded-full">
|
||||||
<Avatar className="w-7 h-7 shadow-sm ring-2 ring-white">
|
<Avatar className="w-7 h-7 shadow-sm ring-2 ring-background">
|
||||||
<AvatarImage src={undefined} />
|
<AvatarImage src={undefined} />
|
||||||
<AvatarFallback className="bg-brand text-white text-xs font-semibold">
|
<AvatarFallback className="bg-brand text-white text-xs font-semibold">
|
||||||
{(user?.name ?? 'U').slice(0, 1).toUpperCase()}
|
{(user?.name ?? 'U').slice(0, 1).toUpperCase()}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export function DetailHeaderStrip({ children, className }: DetailHeaderStripProp
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
'rounded-xl border border-slate-200 bg-gradient-brand-soft px-5 py-4 shadow-xs',
|
'rounded-xl border border-border bg-gradient-brand-soft px-5 py-4 shadow-xs',
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ export function KPITile({
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
'group relative overflow-hidden rounded-xl border border-slate-200 bg-gradient-brand-soft p-5 shadow-sm transition-all duration-base ease-smooth hover:shadow-md',
|
'group relative overflow-hidden rounded-xl border border-border bg-gradient-brand-soft p-5 shadow-sm transition-all duration-base ease-smooth hover:shadow-md',
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
|
|||||||
Reference in New Issue
Block a user