mirror of
https://github.com/supabase/supabase.git
synced 2026-10-09 11:25:06 +03:00
## Problem When [#46812](https://github.com/supabase/supabase/pull/46812) was scoped down to "sidebar visual changes only", Kemal's UI redesign of the Unified Logs sidebar banners was unintentionally reverted back to the older full-bleed strip layout. The shared `UnifiedLogsBanner` component survived, but his actual visual design did not. This PR brings back just Kemal's banner UI changes, with nothing else from that branch. ## Changes - **promo variant** (`LogsSidebarMenuV2`): bordered card with a "New" badge, an "Introducing unified logs" heading, and an "Enable preview" button + "More information" tooltip button - **utility variant** (`FilterSideBar`): bordered card for the "Go back to old logs" action with a "Switch back" tooltip button - Restore the `mx-4 mt-4` placement in both consumers Adapted to the current `Button` `variant` API (the original used the now-removed `type` prop). ## Testing - `pnpm lint --filter=studio` - Visual check of the Logs sidebar for an account eligible for Unified Logs (promo card) and one already on Unified Logs (utility card) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a "New" badge indicator to the logs interface. * **Style** * Redesigned the unified logs banner with a new card-based layout. * Updated the "Go back to old logs" option with improved visual presentation and tooltip guidance. * Adjusted spacing and alignment of the banner component for better visual hierarchy. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: kemal <hello@kemal.earth> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Writing components
Where to create your components
- For components that declare the general structure and layout of a page:
/components/layouts/xxx
- For components that are tightly coupled to a specific interface:
/components/interfaces/xxx
- For components that are meant to be reusable across multiple pages:
/components/ui/xxx
- Note: We're gradually moving files out of the
to-be-cleanedfolder into the respective folders as we refactor
Component structure
- If a component has constants and utility methods that are tightly coupled to itself, keep them close to the component and enclose them in a folder with an
index.tsxas an entry point - Otherwise it can just be a file on its own
- For example:
-
components/ui - SampleComponentA - SampleComponentA.tsx - SampleComponentA.constants.ts - SampleComponentA.utils.ts - SampleComponentA.types.ts - index.ts - SampleComponentB.tsx
-
Template for building components
// Declare the prop types of your component
interface ComponentAProps {
sampleProp: string
}
// Name your component accordingly
const ComponentA = ({ sampleProp }: ComponentAProps) => {
return <div>ComponentA: {sampleProp}</div>
}
export default ComponentA