mirror of
https://github.com/supabase/supabase.git
synced 2026-10-09 03:15:06 +03:00
## Problem After the Tailwind v4 upgrade, the 3xx/4xx HTTP status badge in the Logs explorer rendered with a saturated yellow background and washed-out text, because `bg-amber-300`/`text-amber-1100` no longer resolve as they did under v3. ## Fix Switch the 3xx/4xx case in `ResponseCodeFormatter` to the existing `bg-warning/10 text-warning` semantic tokens, matching the pattern used by the shared `Badge` warning variant. ## Before <img width="798" height="722" alt="CleanShot 2026-05-05 at 12 13 23@2x" src="https://github.com/user-attachments/assets/a2d37f37-4260-4ec6-bf1c-ff96b6f51be0" /> ## After <img width="642" height="530" alt="CleanShot 2026-05-05 at 12 12 55@2x" src="https://github.com/user-attachments/assets/7c82aee2-0d40-4213-8533-14ffb04fb5de" /> ## How to test - Run `pnpm dev:studio` - Open any project's Logs explorer (API, Edge Functions, Auth, etc.) - Find a row with a 3xx or 4xx status code - Expected: faint yellow background with a darker amber/yellow text, consistent with other warning badges in the app - Confirm 2xx (brand) and 5xx (red) badges still render as before <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** * Updated the visual styling of response codes in the logs display for improved consistency. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
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