mirror of
https://github.com/supabase/supabase.git
synced 2026-10-14 13:49:09 +03:00
Lifecycle policy section: - Drop the descriptive intro sentence, the broom icon on the heading, and the collapsible "See how this works" example — three ways of saying the same thing, per feedback. - Move the BOTH / EITHER join-mode toggle out of the sentence and into a proper ToggleGroup that sits between the two condition inputs, visually joining them (only rendered when both conditions are set — a single condition has nothing to combine). Suspension flow: - Trim the inline admonition down to a one-liner heads-up. - The full "already-retained data stays, no new versions get created, re-enable any time" explanation moves to a ConfirmationModal that fires on save when the user is suspending a live-versioning bucket; confirming replays the write, cancelling bails. - No confirmation for buckets that were already suspended.
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 — use a named export, not a default export
export const ComponentA = ({ sampleProp }: ComponentAProps) => {
return <div>ComponentA: {sampleProp}</div>
}