Skip to content

chore: uniform card and panel padding-x#41237

Merged
fsansalvadore merged 4 commits into
masterfrom
chore/card-panel-x-padding
Dec 11, 2025
Merged

chore: uniform card and panel padding-x#41237
fsansalvadore merged 4 commits into
masterfrom
chore/card-panel-x-padding

Conversation

@fsansalvadore

@fsansalvadore fsansalvadore commented Dec 10, 2025

Copy link
Copy Markdown
Contributor

Adding a global css --card-padding-x variable to centralize the horizontal spacing for cards and panels and other layouts that commonly should align to these.

Some examples

Before After
Screenshot 2025-12-10 at 16 10 06 Screenshot 2025-12-10 at 16 07 35
Before After
Screenshot 2025-12-09 at 12 28 43 Screenshot 2025-12-10 at 16 10 28

Summary by CodeRabbit

Release Notes

  • Style
    • Updated horizontal padding across UI components to use standardized CSS design tokens instead of fixed pixel values. Changes ensure consistent spacing throughout panels, forms, cards, and interface elements while improving maintainability and flexibility of the design system for future adjustments.

✏️ Tip: You can customize this high-level summary in your review settings.

@fsansalvadore fsansalvadore requested review from a team as code owners December 10, 2025 15:15
@vercel

vercel Bot commented Dec 10, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
studio-self-hosted Ready Ready Preview Comment Dec 11, 2025 9:04am
studio-staging Ready Ready Preview Comment Dec 11, 2025 9:04am
6 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
studio Ignored Ignored Dec 11, 2025 9:04am
cms Skipped Skipped Dec 11, 2025 9:04am
design-system Skipped Skipped Dec 11, 2025 9:04am
docs Skipped Skipped Dec 11, 2025 9:04am
ui-library Skipped Skipped Dec 11, 2025 9:04am
zone-www-dot-com Skipped Skipped Dec 11, 2025 9:04am

@supabase

supabase Bot commented Dec 10, 2025

Copy link
Copy Markdown

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coveralls

coveralls commented Dec 10, 2025

Copy link
Copy Markdown

Coverage Status

coverage: 68.471%. remained the same
when pulling d97029d on chore/card-panel-x-padding
into 7ba95d2 on master.

@github-actions

github-actions Bot commented Dec 10, 2025

Copy link
Copy Markdown
Contributor

🎭 Playwright Test Results

passed  58 passed
flaky  1 flaky
skipped  4 skipped

Details

stats  63 tests across 10 suites
duration  10 minutes, 45 seconds
commit  d97029d

Flaky tests

Features › database.spec.ts › Database › Schema Visualizer › actions works as expected

Skipped tests

Features › sql-editor.spec.ts › SQL Editor › snippet favourite works as expected
Features › sql-editor.spec.ts › SQL Editor › share with team works as expected
Features › sql-editor.spec.ts › SQL Editor › folders works as expected
Features › sql-editor.spec.ts › SQL Editor › other SQL snippets actions work as expected

@kemaldotearth kemaldotearth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this effect anywhere we have <Card /> with zero padding? I guess the p-0 applied via className overrides it still or?

@fsansalvadore fsansalvadore enabled auto-merge (squash) December 11, 2025 08:59
@coderabbitai

coderabbitai Bot commented Dec 11, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

This pull request introduces four new CSS custom properties for responsive card padding and refactors UI components across the application to use these variables instead of hard-coded padding utilities. The changes consolidate spacing tokens into a centralized CSS variable system for improved maintainability and consistency.

Changes

Cohort / File(s) Change Summary
CSS Custom Properties
packages/ui/build/css/source/global.css
Added four new CSS custom properties: --padding-x-sm (1rem), --padding-x-md (1.5rem), --card-padding-x (references --padding-x-sm), and --card-padding-x-md (references --padding-x-md).
Card Component Update
packages/ui/src/components/shadcn/ui/card.tsx
Replaced fixed horizontal padding (px-6) in CardHeader, CardContent, and CardFooter with CSS variable-based padding (px-[var(--card-padding-x)]).
Database Role Components
apps/studio/components/interfaces/Database/Roles/RoleRow.tsx, RolesList.tsx
Updated padding from fixed utilities (px-4 md:px-6, px-6) to CSS variable-based padding (px-[var(--card-padding-x)]).
Disk Management
apps/studio/components/interfaces/DiskManagement/DiskManagementForm.tsx
Replaced three instances of px-8 with px-[var(--card-padding-x)] across collapsible trigger, advanced section wrapper, and inner content areas.
Organization Settings
apps/studio/components/interfaces/Organization/BillingSettings/BillingEmail.tsx, SSO/SSOConfig.tsx
Updated footer wrapper padding from px-8 to CSS variable (px-[var(--card-padding-x)]); removed py-8 from CardContent in SSOConfig.
Settings Components
apps/studio/components/interfaces/Settings/API/PostgrestConfig.tsx, General/CustomDomainConfig/CustomDomainsConfigureHostname.tsx, General/General.tsx
Replaced hard-coded padding (px-8) with px-[var(--card-padding-x)] in form layouts, footer containers, and action row sections.
Shared UI Components
apps/studio/components/ui/Forms/FormSection.tsx, Panel.tsx
Updated horizontal padding from fixed utilities (px-4 md:px-8, px-4) to CSS variable-based padding (px-[var(--card-padding-x)]) across container, header, content, footer, and notice elements.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Visual regression testing: Verify padding appearance remains consistent across all affected components in different viewport sizes
  • CSS variable scope verification: Ensure --card-padding-x is accessible in all contexts (shadcn components, form layouts, panel wrappers)
  • SSOConfig exception: Confirm the removal of py-8 from CardContent is intentional and doesn't create unintended visual changes

