Commit Graph

55 Commits

Author SHA1 Message Date
Danny White
1470c51021 fix(studio): align rls confirmation dialogs (#45961)
## What kind of change does this PR introduce?

Studio UI cleanup and docs update. Resolves FE-3217.

## What is the current behavior?

The table RLS confirmation dialogs differ across the Policies page and
Table Editor surfaces. The table editor disable flow also uses a verbose
confirmation modal with admonitions and repeated warning copy.

| Policies | Table Editor |
| --- | --- |
| <img width="852" height="448" alt="25125"
src="https://github.com/user-attachments/assets/baa9fafa-752c-4701-bf54-40da4e32030b"
/> | <img width="1108" height="1016" alt="57354"
src="https://github.com/user-attachments/assets/b1b88355-be39-49b9-aed2-a60f20c25104"
/> |
| <img width="866" height="434" alt="CleanShot 2026-05-15 at 18 01
15@2x"
src="https://github.com/user-attachments/assets/d67f69ee-0a49-4dbd-939e-ca968361fc33"
/> | <img width="840" height="426" alt="CleanShot 2026-05-15 at 18 01
52@2x"
src="https://github.com/user-attachments/assets/a0b5f390-abeb-453f-8636-ad097f22308b"
/> |

## What is the new behavior?

Table RLS enable and disable confirmations now use one shared concise
Alert Dialog treatment across the Policies page, Table Editor header,
and Table Editor side panel. The server-backed toggles use the async
Alert Dialog action behaviour from the stacked base branch, and the
design-system docs now clarify when to start with Alert Dialog versus
Confirmation Modal.

This PR is stacked on #45960.

| Before | After |
| --- | --- |
| <img width="852" height="448" alt="25125"
src="https://github.com/user-attachments/assets/baa9fafa-752c-4701-bf54-40da4e32030b"
/> | <img width="864" height="518" alt="CleanShot 2026-05-15 at 18 07
21@2x"
src="https://github.com/user-attachments/assets/bda53246-164b-4d5b-81a1-25d3bc661eb3"
/> |
| <img width="1108" height="1016" alt="57354"
src="https://github.com/user-attachments/assets/b1b88355-be39-49b9-aed2-a60f20c25104"
/> | <img width="864" height="518" alt="CleanShot 2026-05-15 at 18 07
21@2x"
src="https://github.com/user-attachments/assets/bda53246-164b-4d5b-81a1-25d3bc661eb3"
/> |
| <img width="866" height="434" alt="CleanShot 2026-05-15 at 18 01
15@2x"
src="https://github.com/user-attachments/assets/d67f69ee-0a49-4dbd-939e-ca968361fc33"
/> | <img width="860" height="488" alt="CleanShot 2026-05-15 at 18 08
41@2x"
src="https://github.com/user-attachments/assets/4c67f797-e2cd-4d56-a49d-e6c6fc0edff3"
/> |
| <img width="840" height="426" alt="CleanShot 2026-05-15 at 18 01
52@2x"
src="https://github.com/user-attachments/assets/a0b5f390-abeb-453f-8636-ad097f22308b"
/> | <img width="860" height="488" alt="CleanShot 2026-05-15 at 18 08
41@2x"
src="https://github.com/user-attachments/assets/4c67f797-e2cd-4d56-a49d-e6c6fc0edff3"
/> |

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Documentation**
* Refined guidance and wording for dialog usage, clarifying when to use
Alert Dialog, Confirmation Modal, and modal modality.

* **New Features**
* Reworked RLS confirmation flow with a streamlined toggle dialog,
clearer messaging, and a “Learn more” link to docs.

* **Tests**
* Updated end-to-end tests to cover the updated RLS dialog flows and
explanatory content.

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/45961?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-25 22:47:40 +00:00
Danny White
55ee3e0f2c feat(ui-patterns): add CollapsibleCardSection component (#46250)
## What kind of change does this PR introduce?

New shared component + docs.

## What is the current behavior?

`AdvancedConfiguration` and `InternalOnlyConfiguration` in the New
Project form each contain bespoke `<Collapsible>` markup. There's no
reusable collapsible section component available to other card/panel
forms.

## What is the new behavior?

- Extracts a shared `CollapsibleCardSection` into
`packages/ui-patterns`, exported via
`ui-patterns/CollapsibleCardSection`
- Refactors `AdvancedConfiguration` and `InternalOnlyConfiguration` to
use it
- Adds design system docs with a live demo at
`/docs/fragments/collapsible-card-section`

This is a prereq for #45707 and #46187, which both consume this
component.

| Example Usage |
| --- |
| <img width="1464" height="500" alt="CleanShot 2026-05-22 at 15 20
38@2x"
src="https://github.com/user-attachments/assets/5b88ef8d-3f9a-4454-b246-5bbaf53e027a"
/> |

## To test

- [ ] Check that [the Design System
page](https://design-system-git-dnywh-collapsible-card-section-supabase.vercel.app/design-system/docs/fragments/collapsible-card-section)
makes sense
- [ ] Check that the [new project
form](https://studio-staging-git-dnywh-collapsible-card-section-supabase.vercel.app/dashboard/new/)
collapsible sections work as expected

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

## Release Notes

* **New Features**
* Introduced CollapsibleCardSection component as a reusable UI pattern
for collapsible card-based content with customizable title, description,
and open state.
* Refactored project configuration interfaces to use the new component
for improved visual consistency.

* **Documentation**
* Added comprehensive documentation with interactive examples and
multiple usage patterns for CollapsibleCardSection.

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46250?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-05-22 18:24:17 +10:00
Danny White
10f930d527 chore(design-system): remove Admonition label alias (#46054)
## What kind of change does this PR introduce?

Chore / docs update. Related to DEPR-551. Stacked on #46053.

## What is the current behavior?

`Admonition` still accepts `label` as a backwards-compatible alias for
`title`, and a few www blog posts plus the Docs MkDocs admonition
transform still use or emit that alias.

## What is the new behavior?

Removes the `label` prop from `AdmonitionProps`, migrates the remaining
www blog Admonitions to `title`, and updates the Docs MkDocs transform
to emit `title` directly.

This leaves `title`, `description`, and `children` as the supported
Admonition content API.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Refactor**
* Admonition now uses a single required title prop for headings; the
legacy label prop is removed and no longer used.

* **Documentation**
* Updated docs and blog posts to pass admonition heading via title and
removed notes about label support.

* **Tests**
* Component tests adjusted to validate the new title-only behavior and
to ensure legacy label usage is rejected.

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46054?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 03:07:46 +00:00
Saxon Fletcher
f0afc5948b page layout patterns (#46126)
Adjusts layout / page patterns including design system documentation and
page components.

<img width="937" height="643" alt="image"
src="https://github.com/user-attachments/assets/5f7864a3-04ae-4ccf-b2b8-d9fe5e29554e"
/>

**To test**
- Ensure all existing page types in Studio are un-effected. They
shouldn't be since existing components aren't touched.
- Run design-system and have a read through layout and page header
documentation. Make sure you understand when and where to use the
various combinations of page components and their variants.

**Next**
Once we are happy with these patterns we can gradually start to update
Studio pages that make use of breadcrumbs and/or sub navigation.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
  * Added PageBreadcrumbs and PageNav page chrome
* Several new interactive layout examples (Auth Emails, Edge Functions,
Full‑Width, Logs) and demo pages

* **Documentation**
  * New docs for PageBreadcrumbs and PageNav
* Reworked layout guidance and patterns; updated fragment/example docs
and usage notes

* **Improvements**
  * Component preview now supports explicit padding control
  * Simplified page header demo and updated previews

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46126?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-21 09:16:14 +10:00
Danny White
09fa2b8fc1 Clarify alert and collapsible design-system patterns (#45863)
## What kind of change does this PR introduce?

Docs update and design-system component taxonomy cleanup

## What is the current behavior?

The design-system docs conflate low-level shadcn primitives with
product-level alert patterns. Collapsible documentation previews the
alert-specific wrapper, and the alert/collapsible relationship is
unclear

## What is the new behavior?

- Documents Alert and Collapsible as low-level atom components
- Moves the alert-styled expandable wrapper into
`ui-patterns/expandable-alert` as `ExpandableAlert`
- Documents Expandable Alert as a Fragment Component next to Admonition
- Updates the Session Timeout modal to import `ExpandableAlert` from
`ui-patterns/expandable-alert`


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* `CollapsibleAlert` component is now available for alert-styled
expandable content.

* **Documentation**
* Updated component documentation to clarify when to use `Alert`,
`Collapsible`, `Admonition`, and `CollapsibleAlert`.
* Added comprehensive documentation for `CollapsibleAlert` with usage
examples and variant options.

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/45863)

<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Gildas Garcia <1122076+djhi@users.noreply.github.com>
2026-05-15 15:29:16 +10:00
Danny White
04c9fb7c3e chore(design-system): redo safer Admonition updates (#45618)
## What kind of change does this PR introduce?

Feature and design-system update. Resolves DEPR-551.

This is a narrower redo of #45302 after the revert in #45535.

## What is the current behaviour?

The reverted implementation made Admonition more flexible, but it also
changed Studio callsites, touched shared Alert styling, renamed the
design-system Tailwind config, and changed Docs-facing content/API
assumptions in a way that broke production docs static generation.

## What is the new behaviour?

Admonition now supports description-only content, children-only content,
optional `title`, legacy `label`, and `type="success"` without touching
`apps/docs/content/**` or shared Alert styling.

`title` wins over `label` when both are provided. The runtime component
props stay backwards-compatible for existing MDX and Studio usage, while
`AdmonitionStrictProps` captures the stricter new-usage contract for
tests and future callsites.

The design-system docs and registry include description-only and success
examples, and the Admonition tests cover the rendering paths that broke
production previously.

| After |
| --- |
| <img width="1668" height="1768" alt="CleanShot 2026-05-06 at 17 35
13@2x"
src="https://github.com/user-attachments/assets/1c00ea7f-e3ca-45eb-8af9-3536b657c341"
/> |

## Additional context

These things that were in #45302 have been left out (unless checked):

- [ ] Studio callsite rewrites from title/label to description
- [ ] Shared Alert text-colour changes
- [ ] Design-system Tailwind config rename
- [ ] Design-system global CSS changes
- [ ] Any docs content migration or label deprecation
- [ ] Any production docs workaround


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
  * Added success admonition variant with dedicated styling and icon.
  * Introduced description-only admonition example.

* **Documentation**
* Expanded admonition guidance on title vs description usage and best
practices.
* Added example sections showcasing description-only and success
variants.

* **Tests**
* Added comprehensive tests covering admonition variants and
rendering/precedence behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-08 07:59:35 +00:00
Jeremias Menichelli
c49eb8bb7d Revert "chore(studio + design-system): more flexible Admonition" (#45535) 2026-05-05 00:18:27 +08:00
Danny White
5bfbae22a9 chore(studio + design-system): more flexible Admonition (#45302)
## What kind of change does this PR introduce?

Feature and design-system cleanup. Resolves DEPR-551.

## What is the current behavior?

Admonition supports several overlapping content shapes, but it
previously did not support a first-class success state or
description-only usage cleanly. Title-only usage was also possible,
which made some callouts read like floating headings without body copy.

Docs MDX Admonitions could also pick up prose spacing around rich
children, while the design-system Tailwind config emitted an
ESM/CommonJS warning in the design-system app.

## What is the new behavior?

Adds a `success` Admonition type, description-only support, and a
stricter content contract: `title` or legacy `label` now requires either
`description` or `children`. Existing title-only Studio callsites have
been converted to description-only callouts.

The design-system docs now include examples for description-only and
success Admonitions, plus guidance for `title`, `description`,
`children`, and legacy `label` usage.

This also tightens Admonition body spacing so rich MDX children keep
docs link/code styling without inheriting excessive prose margins, and
renames the design-system Tailwind config to `tailwind.config.cjs` so it
matches its CommonJS syntax.

Warning and destructive alerts now explicitly set `text-foreground`,
preventing nested Admonition titles from inheriting muted
form-description colour after the Tailwind v4 cascade changes.

| Before | After |
| --- | --- |
| <img width="1818" height="388" alt="Image"
src="https://github.com/user-attachments/assets/283a1853-348a-4d74-a408-013957350e5e"
/> | <img width="1380" height="462" alt="Image"
src="https://github.com/user-attachments/assets/e5761e8e-3697-423b-805b-45110205099a"
/> |
| <img width="1398" height="550" alt="CleanShot 2026-04-28 at 15 12
41@2x"
src="https://github.com/user-attachments/assets/982694d9-5461-4362-8bae-a6e2b4c60e8b"
/> | <img width="1402" height="450" alt="CleanShot 2026-04-28 at 15 13
09@2x"
src="https://github.com/user-attachments/assets/0b1257c4-6b58-4c39-a182-4861a9e378ee"
/> |
| <img width="1640" height="716" alt="CleanShot 2026-04-28 at 15 17
25@2x"
src="https://github.com/user-attachments/assets/a5be4d5f-2bf7-4dc2-b396-56129fe64ec9"
/> | <img width="1630" height="716" alt="CleanShot 2026-04-28 at 15 16
00@2x"
src="https://github.com/user-attachments/assets/0d589252-aaf8-4efc-9d81-15ec4f99ec61"
/> |

| Design System Docs |
| --- |
| <img width="1646" height="1864" alt="CleanShot 2026-04-28 at 14 59
15@2x"
src="https://github.com/user-attachments/assets/12d13595-8972-4fb2-a04a-fb916388ebb6"
/> |


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added a "success" admonition variant and new example previews
demonstrating success and description-only usages.

* **Documentation**
* Clarified admonition guidance: when to use title vs description vs
children; added example sections for short callouts and success
messages.

* **Refactor**
* Standardized UI by moving short/advisory text into description across
the app and harmonized trailing punctuation.

* **Style**
* Ensured warning/destructive admonitions use consistent foreground text
styling.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-01 07:15:00 -06:00
Gildas Garcia
c65935d0d3 chore: fix multi-select to ensure it works inside dialogs (#45369)
## Problem

The current
[multi-select](https://supabase.com/design-system/docs/fragments/multi-select)
does not work inside a dialog. The dropdown list is hidden.

## Solution

Fix it using the `Popover` component which also handle repositioning
above the input when there's not enough space below.

## How to test

- [Demo on
design-system](https://design-system-git-chore-fix-multi-select-supabase.vercel.app/design-system/docs/fragments/multi-select#inside-a-dialog)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

## Release Notes

* **New Features**
* Added a new example demonstrating multi-select usage within a dialog
component with inline search capabilities.
* Enhanced multi-select component with improved stability and
interaction handling.

* **Documentation**
* Added "Inside a dialog" section to multi-select documentation with
usage guidelines for inline search in dialog contexts.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-29 15:14:10 +02:00
Gildas Garcia
0facd341a6 chore: remove UI form components _Shadcn_ suffix (#45212)
## Problem

We used to have a `_Shadcn_` suffix for all the shadcn form components
because we also had `formik` form components.
This is not needed anymore.

## Solution

- Remove the suffix
- Update all usages
2026-04-24 12:14:15 +02:00
Danny White
3a72b128de chore(studio): standardise key-value field array partial-row validation (#44411)
## What kind of change does this PR introduce?

Design system and validation consistency update.

## What is the current behaviour?

`KeyValueFieldArray` already renders per-cell form messages, but each
consumer still decides its own validation rules. At the moment, some
consumers allow partially filled rows to submit silently, while Log
Drains now treats them as inline validation errors.

## What is the new behaviour?

This PR standardises the recommended partial-row behaviour for the
current `KeyValueFieldArray` consumers by introducing a shared
validation helper and using it from each form schema.

- adds `getKeyValueFieldArrayValidationIssues` alongside
`KeyValueFieldArray`
- keeps `KeyValueFieldArray` presentation-only and leaves validation in
consumer schemas
- shows inline errors when one side of a key/value row is filled and the
other is empty
- keeps fully empty rows as draft rows
- keeps duplicate-key validation in Log Drains, where it already applies
- updates the design-system docs and examples to describe the validation
pattern explicitly


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added reusable key/value validation utilities and public export; forms
now trim header/key/value inputs, show inline errors for partially
filled rows, and remove fully empty draft rows on submit.

* **Documentation**
* Clarified the field-array is rendering-only and added guidance for
placing validation in form schemas and handling draft rows.

* **Tests**
* Added unit and integration tests covering validation rules, duplicate
keys, trimming, draft-row stripping, and payload behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-02 12:49:25 +11:00
Danny White
36269df347 chore(studio): share single-value field array editor (#44059)
## What kind of change does this PR introduce?

Chore that resolves DEPR-394.

## What is the current behavior?

This stack is consolidating RHF field-array patterns in smaller
reviewable steps.

After the key/value work lands, repeated single-value inputs are still
implemented separately across auth and SSO forms, and the design-system
docs only document the key/value pattern.

## What is the new behavior?

- adds a shared `SingleValueFieldArray` component in `ui-patterns`
- migrates repeated single-value inputs in:
  - Redirect URL allow-list modal
  - OAuth app redirect URIs
  - SSO domains
  - SSO attribute mapping
- documents the single-value pattern in the design system with:
  - a dedicated fragment page
  - updated forms guidance
  - updated form pattern demos
- adds focused redirect URL modal coverage

## Additional context

This is PR 3 of a 3-PR stack for DEPR-394.

Base PR: #44058
2026-04-01 10:14:42 +11:00
Gildas Garcia
18e4ad227e chore: add shadcn input-group components (#44282)
## Screenshots

On a number input with units:
<img width="660" height="162" alt="image"
src="https://github.com/user-attachments/assets/1758a6d9-0836-4d41-80d1-97a03292db91"
/>

focused state:
<img width="651" height="71" alt="image"
src="https://github.com/user-attachments/assets/a92a5c39-2c7e-4c5f-9e4b-eb89810cc45c"
/>

On a textarea:
<img width="989" height="294" alt="image"
src="https://github.com/user-attachments/assets/cc696cb9-3671-4719-bdd8-daa1aea4f041"
/>
2026-03-31 09:14:56 +02:00
Danny White
b23c6a7fed chore(studio): share key-value field array editor (#43938)
## What kind of change does this PR introduce?

Chore that references DEPR-394.

## What is the current behavior?

Key/value editors for headers are implemented separately in multiple
places.

## What is the new behavior?

DEPR-394 is consolidating repeated RHF field-array UIs across Studio and
the design system.

- adds a shared `KeyValueFieldArray` component in `ui-patterns`
- adds a shared `httpHeaderAddActions` helper for preset header rows
- migrates the key/value header editors in:
  - Platform Webhooks
  - Cron Jobs HTTP headers
  - Database Webhooks HTTP headers
- documents the key/value pattern in the design system with:
  - a dedicated fragment page
  - updated forms guidance
  - updated form pattern demos

| Preview |
| --- |
| <img width="1102" height="420" alt="CleanShot 2026-03-23 at 12 22
18@2x"
src="https://github.com/user-attachments/assets/f8d23ff9-7063-462f-8074-b400561f77e9"
/> |

## Additional context

This is PR 1 of a 3-PR stack for DEPR-394.
2026-03-24 16:16:03 +11:00
Jordi Enric
ec26943390 feat: improve db overload debugging UX (#43564)
When the dashboard hits a DB connection timeout, users currently see a
raw error message with no
path forward. This PR adds an inline troubleshooting system that detects
known error types and
surfaces contextual next steps — restart the DB, read the docs, or debug
with AI.

##  Changes

- New ErrorDisplay component (packages/ui-patterns) — styled error card
with a title, monospace error
block, optional troubleshooting slot, and a "Contact support" link that
always renders. Accepts
  typed supportFormParams to pre-fill the support form.

- Error classification in handleError (data/fetchers.ts) — on every API
error, the message is tested
against ERROR_PATTERNS. If matched, handleError throws a typed subclass
(ConnectionTimeoutError
extends ResponseError) instead of a plain ResponseError. Stack traces
now show the exact error
  class. All existing instanceof ResponseError checks continue to work.

- ErrorMatcher component — reads errorType from the thrown class
instance, does an O(1) lookup into
ERROR_MAPPINGS, and renders the matching troubleshooting accordion as
children of ErrorDisplay.
  Falls back to plain ErrorDisplay for unclassified errors.

- Connection timeout mapping — first error type wired up, with three
troubleshooting steps: restart
the database, link to the docs, and "Debug with AI" (opens the AI
assistant sidebar with a
  pre-filled prompt).

- Telemetry — three new typed events track when the troubleshooter is
shown, when accordion steps are
   toggled, and which CTAs are clicked.

##  Adding a new error type

  1. Add a class to types/api-errors.ts
  2. Add { pattern, ErrorClass } to data/error-patterns.ts
  3. Create a troubleshooting component in errorMappings/
  4. Add an entry to error-mappings.tsx
2026-03-16 11:22:30 +01:00
Jeremias Menichelli
9b1cf613cb chore: Fix formatting in file (#43747) 2026-03-13 15:59:40 +00:00
kemal.earth
2c48910673 feat(design-system): status code component (#42064)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Formalising our status code component that was introduced in the new
charts + update auth overview page.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added a StatusCode UI component to display HTTP methods and status
codes with color-coded indicators.
* Added a demo showcasing multiple StatusCode examples and alignment
variants.

* **Documentation**
* Added a documentation fragment and sidebar entry for Status Codes with
a preview of the demo.

* **Refactor**
* Updated an Auth Overview view to use the new StatusCode component for
consistent status rendering.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-03-12 10:57:46 +00:00
Danny White
8a5ad58f81 chore(studio): replace CloseConfirmationModal with DiscardChangesConfirmationDialog (#43430)
## What kind of change does this PR introduce?

Form handling improvement.

## What is the current behavior?

https://github.com/supabase/supabase/pull/43201/ standardised our
discard changes behaviour with a shared hook and
`DiscardChangesConfirmationDialog` component. But many forms and sheets
still:

1. Don’t have any Discard-confirm close behaviour, making it too easy to
make accidental discards
2. Use a more complicated, manually-created `CloseConfirmationModal`
approach

## What is the new behavior?

- Replaced all instances of `#2` above that had `CloseConfirmationModal`
with `DiscardChangesConfirmationDialog` and its hook
- Improved design system documentation around dirty form dismissal

| Before | After |
| --- | --- |
| <img width="987" height="569" alt="Mercor Apexroles Foo
Supabase-9A40EC7C-F335-4B26-B567-450FC0845463"
src="https://github.com/user-attachments/assets/363bed82-34d2-4cc8-9164-6d18cfdbdbbc"
/> | <img width="987" height="569" alt="Mercor Apexroles Foo
Supabase-F427F1FA-DECC-4194-B663-A9E5A6F285A1"
src="https://github.com/user-attachments/assets/d49fafdc-a5c2-46df-9b67-ec42bacbe716"
/> |

## To test

Try editing values these sheets in staging, then blurring the sheet or
pressing `esc`:

- CreateQueueSheet.tsx
- CronJobsTab.tsx
- CronJobPage.tsx
- EditWrapperSheet.tsx
- OverviewTab.tsx
- WrappersTab.tsx
- CreateFunction/index.tsx
- EditHookPanel.tsx
- TriggerSheet.tsx
- SidePanelEditor.tsx
- EditSecretSheet.tsx
- PolicyEditorModal/index.tsx
- PolicyEditorPanel/index.tsx

## Still to come

- [ ] Incrementally take on `#1`: implement
`DiscardChangesConfirmationDialog` and its hook in sheets or dialog
forms that have no dirty form dismissal handling

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-03-06 03:17:35 +00:00
Danny White
aef1d70351 chore(studio): standardise discard changes behaviour (#43201)
## What kind of change does this PR introduce?

UX consistency improvement. Updates DEPR-355.

## What is the current behavior?

Discard-confirm close behavioir is implemented inconsistently across
Studio forms:

- some sheets/dialogs used `useConfirmOnClose`
- some duplicated local `CloseConfirmationModal` components
- some (e.g. `CreateHookSheet`) closed unconditionally and could lose
unsaved changes

## What is the new behavior?

Extracts and validates a reusable discard-close pattern for
dialogs/sheets
- enhances `useConfirmOnClose` with `handleOpenChange(open)` for
`Dialog`/`Sheet` `onOpenChange`
- adds shared `DiscardChangesConfirmationDialog` (`AlertDialog`-based,
override-able copy)
- migrates:
	- `InviteMemberButton`
	- `CreateHookSheet`
	- `EditSecretSheet`

This standardizes close-guard behavior for
backdrop/escape/close-button/cancel-button flows without trying to block
route changes or arbitrary unmounts.

## Additional context

`CreateHookSheet` now also marks the generated secret action as dirty
(`setValue(..., { shouldDirty: true })`) so the discard guard behaves
correctly.

- Added tests for `useConfirmOnClose` covering:
	- clean vs dirty close
	- handleOpenChange(true|false)
	- confirm/cancel behavior
	- latest callback ref behavior

A follow-up PR is needed to migrate remaining duplicated
`CloseConfirmationModal` usages and older `useConfirmOnClose` call sites
to the shared `DiscardChangesConfirmationDialog` + `handleOpenChange`
pattern.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-03-05 11:32:39 +11:00
Danny White
b09b569a59 chore(design-system): sandwiched admonition (#43120)
## What kind of change does this PR introduce?

- Design system docs addition

## What is the current behavior?

- We used a ’sandwiched’ style Admonition a lot but have no clear
docs/examples for it

## What is the new behavior?

- An example file and documentation around the sandwiched Admonition
- Minor unrelated changes
	- Copywriting docs expansion on capitalization and declarative writing
	- `pnpm format` on charts

## Additional context

| Preview |
| --- |
| <img width="1714" height="612" alt="CleanShot 2026-02-24 at 16 02
21@2x"
src="https://github.com/user-attachments/assets/f547bdea-ca31-4ba7-85eb-bd9bcbf30d35"
/> |
2026-02-27 16:23:08 +11:00
Prashant Sridharan
b1f93226bb Added video embeds of previous webinars (#43134)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

We are now saving our old webinar videos as unlisted YouTube videos.

I added the video embeds to previous webinars.

---------

Co-authored-by: Alan Daniel <stylesshjs@gmail.com>
2026-02-24 21:52:32 +00:00
Danny White
c10d3debb1 feat(design-system): responsive admonition (#42971)
## What kind of change does this PR introduce?

Component improvement

## What is the current behavior?


[Admonition](https://supabase.com/design-system/docs/fragments/admonition)
often passes `actions`, often Button(s). These either are stacked via
the `layout` prop `horizontal` or `vertical`. That binary choice often
means, given layout flex, awkward text wrapping.

## What is the new behavior?

Admonition now has a `"responsive"` value for the `layout` prop. When
`layout="responsive"`, the Alert root gets `@container` so the
Admonition is the container-query context. The Admonition stays
`vertical` when it’s narrow and switches to `horizontal` when its own
width reaches the `@md` container breakpoint, independent of page width.

## Additional context

See the _Disk Management_ section of Database Settings to see the single
in-situ example.

Video demo:


https://github.com/user-attachments/assets/318a4530-5ae4-43f3-99cf-b75967659ed3
2026-02-24 16:14:03 +11:00
Danny White
92bcdcd953 Update delete-organization dialog to TextConfirmModal (#42670)
## What kind of change does this PR introduce?

- ~Feat~ Chore
- Resolves DEPR-33

## What is the current behavior?

The dialog used to delete an organization uses a ”type this org’s name
in before you can press this button” interaction but:

- A) Enables the button the whole time
- B) We already have this componentized in TextConfirmModal

## What is the new behavior?

- Refactored this dialog to use `TextConfirmModal` instead
- Updated design docs to make this prop clearer

| Before | After |
| --- | --- |
| <img width="1024" height="759" alt="Supabase"
src="https://github.com/user-attachments/assets/85c965f6-29d4-4696-8c0c-a54ddcbe6167"
/> | <img width="1024" height="759" alt="Supabase"
src="https://github.com/user-attachments/assets/0a96ca65-15c3-4b1b-bb10-620526c059b8"
/> |

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Updated Text Confirm Dialog documentation with clarifications: the
confirm action remains disabled until input exactly matches the required
string, and leading/trailing whitespace is trimmed from the input.

* **Refactor**
* Streamlined the organization deletion confirmation workflow for
improved user experience.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-02-11 16:40:33 +11:00
Ivan Vasilov
1cd1ebfc7f chire: Sort imports in all packages, cms, design-system and ui-library apps (#41610)
Sorted all imports in all packages, `cms`, `design-system` and
`ui-library` apps by running `pnpm format` on them.

All changes in this PR are done by the script.
2026-02-05 13:54:10 +01:00
Danny White
60dfcc00ea fix(studio): PageSectionSummary alignment (#42019)
* system

* nit

* docs and fixes

* more resilient component

* remove redundant text

* format

* nit

* PRettier

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-01-21 10:18:15 +08:00
Saxon Fletcher
d2f4e808e5 Filter pattern refactor (#41545)
* filter refactor

* update tests

* prettier

* fix ts

* remove filter preview

* Filter bar in table editor behind flag (#41546)

filter bar in table editor behind flag

* fixes

* ts fix

* filter v1 refactor

* rename helpers

* unmount timeout

* fixes

* fix

* more
2026-01-06 08:04:28 +10:00
Danny White
f6e8207e6d docs(design-system) add dialog pattern documentation (#41296)
* docs

* naming

* docs

* mini fix

* update policies component

* use destructured prop

* rls policies dialogs

* custom domain dialogs

* restart server dialog

* remove ConfirmDialog (aka ConfirmModal)

* docs updates

* remove unrelated work

* remove unrelated work

* remove unrelated work

* confirmation-modal demo

* use indicative components

* links

* tiny docs updates

* examples

* sheets and alert dialog examples

* docs and examples

* docs

* docs

* text confirm modal

* docs

* docs

* revert cursor rules

* fixes

* fix links

* Update apps/design-system/registry/examples.ts

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

* rabbit

* rabbit

* use variants

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-12-17 11:24:36 +00:00
Danny White
11dc1324aa chore(studio): improve alert composition and usage (#41147)
* finesse optical alignment

* improvements

* actions styling

* improvements

* margins

* improvements

* fix docs

* fix

* improve schema warning admonition

* misc fixes

* tweaks

* docs and improvements

* alphabetical sidebar navigation

* remove alert-error

* fix build error

* Tiny fixes

* tiny docs update

* semantic description

* handle intro pages

* note NoPermission component

* docs sidebar ordering

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-12-10 08:05:30 +00:00
kemal.earth
9008713a78 feat(design-system): update section introduction docs (#41164)
* feat: sort intro page entry points and sidebar

* feat: beef up getting started intro and faq

* chore: small copy fix

* feat: description for ui patterns intro

* feat: basic description for fragments intro

* feat: add description for atom components intro

* feat: add links to ui pattern docs

* chore: run prettier for mdx files
2025-12-09 11:26:58 +00:00
Danny White
ac1006fc1a chore(design-system): admonition background fill (#39474)
* add colour to admonition

* clarify design docs

* remove old references to alert

* better docs

* remove redundant className

* consolidate colors

* improve docs

* restore alert

* remove unrelated work
2025-12-05 02:11:16 +00:00
Saxon Fletcher
da0b4c6f57 Storage page components (#40935)
* storage page components

* Nit fixes

* Small refactor

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-12-01 16:51:34 +08:00
Danny White
ba9ceac140 chore(studio): basic Admonition improvements (#40880)
* OAuth admonition fix

* spend cap alerts

* docs

* payment method

* Minor clean ups

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-11-28 20:46:20 +08:00
Danny White
080cc7aeab chore(studio): authentication empty states (#40883)
* auth hooks and docs

* third-party auth

* remove unrelated changes

* remove unrelated changes

* docs tighten

* docs tighten

* Nit clean up

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-11-28 14:57:56 +08:00
Danny White
46ac132051 chore(studio): empty state improvements (#40807)
* migrations

* clearer value prop

* consistent verb

* migration input

* triggers

* extract trigger buttons

* database backups

* schema title

* unrelated nit

* fix

* shared component

* ui-patterns

* rename

* improve docs

* remove redundant overrides

* remove old file

* prettier fix

* fix type error

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-11-27 17:26:20 +08:00
kemal.earth
06ac401181 feat(design-system): add <MetricsCard /> component (#40355)
* feat: add metrics block setup

* feat: base block and props for metrics block

* chore: add to do

* feat: simplify metric block component further

* feat: basic layout done

* feat: metrics card orientation

* feat: add variant for differential number

* feat: basic sparkline for my metrics card

* feat: some polish for the sparkline

* feat: with xaxis for the sparkline

* feat: remove the xaxis line

* feat: add loading states

* feat: rename to metricscard

* fix: hydration issues

* feat: add tooltip to sparkline

* feat: add examples to docs

* fix: remove hasLink and hasTooltip props

* fix: re-add accidental removal of timestamps

* fix: add timestamps in correct location

* fix: add screen reader only and aria

* fix: text contrast on label in light mode

* fix: correct icon size

* chore: smol copy update

* chore: de-pluralize naming of component

* chore: rebuild packages
2025-11-14 11:40:57 +00:00
kemal.earth
af98191cc0 fix(design-system): chart rendering (#40306)
* chore: exploring possible breaking charts

* chore: still exploring why chart container content wont load

* chore: clean up and pin recharts to catalog

* chore: remove comments from comment preview file

* chore: remove react override

* Remove React 19.2 as a dependency.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-11-11 12:57:11 +00:00
Saxon Fletcher
ff599edf14 Page components (#40289)
* change database to pagelayout

* page components

* design system documentation

* reduce preview width

* revert studio

* functions apply page

* layout

* interfaces

* remove demos

* pckage

* format

* format

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* build registry

* pckg

* build script to allow index files

* switch exports

* fixes

* gen exports

* remove invalid prop

* fix typecheck

* fix prettier

* Revert "remove invalid prop"

This reverts commit 118ecd40c5.

* Revert "fix typecheck"

This reverts commit 0e1ec8fb61.

* Revert "fix prettier"

This reverts commit 2f25ed695c.

* pretter

* fresh pnpm i

* Update pnpm lock

* fix import

* revert

* Update packages/ui-patterns/src/PageContainer/index.tsx

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

* Update packages/ui-patterns/src/PageHeader/index.tsx

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

* Update packages/ui-patterns/src/PageSection/index.tsx

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

* ts fix

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

Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>

* change to layouts and examples

---------

Co-authored-by: Copilot <175728472+Copilot@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: Charis <26616127+charislam@users.noreply.github.com>
2025-11-11 04:02:30 +00:00
Danny White
73f8a15203 chore(studio): consistent copy/reveal input behaviour (#39509)
* user newer input in api keys

* user newer input in s3 connection settings

* improve input read-only styles

* make API text selectable

* disable text until reveal button tapped

* fix build

* revert change

* fix other cases

* revert hardcoded example

* nice region field

* documentation

* cleanup

* better docs

* colour tweaks
2025-10-16 13:44:40 +11:00
Clarence Bakosi
1b6e18f89f docs: fixed typo in inner side menu (#35664) 2025-05-14 12:47:54 +00:00
Clarence
3c80f2edbd docs: fixed typo in inner side menu (#35634) 2025-05-13 14:13:06 +00:00
Saxon Fletcher
98ae279a2b Add's a filter bar component to design system (#35238)
* add filter bar component

* update filter bar demo

* add custom component support

* filter bar component

* example filter bar in use

* remove search filter

* reinstate older filter bar

* revert

* update registry

* update example name

* clean up example imports

* Update FilterBar.tsx

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
2025-04-25 15:11:28 +08:00
Francesco Sansalvadore
d24df14aab Feat/toc component (#33964)
* test fuma toc

* make toc work

* ok toc

* ui-patterns toc

* fix types

* cleanup

* fix overflow issues

* cleanup

* fix loading w

* Update apps/docs/components/GuidesTableOfContents.tsx

* fix prettier

* format

* install deps

* target ES2018

* tweak regex

* update docs test snapshots

* fix useSubscribeTocRerender
2025-03-05 23:10:02 +01:00
Joshen Lim
61bff9ecb1 fix: MultiSelector with creatable flag (#33502) 2025-02-11 10:40:51 +08:00
Ivan Vasilov
35785bd4fb fix: Revert "feat: MultiSelector with creatable flag (#33375)" (#33492)
Revert "feat: MultiSelector with creatable flag (#33375)"

This reverts commit 7f4f88bf96.
2025-02-10 18:21:24 +01:00
Joshen Lim
7f4f88bf96 feat: MultiSelector with creatable flag (#33375) 2025-02-10 21:05:35 +08:00
Jordi Enric
a2aa5bc83d feature: Adds logs chart with stacked charts with total errors (#32742)
* add logschart with stacked bars

* use ui charts pkg

* fix contrast

* move to ui-patterns

* undo areachart

* add recharts peerDep

* update pckgjson and lock w recharts

* feat: enable client-side rendering for LogsBarChart component

* fix registry
2025-01-15 10:22:13 +01:00
Jonathan Summers-Muir
fb7c6e49b8 feat/ design system: inner side bar docs (#30048)
* init

* Update inner-side-menu.mdx

* Update index.tsx
2024-10-31 00:55:08 +08:00
Francesco Sansalvadore
d06c971118 feat: multiselect (#29695)
* multi-select v2

* update values

* multi-select 2 wip

* multi select 2

* multi select with combobox

* use includs

* finish multi select

* wrap badges

* overflow-x-scroll

* more

* remove multi select old from menu

* add inline search input mode in multi-select

* fix size type

* reset input when adding item

* update studio multiselector

* remove console.log

* flex-1

* remove old multi-select and decrease badge padding

* remove removeEventListener

* fix errors

* fix

* try only command

* restore inline

* Revert "fix"

This reverts commit 2fc1bea1c6.

* change callback depencency

* remove useCallback

* sdf

* remove Popover from multiselect

* udpate troubleshooting multiselect

* update

* form

* multiselect changelog

* try to remove useCallback

* fox

* bug found: checkbox in CommandItem no good

* clean up commented code

* clean up

* restore loading check

* cleanup type

* autofocus combobox input

* autofocus

* remove badgeLimit auto

* focus trigger button when hitting escape

* add tests for multi-select

* add disabled example

* remove console and useless function

* showResetIcon

* showResetIcon

* handleClose

* reset focus after reset
2024-10-25 15:43:15 +02:00
Ivan Vasilov
09a62662d8 chore: Clean up ui-patterns imports (#29132)
* Switch all top-level imports for ui-patterns components to use specific components when importing.

* Remove the @ui-patterns shorthand since it works exactly the same without the @.

* More import fixes.

* Fix the ui-patterns tests.
2024-09-30 21:41:26 +02:00
Jonathan Summers-Muir
58779edaa6 [Design System] Feat: Assistant Chat fragment component (#27952)
* init

* Update assistant-chat.mdx

* Expose a forwardRef in the ExpandingTextArea.

* Use the ExpandingTextArea in the AssistantChatForm component.

* Update the documentation for the assistant chat component.

* Remove unused code.

* Remove a TODO.

* Remove duplicate props.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2024-07-12 13:04:36 +02:00