mirror of
https://github.com/supabase/supabase.git
synced 2026-05-31 18:03:33 +08:00
* Add unified logs feature preview and toggle controls Introduces a unified logs feature preview, allowing users to enable or disable a new logs interface with enhanced filtering and real-time updates. Adds context hooks, UI components (UnifiedLogsPreview, LogsSwitchBox), and conditional logic to display the new interface or revert to the old one. Updates routing and feature preview modal to support the unified logs preview, and extends local storage keys for feature flag management. * Refactor log UI components and remove LogsSwitchBox Replaced custom SVG icons with Lucide React icons in LogsSidebarMenuV2 and FilterSideBar for consistency and maintainability. Removed the unused LogsSwitchBox component and cleaned up related imports in FeaturePreviewModal. * Refactor sidebar panels to use FeaturePreviewSidebarPanel Introduces a reusable FeaturePreviewSidebarPanel component and replaces InnerSideBarEmptyPanel usages in LogsSidebarMenuV2 and FilterSideBar. Removes unified logs feature flag logic from Sidebar and NavigationBar.utils, simplifying route generation and UI logic. * Refine sidebar panel styles and remove unused icon Removed the unused Sparkles icon import from LogsSidebarMenuV2. Updated FeaturePreviewSidebarPanel to use 'bg-muted/10' for background, simplified class names for text alignment, and cleaned up redundant text-left classes for improved styling consistency. * Update FeaturePreviewModal.tsx * Update FeaturePreview.constants.tsx * Clean up * Final clean up --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
40 lines
1.0 KiB
TypeScript
40 lines
1.0 KiB
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',
|
|
'bg-muted/10 border-border/50',
|
|
// 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>
|
|
)
|
|
}
|