Suggested reviewers

  • joshenlim
  • SaxonF

Poem

🐰 Paddings once were scattered wide,
Hard-coded values far and far,
But now with CSS variables as our guide,
Consistency shines like a star!
From root to card, the spacing flows free,

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive The PR description explains the purpose and includes before/after visual examples, but does not follow the required template structure with all sections completed. Consider following the repository's template: explicitly state 'YES' for CONTRIBUTING.md acknowledgment, specify the change type (chore), and clearly describe current vs. new behavior.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: introducing uniform card and panel padding using a CSS variable approach.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/card-panel-x-padding

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
packages/ui/build/css/source/global.css (1)

129-132: New horizontal padding tokens look good; consider when to apply the -md variant

Defining --padding-x-sm / --padding-x-md and the derived --card-padding-x / --card-padding-x-md gives you a clear, tokenized way to keep card/panel x‑spacing consistent and adjustable from a single place. The inline comments mapping to px-4 / px-6 are helpful.

Right now, in the snippets shown, only --card-padding-x is used. That’s fine, but if the design later calls for wider padding at larger breakpoints (as some components previously had), you already have --card-padding-x-md ready to be wired up via md:px-[var(--card-padding-x-md)].

No changes needed here.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7ba95d2 and d97029d.

📒 Files selected for processing (12)
  • apps/studio/components/interfaces/Database/Roles/RoleRow.tsx (1 hunks)
  • apps/studio/components/interfaces/Database/Roles/RolesList.tsx (2 hunks)
  • apps/studio/components/interfaces/DiskManagement/DiskManagementForm.tsx (2 hunks)
  • apps/studio/components/interfaces/Organization/BillingSettings/BillingEmail.tsx (1 hunks)
  • apps/studio/components/interfaces/Organization/SSO/SSOConfig.tsx (1 hunks)
  • apps/studio/components/interfaces/Settings/API/PostgrestConfig.tsx (5 hunks)
  • apps/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainsConfigureHostname.tsx (1 hunks)
  • apps/studio/components/interfaces/Settings/General/General.tsx (3 hunks)
  • apps/studio/components/ui/Forms/FormSection.tsx (1 hunks)
  • apps/studio/components/ui/Panel.tsx (3 hunks)
  • packages/ui/build/css/source/global.css (1 hunks)
  • packages/ui/src/components/shadcn/ui/card.tsx (2 hunks)
🧰 Additional context used
🧠 Learnings (19)
📚 Learning: 2025-12-11T02:40:11.135Z
Learnt from: CR
Repo: supabase/supabase PR: 0
File: .cursor/rules/studio-ui.mdc:0-0
Timestamp: 2025-12-11T02:40:11.135Z
Learning: Applies to apps/studio/**/*.{ts,tsx} : Use CardContent for card sections, CardFooter for actions, and CardHeader/CardTitle only when card content is not described by surrounding content or when using multiple Cards to group related pieces

Applied to files:

  • apps/studio/components/interfaces/Database/Roles/RolesList.tsx
  • apps/studio/components/interfaces/Settings/General/General.tsx
  • apps/studio/components/ui/Forms/FormSection.tsx
  • apps/studio/components/interfaces/DiskManagement/DiskManagementForm.tsx
  • apps/studio/components/interfaces/Settings/API/PostgrestConfig.tsx
  • apps/studio/components/interfaces/Organization/SSO/SSOConfig.tsx
  • apps/studio/components/ui/Panel.tsx
  • apps/studio/components/interfaces/Organization/BillingSettings/BillingEmail.tsx
  • packages/ui/src/components/shadcn/ui/card.tsx
  • apps/studio/components/interfaces/Database/Roles/RoleRow.tsx
📚 Learning: 2025-12-11T02:40:11.135Z
Learnt from: CR
Repo: supabase/supabase PR: 0
File: .cursor/rules/studio-ui.mdc:0-0
Timestamp: 2025-12-11T02:40:11.135Z
Learning: Applies to apps/studio/**/*.{ts,tsx} : Use generic ui table components for most tables, contained within a Card

Applied to files:

  • apps/studio/components/interfaces/Database/Roles/RolesList.tsx
  • apps/studio/components/interfaces/Settings/General/General.tsx
  • apps/studio/components/ui/Forms/FormSection.tsx
  • apps/studio/components/interfaces/DiskManagement/DiskManagementForm.tsx
  • apps/studio/components/interfaces/Settings/API/PostgrestConfig.tsx
  • apps/studio/components/interfaces/Organization/SSO/SSOConfig.tsx
  • apps/studio/components/ui/Panel.tsx
  • packages/ui/src/components/shadcn/ui/card.tsx
  • apps/studio/components/interfaces/Database/Roles/RoleRow.tsx
📚 Learning: 2025-12-11T02:40:11.135Z
Learnt from: CR
Repo: supabase/supabase PR: 0
File: .cursor/rules/studio-ui.mdc:0-0
Timestamp: 2025-12-11T02:40:11.135Z
Learning: Applies to apps/studio/**/*.{ts,tsx} : Use Card component to group related pieces of information

Applied to files:

  • apps/studio/components/interfaces/Database/Roles/RolesList.tsx
  • apps/studio/components/interfaces/DiskManagement/DiskManagementForm.tsx
  • apps/studio/components/interfaces/Settings/API/PostgrestConfig.tsx
  • apps/studio/components/interfaces/Organization/SSO/SSOConfig.tsx
  • apps/studio/components/ui/Panel.tsx
  • packages/ui/src/components/shadcn/ui/card.tsx
  • apps/studio/components/interfaces/Database/Roles/RoleRow.tsx
📚 Learning: 2025-12-11T02:40:11.135Z
Learnt from: CR
Repo: supabase/supabase PR: 0
File: .cursor/rules/studio-ui.mdc:0-0
Timestamp: 2025-12-11T02:40:11.135Z
Learning: Applies to apps/studio/**/*.{ts,tsx} : Wrap forms in a Card component unless specified otherwise

Applied to files:

  • apps/studio/components/interfaces/Database/Roles/RolesList.tsx
  • apps/studio/components/interfaces/Settings/General/General.tsx
  • apps/studio/components/ui/Forms/FormSection.tsx
  • apps/studio/components/interfaces/DiskManagement/DiskManagementForm.tsx
  • apps/studio/components/interfaces/Settings/API/PostgrestConfig.tsx
  • apps/studio/components/interfaces/Organization/SSO/SSOConfig.tsx
  • apps/studio/components/ui/Panel.tsx
  • packages/ui/src/components/shadcn/ui/card.tsx
  • apps/studio/components/interfaces/Database/Roles/RoleRow.tsx
📚 Learning: 2025-12-11T02:40:11.135Z
Learnt from: CR
Repo: supabase/supabase PR: 0
File: .cursor/rules/studio-ui.mdc:0-0
Timestamp: 2025-12-11T02:40:11.135Z
Learning: Applies to apps/studio/**/*.{ts,tsx} : For simple lists of objects, use ResourceList with ResourceListItem instead of tables

Applied to files:

  • apps/studio/components/interfaces/Database/Roles/RolesList.tsx
📚 Learning: 2025-12-11T02:40:11.135Z
Learnt from: CR
Repo: supabase/supabase PR: 0
File: .cursor/rules/studio-ui.mdc:0-0
Timestamp: 2025-12-11T02:40:11.135Z
Learning: Applies to apps/studio/**/*.{ts,tsx} : Use typography classes from apps/studio/styles/typography.scss instead of hard-coding Tailwind classes (e.g., use 'heading-default' instead of 'text-sm font-medium')

Applied to files:

  • apps/studio/components/interfaces/Database/Roles/RolesList.tsx
  • apps/studio/components/interfaces/Settings/General/General.tsx
  • apps/studio/components/ui/Forms/FormSection.tsx
  • apps/studio/components/interfaces/DiskManagement/DiskManagementForm.tsx
  • apps/studio/components/interfaces/Settings/API/PostgrestConfig.tsx
  • apps/studio/components/interfaces/Organization/SSO/SSOConfig.tsx
  • apps/studio/components/ui/Panel.tsx
  • packages/ui/src/components/shadcn/ui/card.tsx
📚 Learning: 2025-12-11T02:40:11.135Z
Learnt from: CR
Repo: supabase/supabase PR: 0
File: .cursor/rules/studio-ui.mdc:0-0
Timestamp: 2025-12-11T02:40:11.135Z
Learning: Applies to apps/studio/**/*.{ts,tsx} : Use _Shadcn_ form primitives (Form_Shadcn_, FormField_Shadcn_, FormControl_Shadcn_) and prefer FormItemLayout with layout='flex-row-reverse' for form controls

Applied to files:

  • apps/studio/components/interfaces/Database/Roles/RolesList.tsx
  • apps/studio/components/interfaces/Settings/General/General.tsx
  • apps/studio/components/ui/Forms/FormSection.tsx
  • apps/studio/components/interfaces/DiskManagement/DiskManagementForm.tsx
  • apps/studio/components/interfaces/Settings/API/PostgrestConfig.tsx
  • apps/studio/components/interfaces/Organization/SSO/SSOConfig.tsx
  • apps/studio/components/ui/Panel.tsx
  • packages/ui/src/components/shadcn/ui/card.tsx
  • apps/studio/components/interfaces/Database/Roles/RoleRow.tsx
  • apps/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainsConfigureHostname.tsx
📚 Learning: 2025-12-11T02:40:11.135Z
Learnt from: CR
Repo: supabase/supabase PR: 0
File: .cursor/rules/studio-ui.mdc:0-0
Timestamp: 2025-12-11T02:40:11.135Z
Learning: Applies to apps/studio/**/*.{ts,tsx} : UI components from packages/ui should be imported with _Shadcn_ suffix where applicable (e.g., Input_Shadcn_)

Applied to files:

  • apps/studio/components/interfaces/Database/Roles/RolesList.tsx
  • apps/studio/components/ui/Forms/FormSection.tsx
  • apps/studio/components/interfaces/DiskManagement/DiskManagementForm.tsx
  • apps/studio/components/interfaces/Settings/API/PostgrestConfig.tsx
  • apps/studio/components/interfaces/Organization/SSO/SSOConfig.tsx
  • apps/studio/components/ui/Panel.tsx
  • packages/ui/src/components/shadcn/ui/card.tsx
  • apps/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainsConfigureHostname.tsx
📚 Learning: 2025-12-11T02:40:11.135Z
Learnt from: CR
Repo: supabase/supabase PR: 0
File: .cursor/rules/studio-ui.mdc:0-0
Timestamp: 2025-12-11T02:40:11.135Z
Learning: Applies to apps/studio/components/ui/**/*.{ts,tsx} : Studio-specific generic UI components should be placed in apps/studio/components/ui

Applied to files:

  • apps/studio/components/interfaces/Settings/General/General.tsx
  • apps/studio/components/interfaces/DiskManagement/DiskManagementForm.tsx
  • apps/studio/components/interfaces/Settings/API/PostgrestConfig.tsx
  • apps/studio/components/interfaces/Organization/SSO/SSOConfig.tsx
  • apps/studio/components/ui/Panel.tsx
📚 Learning: 2025-12-11T02:40:11.135Z
Learnt from: CR
Repo: supabase/supabase PR: 0
File: .cursor/rules/studio-ui.mdc:0-0
Timestamp: 2025-12-11T02:40:11.135Z
Learning: Applies to apps/studio/**/*.{ts,tsx} : If a form's submit button is outside the form element, create a formId variable and set it as the id prop on the form and formId on the button

Applied to files:

  • apps/studio/components/interfaces/Settings/General/General.tsx
  • apps/studio/components/ui/Forms/FormSection.tsx
  • apps/studio/components/interfaces/Organization/SSO/SSOConfig.tsx
📚 Learning: 2025-12-11T02:40:11.135Z
Learnt from: CR
Repo: supabase/supabase PR: 0
File: .cursor/rules/studio-ui.mdc:0-0
Timestamp: 2025-12-11T02:40:11.135Z
Learning: Applies to apps/studio/**/*.{ts,tsx} : Use ScaffoldSection, ScaffoldSectionTitle, and ScaffoldSectionDescription for multi-section page layouts

Applied to files:

  • apps/studio/components/ui/Forms/FormSection.tsx
📚 Learning: 2025-12-11T02:40:11.135Z
Learnt from: CR
Repo: supabase/supabase PR: 0
File: .cursor/rules/studio-ui.mdc:0-0
Timestamp: 2025-12-11T02:40:11.135Z
Learning: Applies to apps/studio/**/*.{ts,tsx} : Build forms with react-hook-form + zod

Applied to files:

  • apps/studio/components/ui/Forms/FormSection.tsx
  • apps/studio/components/interfaces/DiskManagement/DiskManagementForm.tsx
  • apps/studio/components/interfaces/Settings/API/PostgrestConfig.tsx
📚 Learning: 2025-12-11T02:40:11.135Z
Learnt from: CR
Repo: supabase/supabase PR: 0
File: .cursor/rules/studio-ui.mdc:0-0
Timestamp: 2025-12-11T02:40:11.135Z
Learning: Applies to apps/studio/pages/**/*.{ts,tsx} : Use related layout components (e.g., AuthLayout) when a page is within an existing section

Applied to files:

  • apps/studio/components/ui/Forms/FormSection.tsx
📚 Learning: 2025-12-11T02:40:11.135Z
Learnt from: CR
Repo: supabase/supabase PR: 0
File: .cursor/rules/studio-ui.mdc:0-0
Timestamp: 2025-12-11T02:40:11.135Z
Learning: Applies to packages/ui/**/*.{ts,tsx} : Do not introduce new UI components in packages/ui unless explicitly asked to; use existing shadcn/ui-based components

Applied to files:

  • apps/studio/components/interfaces/DiskManagement/DiskManagementForm.tsx
  • apps/studio/components/interfaces/Organization/SSO/SSOConfig.tsx
  • apps/studio/components/ui/Panel.tsx
  • packages/ui/src/components/shadcn/ui/card.tsx
📚 Learning: 2025-12-11T02:40:11.135Z
Learnt from: CR
Repo: supabase/supabase PR: 0
File: .cursor/rules/studio-ui.mdc:0-0
Timestamp: 2025-12-11T02:40:11.135Z
Learning: Applies to apps/studio/pages/**/*.{ts,tsx} : Use PageLayout component for new page structures with props: children, title, subtitle, icon, breadcrumbs, primaryActions, secondaryActions, navigationItems, className, size, isCompact

Applied to files:

  • apps/studio/components/interfaces/Settings/API/PostgrestConfig.tsx
  • apps/studio/components/ui/Panel.tsx
📚 Learning: 2025-12-11T02:40:11.135Z
Learnt from: CR
Repo: supabase/supabase PR: 0
File: .cursor/rules/studio-ui.mdc:0-0
Timestamp: 2025-12-11T02:40:11.135Z
Learning: Applies to apps/studio/**/*.{ts,tsx} : Prefer _Shadcn_ components over non-suffixed variants when available

Applied to files:

  • apps/studio/components/ui/Panel.tsx
  • packages/ui/src/components/shadcn/ui/card.tsx
📚 Learning: 2025-12-11T02:40:11.135Z
Learnt from: CR
Repo: supabase/supabase PR: 0
File: .cursor/rules/studio-ui.mdc:0-0
Timestamp: 2025-12-11T02:40:11.135Z
Learning: Read packages/ui/index.tsx file for full list of available components before composing interfaces

Applied to files:

  • apps/studio/components/ui/Panel.tsx
📚 Learning: 2025-12-11T02:40:11.135Z
Learnt from: CR
Repo: supabase/supabase PR: 0
File: .cursor/rules/studio-ui.mdc:0-0
Timestamp: 2025-12-11T02:40:11.135Z
Learning: Applies to apps/studio/**/*.{ts,tsx} : Use ScaffoldContainer for center-aligned container content

Applied to files:

  • apps/studio/components/ui/Panel.tsx
📚 Learning: 2025-12-11T02:40:11.135Z
Learnt from: CR
Repo: supabase/supabase PR: 0
File: .cursor/rules/studio-ui.mdc:0-0
Timestamp: 2025-12-11T02:40:11.135Z
Learning: Applies to apps/studio/**/*.{ts,tsx} : Place table-associated actions on the right-hand side above the table

Applied to files:

  • apps/studio/components/interfaces/Database/Roles/RoleRow.tsx
🧬 Code graph analysis (2)
apps/studio/components/interfaces/Organization/SSO/SSOConfig.tsx (1)
packages/ui/src/components/shadcn/ui/card.tsx (1)
  • CardContent (70-70)
packages/ui/src/components/shadcn/ui/card.tsx (1)
blocks/vue/registry/default/lib/utils.ts (1)
  • cn (5-7)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: format
  • GitHub Check: test
  • GitHub Check: test (1)
  • GitHub Check: typecheck
🔇 Additional comments (10)
apps/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainsConfigureHostname.tsx (1)

69-69: LGTM! Clean padding token migration.

The horizontal padding update aligns with the centralized CSS variable system introduced in this PR.

apps/studio/components/interfaces/Organization/SSO/SSOConfig.tsx (1)

183-183: LGTM! Padding now controlled by CardContent defaults.

The removal of explicit vertical padding delegates spacing control to the CardContent component, which now uses the centralized CSS variable system.

apps/studio/components/interfaces/Settings/General/General.tsx (1)

104-104: LGTM! Consistent padding token updates.

All three padding updates follow the same pattern of migrating to the centralized CSS variable system.

Also applies to: 142-142, 158-158

apps/studio/components/interfaces/Organization/BillingSettings/BillingEmail.tsx (1)

120-120: LGTM! Clean padding token migration.

The horizontal padding update aligns with the centralized CSS variable system.

apps/studio/components/interfaces/Settings/API/PostgrestConfig.tsx (1)

209-209: Verify the vertical padding reduction is intentional.

The horizontal padding migration to px-[var(--card-padding-x)] looks good. However, the vertical padding has been reduced from py-8 to py-4 across all five FormItemLayout instances, which halves the vertical spacing. Please confirm this tighter spacing aligns with the intended design.

Also applies to: 272-272, 351-351, 402-402, 429-429

apps/studio/components/interfaces/Database/Roles/RolesList.tsx (1)

189-189: Verify responsive padding behavior is preserved.

The padding updates look good and are consistent. However, the original classes px-4 md:px-6 included responsive breakpoints. Ensure the --card-padding-x CSS variable definition includes media queries to maintain the intended responsive spacing behavior.

Also applies to: 207-207

apps/studio/components/interfaces/DiskManagement/DiskManagementForm.tsx (1)

444-444: LGTM! Consistent padding token updates.

All three padding updates correctly migrate to the centralized CSS variable system. The changes maintain the same visual structure while improving maintainability.

Also applies to: 465-465, 469-469

apps/studio/components/ui/Forms/FormSection.tsx (1)

18-22: FormSection now uses --card-padding-x – confirm loss of md-specific wider padding

Migrating to px-[var(--card-padding-x)] keeps the layout clean and aligns FormSection with the shared card/panel padding token. One behavioral change vs the previous px-4 md:px-8 is that horizontal padding is now a single value (1rem via --card-padding-x) at all breakpoints.

If you still want wider padding on larger screens, consider:

const classes = [
  'grid grid-cols-12 gap-6 px-[var(--card-padding-x)] md:px-[var(--card-padding-x-md)] py-4 md:py-8',
  `${disabled ? ' opacity-30' : ' opacity-100'}`,
  `${className}`,
]

Based on learnings, this keeps FormSection visually aligned with Card/Panel spacing; just double-check the intended responsive behavior.

apps/studio/components/ui/Panel.tsx (1)

34-45: Panel header/content/footer/notice correctly migrated to --card-padding-x

Using px-[var(--card-padding-x)] across the Panel header, Content, Footer, and PanelNotice keeps all Panel chrome horizontally aligned with the same token the Card uses, which is exactly what this PR is aiming for. This also ensures legacy Panel surfaces stay visually in sync while new work moves to Card per the deprecation notice.

No issues from a code or layout-consistency perspective.

Based on learnings, this keeps studio “panel-like” UI aligned with the shared Card spacing system.

Also applies to: 56-58, 60-64, 94-101

packages/ui/src/components/shadcn/ui/card.tsx (1)

19-27: Card sections now driven by --card-padding-x – verify intended padding change

Switching CardHeader, CardContent, and CardFooter to px-[var(--card-padding-x)] nicely centralizes horizontal spacing and aligns with how Studio components consume the token.

One subtle change: these were previously px-6 (1.5rem). With the new vars in global.css:

--padding-x-sm: 1rem;      /* px-4 */
--padding-x-md: 1.5rem;    /* px-6 */
--card-padding-x: var(--padding-x-sm);
--card-padding-x-md: var(--padding-x-md);

the default card x‑padding becomes 1rem unless overridden.

If preserving the old 1.5rem card padding is desired, you could either:

  • Point the base token at the md value:
--card-padding-x: var(--padding-x-md);

or

  • Use the md variant just for cards:
className={cn('flex items-center py-4 px-[var(--card-padding-x-md)]', className)}

This looks correct mechanically; just confirm the new, slightly tighter card padding matches the design intent.

Also applies to: 48-55, 59-66

id="collapsible-trigger"
type="button"
className="group flex w-full items-center justify-between rounded py-3 px-4 md:px-6 text-foreground"
className="group flex w-full items-center justify-between rounded py-3 px-[var(--card-padding-x)] text-foreground"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Search for --card-padding-x CSS variable definition

# Check for CSS/SCSS/TSX files with the variable
rg -n "card-padding-x" --type-list | head -20

# Search across common stylesheet locations
find . -type f \( -name "*.css" -o -name "*.scss" -o -name "*.tsx" -o -name "*.ts" \) -exec grep -l "card-padding-x" {} \;

# Look for the variable definition with context
rg -B 5 -A 5 "card-padding-x" --type=css --type=scss

# Also check in tsx/ts files for CSS-in-JS or style definitions
rg -B 3 -A 3 "card-padding-x" --type=tsx --type=ts

Repository: supabase/supabase

Length of output: 1227


🏁 Script executed:

#!/bin/bash
# Search for --card-padding-x in global.css with full context
echo "=== Searching global.css for card-padding-x ==="
rg -B 10 -A 10 "card-padding-x" ./packages/ui/build/css/source/global.css

echo ""
echo "=== Checking if there are media queries for card-padding ==="
rg -B 3 -A 3 "@media.*card|card.*@media" ./packages/ui/build/css/source/global.css

echo ""
echo "=== Checking entire card-related section in global.css ==="
rg -B 5 -A 5 "card" ./packages/ui/build/css/source/global.css | head -100

echo ""
echo "=== Checking card.tsx for any responsive styles ==="
cat ./packages/ui/src/components/shadcn/ui/card.tsx

Repository: supabase/supabase

Length of output: 3218


🏁 Script executed:

#!/bin/bash
# Check RoleRow.tsx around line 96 to see the full context
echo "=== RoleRow.tsx context around line 96 ==="
sed -n '85,110p' ./apps/studio/components/interfaces/Database/Roles/RoleRow.tsx

echo ""
echo "=== Check if there are media queries or responsive rules elsewhere for card-padding-x ==="
rg -r "" "@media" ./packages/ui/build/css/source/global.css | head -30

Repository: supabase/supabase

Length of output: 1367


🏁 Script executed:

#!/bin/bash
# Let's verify what the original class was - check git history or similar components
echo "=== Check RolesList.tsx to see if it has similar patterns ==="
rg -B 3 -A 3 "card-padding-x|md:px-" ./apps/studio/components/interfaces/Database/Roles/RolesList.tsx | head -40

echo ""
echo "=== Check other Panel or FormSection components for padding patterns ==="
rg -B 2 -A 2 "md:px-" ./apps/studio/components/ui/Panel.tsx
rg -B 2 -A 2 "md:px-" ./apps/studio/components/ui/Forms/FormSection.tsx

Repository: supabase/supabase

Length of output: 779


🏁 Script executed:

#!/bin/bash
# Check if there's a Tailwind config or if CSS variables are overridden with media queries
echo "=== Check for Tailwind config ==="
find . -name "tailwind.config.*" -type f -exec cat {} \; | head -100

echo ""
echo "=== Check if there are any media query overrides for card-padding in any CSS file ==="
rg "@media" ./packages/ui/build/css/source/ -A 10 | grep -A 10 "card\|padding"

echo ""
echo "=== Check the full global.css file for any media query sections ==="
wc -l ./packages/ui/build/css/source/global.css
head -200 ./packages/ui/build/css/source/global.css | tail -100

Repository: supabase/supabase

Length of output: 8579


Responsive padding has been lost and needs to be fixed.

The change from md:px-6 to px-[var(--card-padding-x)] removes responsive behavior. The CSS variable --card-padding-x is statically set to 1rem (px-4) across all breakpoints, whereas the original code used px-6 (1.5rem) on medium screens and above.

A separate variable --card-padding-x-md exists but is unused. To preserve responsive padding, either:

  1. Use md:px-[var(--card-padding-x-md)] alongside px-[var(--card-padding-x)]
  2. Add media queries to the CSS variable definition to make --card-padding-x responsive
🤖 Prompt for AI Agents
In apps/studio/components/interfaces/Database/Roles/RoleRow.tsx around line 96
the change from md:px-6 to px-[var(--card-padding-x)] removed responsive padding
because --card-padding-x is fixed; restore responsive behavior by using the
medium breakpoint variable: add md:px-[var(--card-padding-x-md)] alongside the
existing px-[var(--card-padding-x)] (or alternatively make --card-padding-x
responsive in CSS via media queries and remove the unused --card-padding-x-md),
ensuring medium+ screens receive the larger padding.

@fsansalvadore fsansalvadore merged commit 263730a into master Dec 11, 2025
26 checks passed
@fsansalvadore fsansalvadore deleted the chore/card-panel-x-padding branch December 11, 2025 09:18
stylessh added a commit that referenced this pull request Dec 16, 2025
* wip

* wip

* single page

* new sections and polishing up

* reponsive

* nits

* semantic titles

* optimize imgs

* nits

* wup

* hero bubbles

* Update apps/www/components/Wrapped/Pages/SupabaseSelect.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix: Use `amaro` for stripping types in code samples (#41229)

* Fix the error for babel/preset-typescript in docs.

* Unfix the version.

* Try using amaro for type stripping.

* Run prettier after stripping types.

* Fix tests.

---------

Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>

* fix: Fix minor issue in the foreign key selector (#41235)

Change the isPending state to isLoading.

* docs: Remove empty troubleshooting fields (#41236)

* Remove emoty fields

* Fix lock file

* chore: update self-hosted image versions (#41234)

* Feature: show index advisor in table editor (#41166)

* added table advisor query

* updated to include table editor performance

* updated JSON B

* added side panel

* updated query indexes to show highlights context

* show index advisor in table editor

* updated invalidation logic

* added color updates

* added query indexes

* updated query performance type

* updated overflow and title

* put behind flag

* remove gap

* added on close

* Update apps/studio/data/database/table-index-advisor-query.ts

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* updated styling

---------

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* fix: useFlag to update initial check of flag store (#41209)

* fix flag lib

* updated uneeded logic

* updated logic

* remove line

* updated comment

* fix: Hide favourites and share snippets on self-hosted variant (#41227)

* Hide favorite and share actions for self-hosted version.

* Rename the query on save only on platform.

* Simplify useCheckOpenAiKeyQuery.

* Rename with AI now depends if the OPENAI_API_KEY is set.

* Minor fixes.

* Fix the tests to use .skip for skipping tests. Remove extra port params.

* Make the test for favourites work only on platform variant.

* feat(reports): support new database report granularity FE-2221 (#41228)

* handle new granularity

* undo unnecessary type change

* rm console log

* fix: blog auto scroll post app router migration for blog (#41220)

Enhance TOC highlighting and anchor scroll in blog posts

Refactored useActiveAnchors hook to support smooth hash scrolling and improved TOC highlighting based on scroll position. Added options for custom selectors and offset, and updated BlogPostClient to enable scroll-to-anchor and TOC highlight functionality.

* fix: remove flakiness with launch options and default timeouts (#41245)

* attempt to make table editor tests less flaky

* updated race conditions for table editor

* updated playwright config with optimized launch options

* reduce workers

* updated timeouts for tests

* updated config to have a global timeout of 20 seconds

* updated to be visible

* chore: update changelog and image versions file (#41244)

* feat(design-system): improve table docs (#41215)

* docs updates

* docs expansion

* minor docs fix

* improvements

* fix dependencies

* docs expansion

* more table examples

* map over data

* improve copy

* Update apps/design-system/registry/default/example/table-row-link-actions.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update apps/design-system/registry/default/example/table-row-link-actions.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fixes

* fix

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* chore(studio): improve table presentation (#41217)

* billing improvements

* wrapper improvements

* border fix

* Nit adjustments

* fixes

* fix aria

* fix loading

* fixes

* fix

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>

* Save opened side bar in local storage, and init on new session (#41224)

* Save opened side bar in local storage, and init on new session

* Fix test

* Fix

* Nit

* docs(design-system): Data Table and Data Grid documentation (#41252)

* basic differentiation

* docs

* data-grid examples

* data-grid-demo

* data-table

* demo

* use existing components

* improvements

* markup

* docs

* remove data table

* lint

* Update apps/design-system/content/docs/ui-patterns/empty-states.mdx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix ref

* use TanStack sorting

* grammar

* dependency

* 📝 Add docstrings to `dnywh/docs/data-table-data-grid` (#41255)

Docstrings generation was requested by @MildTomato.

* #41252 (comment)

The following files were modified:

* `apps/design-system/registry/default/example/data-grid-demo.tsx`
* `apps/design-system/registry/default/example/data-grid-empty-state.tsx`
* `apps/design-system/registry/default/example/data-table-demo.tsx`

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* docs: fix grammatical error in generate-text-embeddings guide (#41187)

* docs: fix grammatical error in generate-text-embeddings guide

* Update generate-text-embeddings.mdx

Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com>

---------

Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com>

* chore: uniform card and panel padding-x (#41237)

* docs: Fix typo in API introduction documentation (#41251)

* chore(billing): regenerate api-types to include vanity subdomain entitlement (#41257)

chore(billing: regenerate api-types to include vanity subdomain entitlement

* Add liam to humans.txt (#41169)

* docs: Add link to restoring backup to new Supabase project (#39108)

Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>

* feat(code-block): add word wrap functionality and controls to code bl… (#39689)

* feat(code-block): add word wrap functionality and controls to code blocks

* feat(code-block): enhance layout of code block with improved line number display and structure

* fix h-full issue

* fix Prettier issue

---------

Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>

* wip

* wip

* single page

* optimize imgs

* revert

* pkg

* update new content

* rm overflow

* new data

* nits

* nits

* og

* border

* fix: improve AnimatedCounter and FloatingStatBubbles/Intro components

- Update AnimatedCounter to correctly reflect value changes in the DOM.
- Add lifetime management for timers in FloatingStatBubbles and FloatingBoxes to prevent memory leaks.
- Ensure cleanup of timers on component unmount for better resource management.

* dbs

* minify images

* text-brand-link on light mode

* fix grid

* max-width on images

* address comments

* fixes

* faster image rotation

* upd og

* new launch

* nitsgs

* last nits

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
Co-authored-by: Andrey A. <56412611+aantti@users.noreply.github.com>
Co-authored-by: Ali Waseem <waseema393@gmail.com>
Co-authored-by: Jordi Enric <37541088+jordienr@users.noreply.github.com>
Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Dinesh Dawonauth <dineshddawo@gmail.com>
Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com>
Co-authored-by: Francesco Sansalvadore <f.sansalvadore@gmail.com>
Co-authored-by: 李子衿 <160584929+hhhez@users.noreply.github.com>
Co-authored-by: Kanishk Dudeja <kanishk@kanishkdudeja.com>
Co-authored-by: lch-supa <liam.hogan@supabase.io>
Co-authored-by: Timothy Lim <tim.lim@supabase.io>
Co-authored-by: Priyanshu Thapliyal <114170980+Priyanshuthapliyal2005@users.noreply.github.com>
@coderabbitai coderabbitai Bot mentioned this pull request Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants