mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
create-pull-request/patch
191
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
ff9ff456cd |
feat(design-system): updated trace ui components (#54389)
## Problem The `Trace` primitives in `ui-patterns` only supported panning and zooming through the minimap, and had no way to show summary facts about a trace. Using them for a real trace view in Unified Logs needs direct manipulation on the waterfall itself, a resizable span column for long span names, and a place to put trace-level stats. Part 1 of 3. This PR is design-system only — nothing in Studio consumes it yet. ## Solution **Direct manipulation on the waterfall** - Drag across the timeline to pan, wheel to zoom around the pointer. Panning only starts past a small threshold, so a drag never selects the row it ends on. - `Trace.Scrubber` follows the pointer with the offset from the trace start. - The span column is resizable by a focusable separator: drag it, nudge with the arrow keys, or jump to its bounds with Home and End. The timeline is kept above a minimum width so the tree can't be dragged over it. **Minimap** - Dragging outside the brush now selects a new window. Dragging the brush still pans and dragging an edge still resizes; a plain click outside still recentres. **New parts** - `Trace.Summary` / `Trace.SummaryItem`, with `Trace.TotalDuration`, `Trace.SpanCount` and `Trace.Depth` as values. **Visual** - Leaf rows get an elbow connecting them to their parent's guide, so the tree reads as a tree rather than floating dots. - Minor ruler ticks between the labelled ones, and a shorter ruler, which also shortens the span header. **One breaking change:** `Trace.Minimap` is now passed to `Trace.Waterfall`'s `minimap` prop instead of being a child, so it sits outside the area that handles pointer gestures. Both demos and the docs page are updated to match; these are the only consumers in the repo. ## Review instructions 1. Open the design-system preview and go to **UI Patterns → Tracing**. 2. On the first demo, drag left and right across the timeline to pan, and scroll to zoom — the zoom should stay anchored under the pointer. 3. Drag a span bar and release on it. It should pan, not select the row. 4. Drag the divider between the span column and the timeline. Then tab to it and use the arrow keys, Home and End — the handle should move from where it appears, and End should reach the far edge. 5. Move the pointer across the timeline and confirm the scrubber line tracks it with a readable offset. 6. Check the summary strip above the waterfall shows Duration, Depth and Total Spans. 7. On the minimap: drag the brush to pan, drag an edge to resize, drag outside the brush to select a new window, and click outside it to recentre. Zoom all the way in and confirm the brush stays wide enough to grab. 8. Scroll the docs page and confirm the code sample matches what the demos actually do. |
||
|
|
f05fe34966 |
feat(ui): scroll area (#54023)
## Problem - on `/kb/guides/migrate-from-auth0` in safari 27 on macos, the mouse wheel does not scroll the page and a trackpad does - radix scroll area bar in the table of contents adds a non-passive `wheel` listener on `document` - webkit stops mouse-wheel page scroll when that listener meets `overscroll-behavior-y: none` on `html`, which kb sets ## Solution - replaces radix with base ui in the `ui` scroll area parts because base ui binds its wheel listener to the scrollbar element - replaces the radix `display: table` workarounds in the studio token sheets and the connect sheet with a reset of the base ui content `min-width` - changes the docs ask ai scroll area to use the `ui` scroll area - adds an inset focus ring to the scroll area viewport because base ui makes an overflowing viewport focusable - adds a `getAnimations` stub to the jsdom test setups because the base ui viewport calls it - adds `@base-ui/react` to the pnpm catalog + points the design system scroll area page at the base ui docs <!-- ## Preview links If relevant, include links to changed pages for easy review access. Copy the preview base URL from the Vercel bot comment on this PR. Use the following table as an example template. | Site | Live | Preview | Search for | | -------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ----------------------------- | | WWW | [/blog/your-post](https://supabase.com/blog/your-post) | [/blog/your-post](https://zone-www-dot-com-git-branch-name-supabase.vercel.app/blog/your-post) | unique phrase from the change | | Docs | [/docs/guides/your-page](https://supabase.com/docs/guides/your-page) | [/docs/guides/your-page](https://docs-git-branch-name-supabase.vercel.app/docs/guides/your-page) | unique phrase from the change | | Studio | [/dashboard](https://supabase.com/dashboard) | [/dashboard](https://studio-git-branch-name-supabase.vercel.app/dashboard) | unique phrase from the change | | Design system | [/design-system](https://supabase.com/design-system) | [/design-system](https://design-system-git-branch-name-supabase.vercel.app/design-system) | unique phrase from the change | | UI library | [/library](https://supabase.com/library) | [/library](https://ui-library-git-branch-name-supabase.vercel.app/library) | unique phrase from the change | | Knowledge base | [/kb/guides/your-page](https://supabase.com/kb/guides/your-page) | [/kb/guides/your-page](https://kb-git-branch-name-supabase.vercel.app/kb/guides/your-page) | unique phrase from the change | --> <!-- ## Additional context Optionally add any other context or screenshots. --> ## Review instructions 1. open the preview [/kb/guides/migrate-from-auth0](https://kb-git-antlio-ui-scroll-area-supabase.vercel.app/kb/guides/migrate-from-auth0) in safari on macos with a mouse 2. turn the mouse wheel and make sure that the page scrolls and the table of contents marks the active heading 3. open the preview [/design-system/docs/components/scroll-area](https://design-system-git-antlio-ui-scroll-area-supabase.vercel.app/design-system/docs/components/scroll-area) and make sure that each demo shows its bar on hover and scrolls with the wheel 4. make sure that the horizontal demo scrolls sideways 5. press `tab` until a demo takes focus and make sure that it shows an inset focus ring 6. open a project in the [studio preview](https://studio-staging-git-antlio-ui-scroll-area-supabase.vercel.app/dashboard), click `Connect` and make sure that a long code line scrolls inside its code block and the sheet body does not scroll sideways 7. open the [docs preview](https://docs-git-antlio-ui-scroll-area-supabase.vercel.app/docs), press `cmd+k`, search for `auth` and make sure that the results list scrolls ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) |
||
|
|
fcbdda8107 |
chore: migrate formatter from Prettier to oxfmt (#53835)
Migrate code formatting across the monorepo from Prettier to `oxfmt`
(`0.79.0`, pinned) for much faster formatting checks locally and in CI
while keeping code churn minimal (78 files total, 0.7% of the repo).
Studio's `@ianvs/prettier-plugin-sort-imports` ordering
(`<BUILTIN_MODULES>`, `<THIRD_PARTY_MODULES>`, blank line, then `@/` and
relative imports) is preserved via `oxfmt`'s native `sortImports`
override for `apps/studio/**/*.{js,jsx,ts,tsx}`.
### Performance (before vs after, uncached)
| Benchmark | Prettier (`3.8.x`) | oxfmt (`0.79.0`) | Speedup |
| --- | ---: | ---: | ---: |
| CI formatting step (`blacksmith-4vcpu-ubuntu-2404`, full repo) | `73s`
| **`7s`** | **~10×** |
| Local `apps/studio` JS/TS (`5,157` files) | `17.74s` | **`0.36s`** |
**~49×** |
| Local full monorepo (`11,131` files) | — | **`2.39s`** | — |
**Added:**
- `.oxfmtrc.jsonc` at repo root with Prettier-matching options,
`sortPackageJson: false`, the Studio `sortImports` override, and ignore
patterns migrated from `.prettierignore`
- `oxfmt` (`0.79.0` exact pin) in `pnpm-workspace.yaml` catalog and
workspace `devDependencies` / `dependencies`
- Shared `.agents/scripts/format_and_lint.sh` hook script and
`.agents/hooks.json` (used by both Claude Code and Antigravity)
**Changed:**
- Replaced `test:prettier` with `format:check` and switched `format` in
root `package.json` to `oxfmt`
- Updated `packages/api-types` (`codegen`,
`verify-production-types.mjs`), `apps/design-system` (`build:registry`),
`apps/docs` (`CodeSample.ts`, `generate-sitemap.ts`, `next.config.mjs`,
`spec/Makefile`), `apps/www` (`generate-sitemap.mjs`), and
`packages/build-icons` (`generateIconFiles.mjs`) from Prettier to
`oxfmt`
- Updated `.github/workflows/prettier.yml` (keeping the `format` job ID
intact), `.github/workflows/autofix_linters.yml`,
`.claude/settings.json`, `AGENTS.md`, `CONTRIBUTING.md`, and
`.github/copilot-instructions.md`
- Applied one-time `oxfmt` formatting pass in a separate commit (78
files: 30 `i18n/README.*.md` trailing spaces, 19 Studio files, 17 other
TS/TSX/generated types, 8 MD/MDX, 3 `package.json`, 2 example CSS files)
**Removed:**
- `prettier`, `@ianvs/prettier-plugin-sort-imports`, and
`prettier-plugin-sql-cst` from `devDependencies` (note: `.sql` files
were not part of the CI formatting glob; `eslint-config-prettier` is
kept for ESLint)
- `prettier.config.mjs`, `.prettierignore`, and
`.claude/scripts/format_and_lint.sh`
## To test
- Run `pnpm run format:check` and confirm it passes cleanly across all
matched files
- Run `pnpm --filter api-types test`, `pnpm --filter docs exec vitest
run features/directives/CodeSample.test.ts`, and `pnpm --filter www exec
vitest run generate-sitemap.test.ts`
- Edit an `apps/studio` file with out-of-order imports and run `pnpm run
format` to confirm builtin/third-party vs `@/`/relative grouping matches
prior behavior
- Check that the `Check Code Formatting` CI workflow passes on this PR
---------
Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
|
||
|
|
1c85e3efb7 |
fix(studio): clarify OAuth permission labels (#53699)
## Problem OAuth mixes abbreviated access levels with permission names whose meaning is hard to infer. ## Solution Use **Read and write** and **Read only** consistently, and add keyboard-accessible definitions for Database management and Environment. Reuse the dotted underline from Pipelines and document above-label placement. | Before | After | | --- | --- | | <img width="926" height="1936" alt="CleanShot 2026-11-20 at 12 20 42@2x" src="https://github.com/user-attachments/assets/053b4afa-f428-4c0d-8f3b-dbc3f3dd5cf8" /> | <img width="886" height="1902" alt="CleanShot 2026-11-20 at 12 21 20@2x" src="https://github.com/user-attachments/assets/8277064b-1e73-43ff-b7b5-4d4af7d6c68f" /> | | _No tooltips, old “READ-WRITE”._ | _Tooltips for ambiguous permissions, “READ AND WRITE” for clarity and to match setup terminology._ | ## Review instructions 1. **Before:** Open the [Scoped OAuth tester](https://api.supabase.green/v1/oauth/authorize?response_type=code&client_id=a3999bfe-cfc7-4584-9c5a-ab6828d35aa3&redirect_uri=http%3A%2F%2Flocalhost%3A8765%2Foauth%2Fcallback) and leave consent open. 2. **After:** Open the [deploy preview consent screen](https://studio-staging-git-dnywh-oauth-permission-labels-supabase.vercel.app/dashboard/authorize?auth_id=606dbb8e-60ea-4155-bb36-70a7d31378dd). **What to check** 1. Open consent for a test app that requests database read/write, environment read, and projects read access. 2. Check the small **Read and write** and **Read only** headings. Hover or Tab to Database management and Environment. Each definition should appear above its dotted-underlined label. 3. Optionally open an existing Pipeline and hover over an annotated status label to check the shared underline. |
||
|
|
3b12d2e167 |
feat(ui): switch component (#53379)
## Problem * the shared switch in `packages/ui` uses the radix primitive * the thumb does not react to hover or press, and only the track color shows the state * a click on a switch label toggles the switch, but the label keeps the default cursor ## Solution * replaces the radix switch with base ui, and keeps a native `<button>`, so labels and `role="switch"` work as before * changes the thumb to white and the resting track one step darker, so the off state shows on light pages * replaces the hover color change with a thumb stretch that grows more on press, so the thumb reacts to the pointer * adds a pointer cursor on labels next to an enabled switch, because a click on the label toggles it * removes the `PointerEvent` stand-in from the studio test setup, because it blocks base ui switch clicks in jsdom * changes the install step in the switch docs to `@base-ui/react`, so the manual install matches the component <!-- linear:table-colwidths:345,344 --> <table> <thead> <tr> <th></th> <th>preview</th> </tr> </thead> <tbody> <tr> <td>light</td> <td> https://github.com/user-attachments/assets/a7c33dda-3487-43b8-881b-344e28891650 </td> </tr> <tr> <td>dark</td> <td> https://github.com/user-attachments/assets/9718057b-f983-4099-8f7e-82521001b625 </td> </tr> </tbody> </table> ## Preview links | Site | Live | Preview | Search for | | -- | -- | -- | -- | | Design system | [/design-system/docs/components/switch](<https://supabase.com/design-system/docs/components/switch>) | [/design-system/docs/components/switch](<https://design-system-git-feat-switch-base-ui-supabase.vercel.app/design-system/docs/components/switch>) | Airplane Mode | | Studio | [/dashboard/project/\_/storage/files](<https://supabase.com/dashboard/project/_/storage/files>) | [/dashboard/project/\_/storage/files](<https://studio-git-feat-switch-base-ui-supabase.vercel.app/dashboard/project/_/storage/files>) | Public bucket | ## Review instructions 1. open [/design-system/docs/components/switch](<https://supabase.com/design-system/docs/components/switch>) and [/design-system/docs/components/switch](<https://design-system-git-feat-switch-base-ui-supabase.vercel.app/design-system/docs/components/switch>) side by side 2. hover and click the "airplane mode" label, and make sure that the cursor is a pointer and the switch toggles 3. change the theme to light and to dark, and make sure that the thumb stays white in the on and off states 4. scroll to the form example, and make sure that the disabled "security emails" switch does not toggle or stretch 5. open [/dashboard/project/\_/storage/files](<https://studio-git-feat-switch-base-ui-supabase.vercel.app/dashboard/project/_/storage/files>), click "new bucket" and turn on "public bucket", and make sure that the "public buckets are not protected" warning shows ## Checklist Check all before review: - [X] I have read [CONTRIBUTING.md](<https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md>) - [X] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](<https://github.com/supabase/supabase/tree/master/apps/docs/style-guide>) |
||
|
|
2e3e10826f |
docs(design-system): deprecate legacy Studio page chrome (#53571)
<!-- CURSOR_AGENT_PR_BODY_BEGIN --> ## Problem Legacy Studio page chrome (`PageLayout`, `Scaffold*`, in-header breadcrumbs/tabs) is still easy to reach for new work. #53356 deprecated a few of those APIs; the rest still lacked `@deprecated` notices. ## Solution Add `@deprecated` JSDoc on the remaining Studio page-chrome helpers and strengthen the existing `PageHeaderBreadcrumb` / `PageHeaderNavigationTabs` notices, with site-relative `/design-system/docs/...` links. Also point Nav Menu docs at `PageNav` instead of `PageLayout`. ## Review instructions 1. Skim JSDoc on `apps/studio/components/layouts/Scaffold.tsx` and `PageLayout/PageHeader.tsx`. 2. Confirm `PageHeaderBreadcrumb` and `PageHeaderNavigationTabs` in `packages/ui-patterns/src/PageHeader/index.tsx` point at `/design-system/docs/fragments/...`. ## Checklist - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-1c9eee9e-93f6-4914-9d1d-76a7bbd511be?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-1c9eee9e-93f6-4914-9d1d-76a7bbd511be&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Danny White <dnywh@users.noreply.github.com> |
||
|
|
51bd16d9ca |
Joshenlim/fe 5064 update database triggers to use new nav (#53356)
## Context Update database triggers to use the new page components + add deprecation notices to legacy components There's no visual change here --------- Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com> |
||
|
|
e2425b7214 |
docs(design-system): clarify related split-button actions (#52349)
## Problem The Button guidance explains split buttons but doesn't show how to group a visible action with other actions for the same item or section. ## Solution Document when to use each pattern: - **Split button:** the main button runs the most common variation of an action. The attached chevron opens alternatives, such as other export formats. - **Dropdown button:** the whole button opens a menu, such as a time-range picker. - **Button with more actions:** keep the main action visible and use a separate ellipsis menu for distinct actions. The examples show both a primary “Add pipeline” button and a default “Stop” button. Align the Admonition split-button example with the same guidance. ## Review instructions 1. Open the [Button guidance preview](https://design-system-git-dnywh-docs-related-split-buttons-supabase.vercel.app/design-system/docs/components/button#split-with-dropdown) and compare the attached export chevron with the single time-range dropdown. 2. Open each ellipsis in [Button with more actions](https://design-system-git-dnywh-docs-related-split-buttons-supabase.vercel.app/design-system/docs/components/button#button-with-more-actions). Check that the “Add pipeline” menu groups usage and settings separately from “Disable Pipelines”, and that the “Stop” menu separates restart from edit and delete. |
||
|
|
9ef93f1f19 |
feat(design-system): trace header and composition (#52169)
## Problem We're adding tracing UI primitives to the design system as building blocks for future trace waterfalls. This is PR 7, the last in a stack of small, component-by-component PRs. The earlier PRs built the waterfall itself. This one adds the header controls, a live demo and a docs page that reads as one story. It also gives the zoom a way back, since `resetWindow()` from PR 5 had no button until now. Part of [DEBUG-243](https://linear.app/supabase/issue/DEBUG-243/tracing-ui-primitives-stacked-prs) ## Solution Adds the header parts, a live demo and a docs restructure. **Header parts** (`Trace.Header`, `Trace.Title`, `Trace.Status`, `Trace.CollapseAll`, `Trace.ResetZoom`) - `Trace.Header` is a layout container for the controls above the waterfall, and takes a `className`. The other parts take no props. - `Trace.Title` shows the name of the first root span, falling back to "Trace". There's no new field on the trace data. - `Trace.Status` is a badge showing Live, Done or Failed. Failed means the root span has an error status. It also renders a visually hidden `role="status"` element with `aria-live="polite"` that announces the same text, and has no footprint where it isn't rendered. - `Trace.CollapseAll` toggles every span that has children, and its label flips between "Collapse all" and "Expand all". It's disabled when no span has children. It's cheap on large traces because it only walks spans that have children. This uses `toggleAllCollapsed` and `areAllCollapsed` in `utils.ts` and one bulk `toggleCollapseAll()` on the view context. - `Trace.ResetZoom` calls `resetWindow()`. It's disabled unless the view is zoomed, and after a reset the window follows a growing live trace again. **Live demo** - A new docs example with a ticking live trace. Spans appear and finish as the clock advances, and it includes an error span and event markers. - It starts paused at 0ms, with a Play/Pause button in the header. The clock is an accumulated base value plus the start of the current play session, so pausing freezes the elapsed time exactly and resuming continues without a jump. It uses `minRangeMs` so the axis isn't degenerate at the start. When it reaches the end, the badge flips from Live to Done, and Play after that restarts from 0. - Both demos now use Supabase request paths (such as `GET /rest/v1/orders` and `POST /functions/v1/process-order`) as sample data. **Docs** - The main example is now a single composed waterfall: header, minimap, ruler, rows, bars and inspector. The page runs from the intro to a Composition section with that example and a snippet, then short sections for Header, Waterfall and ruler, Rows and bars, Minimap and zoom, Inspector, and Live traces. The static live example from PR 2 was dropped from the composed example. ## Additional context This is PR 7 of a stack, so it builds on `kemal/debug-243-6-trace-inspector-popover`. The earlier exploration is in the draft #51184, which can be closed once the stack lands. Known and left as is: - While a live trace grows unzoomed, finished bars and markers jump while the ruler ticks slide. A shared `transition-[left,right,width]` across the bar primitives would fix it, and it's a follow-up. - The Failed state is only exercised in a test fixture, not in a docs example. A root error in the live demo would mean Done never shows. Out of scope: `Trace.Filter` and search, controlled `selectedId` props, mouse-wheel or pinch zoom, zoom-to-span, row enter and exit motion, kind-based tinting, responsive rows, and a per-span icon slot. ## Review instructions 1. Open the preview link and find the Tracing page under UI Patterns. Check the page reads in order from intro to composition to the individual sections. 2. In the composed example, check the title shows the root span's name and the status badge shows Done. 3. Zoom in with the minimap. Check "Reset zoom" is disabled before you zoom, enables after, and restores the full range when clicked. 4. Click "Collapse all". The tree should collapse to the root rows and the label should change to "Expand all". Click again and everything should expand. 5. Check the inspector, minimap and arrow-key navigation still work in the composed example. 6. In the live demo: 1. It starts paused at 0ms with a Live badge. 2. Click Play and check time advances and bars grow. 3. Click Pause and check the elapsed time stays frozen. Wait a few seconds, then resume and check it continues without a jump. 4. Zoom in and check the window stays fixed while the trace grows. Click "Reset zoom" and check it follows growth again. 5. Let it run to completion and check the badge flips to Done. Play after that should restart from 0. 7. With a screen reader or by inspecting the DOM, check the visually hidden `role="status"` text matches the badge. 8. Switch between light and dark mode and check the header, controls and demo are legible in both. 9. Read `Header.tsx`, the collapse helpers in `utils.ts` and the live demo's clock logic. Run the Trace unit tests in `packages/ui-patterns`, which now cover the collapse-all helpers, and run typecheck and Prettier. |
||
|
|
42e3fb307d |
feat(design-system): trace inspector (#52167)
## Problem We're adding tracing UI primitives to the design system as building blocks for future trace waterfalls. This is PR 6 in a stack of small, component-by-component PRs. PR 5 added the minimap and zoom, and this one adds the inspector, which shows the details of the selected span. Selection has been in place since PR 3 but had nothing reading it until now. Part of [DEBUG-243](https://linear.app/supabase/issue/DEBUG-243/tracing-ui-primitives-stacked-prs) ## Solution Adds `Trace.Inspector`, a non-modal popover anchored to the selected span's bar. - It renders nothing when no span is selected. When one is, it opens at the bar's actual x-position, so it reserves no layout space when closed. Place `<Trace.Inspector />` once inside `Trace.Root`. - The content is compact and read-only: name, status badge, start offset, duration (marked as running when the span has no end), attributes and events. - It's anchored with Radix Popper's virtual-element anchor. The virtual rect re-queries the DOM within this root's tree on every position update, and falls back from the bar (clamped to its lane) to the lane, and then to an off-screen rect so the popover hides when nothing is visible. `updatePositionStrategy="always"` keeps it in step with scroll, zoom, pan and virtualization. - `contextElement` is the tree element, so Floating UI attaches scroll listeners to the Rows viewport and the popover follows the bar when it scrolls. - Lookups are scoped to this root's tree and never go through `document`. The docs page renders several waterfalls that reuse the same span ids, so a document-wide query would anchor to the wrong demo. The view context gains a `treeRef` for this, with no wrapper element. - Auto-focus on open and close is prevented, so the arrow-key navigation from PR 3 keeps working while the popover is open. - Radix also dismisses on focus outside, which would close the popover on every arrow-key move. `onInteractOutside` ignores interactions inside this root's waterfall for that reason. - The popover is keyed per selected span, so changing the selection re-anchors cleanly. - `Trace.Rows` now scrolls the selected row into view when the selection changes, reusing its existing `scrollToIndex`, so selecting a row that isn't mounted still lands the popover in the right place. - `formatAttributeValue` in `utils.ts` formats attribute values, with a unit test. - Docs: `<Trace.Inspector />` in both examples, two attributes added to `auth.verify` so the section isn't empty, and a new "Inspector" section on how it opens and closes. ## Additional context This is PR 6 of a stack, so it builds on `kemal/debug-243-5-trace-minimap` and PR 7 builds on this branch. The earlier exploration is in the draft #51184, which stays open as reference until the stack lands. How it closes: - Escape or an outside click closes it and clears the selection. - Clicking another row switches the popover to that row without closing it first. - Dragging the minimap brush keeps it open. Behaviours worth knowing before you review: - **Zoom:** when the selected bar is fully outside the visible window, the popover anchors under the row's lane. When it's partly visible, it anchors to the visible part. - **Virtualization:** when the selected row scrolls out of the Rows viewport, the popover hides and the selection is kept. It reappears at the row when you scroll back. - **Viewport edge:** near the right edge the popover shifts left to stay on screen, so its left edge may not line up with the bar. - **Multiple roots on one page:** each root has its own non-modal popover, so opening a popover in one demo closes the others. Escape also only closes the most recently opened popover. Neither matters in an app with one trace per page, so this PR doesn't add anything to prevent it. - **Out of scope:** header controls, search, controlled `selectedId` props, tabs or actions in the inspector, and a pinned-span mode. ## Review instructions 1. Open the preview link, find the Tracing page under UI Patterns, then the "Inspector" section. 2. Click a bar's row and check the popover opens at the bar, just below it, showing name, status, start, duration, attributes and events. 3. Press the arrow keys through at least three rows (Enter selects) with the popover open. It should re-anchor each time, and keyboard focus should stay on the rows. 4. Scroll the Rows viewport with the popover open. It should move with the bar, and hide when the row scrolls out of view and come back when you scroll back. 5. In the second example, select a span that has the same name as one in the first example, and check the popover anchors to the bar in the second one. 6. Zoom in with the minimap so the selected bar leaves the window, and check the popover anchors under the row's lane and isn't stuck in the wrong place. Drag the brush and check the popover stays open. 7. Check the closing behaviour: Escape closes it, an outside click closes it, and clicking another row switches directly. 8. Switch between light and dark mode and check the popover is legible in both. It fades in on open, so check it once it has settled. 9. Read `Inspector.tsx` and the changes to `Rows.tsx` and `Trace.tsx`. Run the Trace unit tests in `packages/ui-patterns`, which now cover `formatAttributeValue`, and run typecheck and Prettier. |
||
|
|
2895c78d0a |
feat(design-system): trace minimap (#52164)
## Problem We're adding tracing UI primitives to the design system as building blocks for future trace waterfalls. This is PR 5 in a stack of small, component-by-component PRs. PR 4 added bars and markers, and this one adds the minimap. It's also the first PR where the visible time window can change, so the waterfall can now be zoomed and panned. Part of [DEBUG-243](https://linear.app/supabase/issue/DEBUG-243/tracing-ui-primitives-stacked-prs) ## Solution Adds `Trace.Minimap` and the zoomable window it controls. **Window state** - `useView()` gains `window`, `isZoomed`, `setWindow(start, end)` and `resetWindow()`. `resetWindow` has no button yet. The header controls come in a later PR. - Unzoomed, the window follows the trace bounds as a live trace grows. Once zoomed, it stays fixed. - `Trace.Waterfall` now builds its scale from the view window instead of the trace bounds. - `clampWindow` keeps the window inside the bounds with a minimum width of 1% of the bounds, and `resizeWindow` handles edge drags. Both are pure and tested. - `createTimeScale` takes an `origin`, so tick labels stay offsets from the trace start while zoomed and don't reset to 0. This was a known gap from PR 2. - `Trace.Bar`, `Trace.CollapsedChildren` and `Trace.Slowest` follow the window. Spans outside it are clipped by the lane, out-of-window child ticks are skipped, and the slowest badge hides when its bar is entirely out of view or sits at the visible trailing edge. **Minimap** - A full-width strip above the ruler showing the whole trace compressed. It draws one row per depth level, coloured by status (errors win where spans overlap), and rows deeper than the limit fold into the last row. Neighbouring columns are merged, so the DOM size doesn't depend on the number of spans. - A brush shows the visible window. Drag the body to pan, drag either 8px edge to resize, and click outside it to recentre. - The brush is a focusable slider with an aria-label and aria-valuetext. Arrow keys pan by 10% of the window, and Shift+arrows move the end edge. **Transitions** - The 300ms live-growth transitions (ruler ticks, the "now" line, the running bar width) only apply while the view isn't zoomed, so nothing lags behind the brush while you drag. Docs: both example waterfalls include the minimap, and there's a new "Minimap and zoom" section. ## Additional context This is PR 5 of a stack, so it builds on `kemal/debug-243-4-trace-bar-markers` and PR 6 builds on this branch. The earlier exploration is in the draft #51184, which stays open as reference until the stack lands. Known and left as is: - Once you zoom, dragging the brush back to the full range keeps the window fixed. It stops following a growing live trace until `resetWindow()` is called. The reset button arrives with the header controls, so there's no reset in the docs example yet and a reload is the way back. - The minimap is full width and no longer lines up with the timeline column. That's deliberate. - Mouse-wheel or pinch zoom on the lanes, zoom-to-span and search are out of scope. ## Review instructions 1. Open the preview link and find the Tracing page under UI Patterns, then the "Minimap and zoom" section. 2. Check the strip above the ruler shows the trace as depth rows coloured by status, with a brush covering the full range. 3. Drag the brush's end edge inward and check the ruler, bars, markers and child ticks all update together with no lag, and that tick labels still read as offsets from the trace start. 4. Drag the brush body to pan, and check bars outside the window are clipped and don't leave stray artifacts. 5. Click on the strip outside the brush and check the window recentres there. It stops at the bounds, so the brush won't always land under the cursor. 6. Focus the brush and use the keyboard: 1. Left and Right pan the window. 2. Shift+Left and Shift+Right shrink and grow the end edge. 7. In the live example, check the minimap, ruler and bar still behave as before while unzoomed. 8. Switch between light and dark mode and check the strip, brush and rows are legible in both. 9. Read `Minimap.tsx`, the window state in `Trace.tsx` and the additions to `utils.ts`. Run the Trace unit tests in `packages/ui-patterns`, which now cover the window clamp and resize, the tick origin and the minimap rects, and run typecheck and Prettier. |
||
|
|
0ed90ae460 |
fix(ui): split button divider (#53258)
## Problem - in dark mode split button shows a middle divider that is lighter and heavier than the outer edge, and the design system `button-split-dropdown` example has the same bug - button edge is a translucent inset shadow over a translucent fill, so the `-ml-px` overlap stacks two edges and two fills in one column - light mode has the same defect on hover and with the menu open, because the hover fill is translucent too ## Solution - adds a `SplitButtonGroup` component to `ui`, so a split button has a `role="group"` wrapper and one shared divider - fixes the divider color in both themes, because only one button paints the shared border column - changes the shared column to follow the hovered button, so the divider takes its edge color in a fixed place - removes the press scale from buttons in the group, so no gap opens between the two buttons - changes the design system split button docs to `SplitButtonGroup` | before | after | | -------|------| | <img width="428" height="219" alt="image" src="https://github.com/user-attachments/assets/4cbc5dc9-3575-4eef-83b9-a6141796ccc8" /> | <img width="428" height="219" alt="image" src="https://github.com/user-attachments/assets/9c5b283d-e6bd-428a-bee1-7f59249aeb83" /> | | <img width="428" height="219" alt="image" src="https://github.com/user-attachments/assets/046338f9-6dfd-4c32-8e33-30c1b0f84715" /> | <img width="428" height="219" alt="image" src="https://github.com/user-attachments/assets/c79e1c7a-e1ac-4682-a898-1a36c6b028fc" /> | <!-- ## Preview links If relevant, include links to changed pages for easy review access. Copy the preview base URL from the Vercel bot comment on this PR. Use the following table as an example template. | Site | Live | Preview | Search for | | -------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ----------------------------- | | WWW | [/blog/your-post](https://supabase.com/blog/your-post) | [/blog/your-post](https://zone-www-dot-com-git-branch-name-supabase.vercel.app/blog/your-post) | unique phrase from the change | | Docs | [/docs/guides/your-page](https://supabase.com/docs/guides/your-page) | [/docs/guides/your-page](https://docs-git-branch-name-supabase.vercel.app/docs/guides/your-page) | unique phrase from the change | | Studio | [/dashboard](https://supabase.com/dashboard) | [/dashboard](https://studio-git-branch-name-supabase.vercel.app/dashboard) | unique phrase from the change | | Design system | [/design-system](https://supabase.com/design-system) | [/design-system](https://design-system-git-branch-name-supabase.vercel.app/design-system) | unique phrase from the change | | UI library | [/library](https://supabase.com/library) | [/library](https://ui-library-git-branch-name-supabase.vercel.app/library) | unique phrase from the change | | Knowledge base | [/kb/guides/your-page](https://supabase.com/kb/guides/your-page) | [/kb/guides/your-page](https://kb-git-branch-name-supabase.vercel.app/kb/guides/your-page) | unique phrase from the change | --> <!-- ## Additional context Optionally add any other context or screenshots. --> ## Review instructions 1. open the [/design-system/docs/components/button](https://design-system-git-antlio-fix-split-button-divider-supabase.vercel.app/design-system/docs/components/button#split-with-dropdown) preview in dark mode, and zoom in on the split example 2. make sure that the divider has the same color and weight as the outer edge 3. hover the primary action, and make sure that the divider takes its edge color and stays in the same place 4. hover the chevron and open the menu, and make sure that the divider takes the chevron edge color 5. switch to light mode, and repeat steps 2 to 4 6. press and hold the primary action, and make sure that it does not shrink 7. tab to the chevron, and make sure that the focus ring shows on all four sides and that Enter opens the menu 8. open the [/design-system/docs/fragments/admonition](https://design-system-git-antlio-fix-split-button-divider-supabase.vercel.app/design-system/docs/fragments/admonition#split-button-with-dropdown) preview at a narrow width, and make sure that the split fills the row with one divider 9. open the [/dashboard/project/\_/settings/log-drains](https://studio-git-antlio-fix-split-button-divider-supabase.vercel.app/dashboard/project/_/settings/log-drains) preview, and make sure that the `primary` split looks the same as on master ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) |
||
|
|
0c49117cf3 |
feat(design-system): trace bar and markers (#52163)
## Problem We're adding tracing UI primitives to the design system as building blocks for future trace waterfalls. This is PR 4 in a stack of small, component-by-component PRs. PR 3 added the span rows with an empty timeline column, and this one fills it in with bars, event markers and two optional overlays. After it, the waterfall looks like one. Part of [DEBUG-243](https://linear.app/supabase/issue/DEBUG-243/tracing-ui-primitives-stacked-prs) ## Solution Adds `Trace.Bar`, `Trace.Markers`, `Trace.Slowest` and `Trace.CollapsedChildren`. They're separate primitives that you compose inside a `Trace.Lane`, positioned from the Waterfall's time scale: - `Trace.Bar` is the span's bar. - It's tinted by span status (brand, destructive or muted), not by service or kind. - It has a minimum visible width so very short spans stay visible, and a ring when its row is selected. - A running span extends to `nowMs`, and its width transitions smoothly (linear, 300ms, respecting reduced motion) while it runs. - `Trace.Markers` draws a small marker at each of the span's event timestamps, with the event name as a native tooltip. Events outside the visible window are skipped. - `Trace.Slowest` is opt-in. It shows a warning badge on the row of the slowest finished span (`slowestId` from PR 1). The badge is anchored to the bar's trailing edge with `right:`, so it stays inside the lane even when the bar is nearly full width, and it has a solid background so it's readable over a coloured bar. - `Trace.CollapsedChildren` is opt-in. When a row has children and is collapsed, it draws a thin tick at each direct child's midpoint on the parent's bar. It only looks at direct children, and it renders nothing when a span has more than 200 of them (`MAX_COLLAPSED_MARKS`), to bound the DOM cost. - Recommended order inside a `Lane` is `Bar`, `CollapsedChildren`, `Markers`, `Slowest`, so markers and the badge sit on top if they overlap. - `utils.ts` gains `effectiveEndMs`, `MAX_COLLAPSED_MARKS` and `collapsedChildMidpoints`. `Trace.Duration` now uses `effectiveEndMs`, so running spans measure up to `nowMs`. - `Trace.Root` gets an optional `defaultCollapsed` prop (a set of span ids). It lets the docs example open with a parent collapsed to show the child ticks. - Docs: the "Rows" example heading becomes "Rows and bars", the example now shows each state (normal, error, running, collapsed parent with child ticks, events and the slowest badge), and there's a short composition snippet. ## Additional context This is PR 4 of a stack, so it builds on `kemal/debug-243-3-trace-rows-cell-lane` and PR 5 builds on this branch. The earlier exploration is in the draft #51184, which stays open as reference until the stack lands. Known and left as is: - Only the running bar's width animates. Finished bars and markers move instantly while the Ruler's ticks slide as the range grows, and a running bar's left edge changes without animating. If that looks off in a live trace, the fix is a shared `transition-[left,right,width]` across the four primitives. - The docs example is static, so running-bar growth isn't visible on the page. It was checked on a temporary ticking page that isn't part of this PR. ## Review instructions 1. Open the preview link and find the Tracing page under UI Patterns. 2. In the "Rows and bars" example, check each state: 1. A normal bar. 2. An error bar in the destructive tint. 3. A running bar that ends at the "now" line. 4. A collapsed parent with a tick for each child. Expand it and the ticks should disappear. 5. A span with event markers. Hover a marker to see the event name. 6. The slowest badge on the full-width root bar, fully inside the lane and readable. 3. Click a bar and check its row gets selected and the bar shows the ring. 4. Switch between light and dark mode and check the bars, ticks, markers and badge are legible in both. 5. Read `Bar.tsx` and the additions to `utils.ts`. Run the Trace unit tests in `packages/ui-patterns`, which now cover the bar and child-tick helpers including the 200 cap, and run typecheck and Prettier. |
||
|
|
cd6b25614c |
feat(design-system): trace row, cell, lane and duration (#52161)
## Problem We're adding tracing UI primitives to the design system as building blocks for future trace waterfalls. This is PR 3 in a stack of small, component-by-component PRs. PR 2 added the waterfall container and the time ruler, and this one adds the span rows. It's the first PR where the tree is interactive. Part of [DEBUG-243](https://linear.app/supabase/issue/DEBUG-243/tracing-ui-primitives-stacked-prs) ## Solution Adds `Trace.Rows`, `Trace.Cell`, `Trace.Lane` and `Trace.Duration`: - `Trace.Rows` is a virtualized, scrollable `role="tree"` list of span rows, so large traces stay fast. Rows are flattened from the span tree and the collapse state, and collapsed spans hide their descendants. The children you pass are the per-row template. - `Trace.Cell` is the tree column for a row: indent by depth, an expand/collapse toggle when the span has children, the span name and `Trace.Duration`. - `Trace.Lane` is the timeline column for a row. For now it's only the positioned container that bars and markers will fill in the next PR, and it has no padding so it lines up with the Ruler. - `Trace.Duration` shows the formatted duration, and pulses (motion-safe only) while the span is running. - The root now holds view state: `selectedId` and the set of collapsed spans. Both are uncontrolled and available through `useView()`. Selection is here because rows are interactive and the Inspector PR will read it. - Keyboard support follows the tree pattern, with a roving tabindex: - Up/Down move focus. - Right expands a collapsed row. - Left collapses an expanded row, or moves focus to the parent from a collapsed row or a leaf. - Enter or Space selects. - Arrow keys move focus only. Selection is separate and happens on Enter, Space or click. - `utils.ts` gains `flattenTree` (visible rows with depth, `hasChildren` and `isExpanded`) and `formatDuration` (three significant digits on top of `formatMs`). - New dependency: `@tanstack/react-virtual` in `ui-patterns`, using the same range as Studio (`^3.13.24`) and with a matching `pnpm-lock.yaml` change. - The Tracing docs example now renders the rows, with the preview sitting under the "Rows" heading. There are no bars yet, so the timeline column is empty apart from the ruler. Bars come in the next PR. ## Additional context This is PR 3 of a stack, so it builds on `kemal/debug-243-2-trace-waterfall-ruler` and PR 4 builds on this branch. The earlier exploration is in the draft #51184, which stays open as reference until the stack lands. Left out on purpose: - Controlled `selectedId` props. - `aria-setsize` and `aria-posinset`. - Hidden-descendant counts, which come with the collapsed-children marks in PR 4. A span whose parent is missing is treated as a root, which is how PR 1 already behaves, so there's no separate orphan handling here. ## Review instructions 1. Open the preview link and find the Tracing page under UI Patterns. 2. In the example, check the rows render with indent, toggles, names and durations, and that the timeline column lines up under the ruler. 3. Collapse and expand a parent with the toggle. Its descendants should disappear and reappear. 4. Click into the tree and use the keyboard: 1. Down moves focus to the next row. 2. Right expands a collapsed row. 3. Left collapses an expanded row. 4. Left on a leaf or a collapsed row moves focus to its parent. 5. Enter selects the focused row. 5. In the live example, check the running span's duration pulses, and that it doesn't when your OS has reduced motion on. 6. Switch between light and dark mode and check the rows, toggles and selected state are legible in both. 7. Read `Rows.tsx`, the view state in `Trace.tsx` and the additions to `utils.ts`. Run the Trace unit tests in `packages/ui-patterns`, which now cover `flattenTree` and `formatDuration`, and run typecheck and Prettier. |
||
|
|
ba94909a8c |
feat(design-system): trace waterfall, ruler, grid and cursor (#52158)
## Problem We're adding tracing UI primitives to the design system as building blocks for future trace waterfalls. This is PR 2 in a stack of small, component-by-component PRs. PR 1 added the data layer, and this one adds the first visible pieces: the waterfall container and the time ruler. It also creates the Tracing docs page. Part of [DEBUG-243](https://linear.app/supabase/issue/DEBUG-243/tracing-ui-primitives-stacked-prs) ## Solution Adds `Trace.Waterfall`, `Trace.Ruler`, `Trace.Grid` and `Trace.Cursor`. - `Trace.Waterfall` measures its own width and provides the time scale to the primitives inside it. Three columns: the tree (`treeWidth`, default 320), the timeline, and a controls gutter (`controlsWidth`, default 56). Both widths are exposed as CSS variables and subtracted from the scale width, so everything shares one layout. No rounded corners. - `Trace.Ruler` is the time axis: a "SPAN" label over the tree column, ticks that adapt to the visible range, and the gutter, which renders the Ruler's children (for icon controls). - `Trace.Grid` draws a vertical gridline at every ruler tick, from the same `scale.ticks`. It's one non-scrolling overlay below the ruler that fills the timeline column, so rows added later sit on top. - `Trace.Cursor` draws the live cursor, a line from the top of the ruler to the bottom of the waterfall with a dot on the ruler's bottom edge. It shows while the trace is live and inside the visible window. Ticks, gridlines and the cursor share one live-growth transition that respects reduced motion. - `createTimeScale` also returns the ticks, and `utils.ts` gains `niceTickStep` and `formatMs`. Tick labels pick their precision per unit, so 1.2s and 1.4s don't both read "1s". - New design-system page, Tracing, with an intro and one example showing a finished trace and a live trace. `ComponentPreview` gets an optional `squared` prop, used only by this page, to remove the preview's rounded top corners. Rows, bars, markers, the minimap and the inspector come in later PRs, so the timeline is empty apart from the ruler. ## Additional context This is PR 2 of a stack, so it builds on `kemal/debug-243-1-trace-foundation` and PR 3 builds on this branch. The earlier exploration is in the draft #51184, which stays open as reference until the stack lands. ## Review instructions 1. Open the preview link and find the Tracing page under UI Patterns. 2. In the first example, check the ruler ticks and labels across the trace duration, and that the labels read sensibly (for example 1.2s and 1.4s stay distinct). 3. In the live example, check the "now" line sits at about the halfway point, and that it's not drawn when `nowMs` falls outside the visible range. 4. Resize the window and check the ticks re-measure and re-space. 5. Switch between light and dark mode and check the ticks, labels and now line are legible in both. 6. Read `Waterfall.tsx` and the additions to `utils.ts`. Run the Trace unit tests in `packages/ui-patterns`, which cover the tick step and formatting logic, and run typecheck and Prettier. |
||
|
|
1a2db3779e |
feat(docs): ask ai v2 (#52459)
## Problem - the change is a follow-up to search v2 (#51175, #52233), which runs as the `docs-search-v2` experiment - in the `search-v2-active` group, `cmd+k` opens the new search instead of the legacy command menu, so readers lose ask ai - a search with no results stops at "No results found." and gives no next step ## Solution - adds an ask ai panel and a `cmd+i` shortcut to search v2, so the `search-v2-active` group can ask supabase ai - adds ask ai entries to the top nav, the results footer and empty results, so readers can ask from search - changes search and ask ai to use one dialog for the page, so two dialogs never open together - adds `renderNoResults` and `renderFooterStart` slots to the `docs-search` panel, so the package has no ask ai code - nit: adds a `keycaps` variant to `KeyboardShortcut` with a design-system example, and uses it in the search trigger and footers | state | preview | | -------|------| | after | <video src="https://github.com/user-attachments/assets/6681fcba-6267-4ee1-b9e0-154b5f45091d" /> | <!-- ## Preview links If relevant, include links to changed pages for easy review access. Copy the preview base URL from the Vercel bot comment on this PR. Use the following table as an example template. | Site | Live | Preview | Search for | | -------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ----------------------------- | | WWW | [/blog/your-post](https://supabase.com/blog/your-post) | [/blog/your-post](https://zone-www-dot-com-git-branch-name-supabase.vercel.app/blog/your-post) | unique phrase from the change | | Docs | [/docs/guides/your-page](https://supabase.com/docs/guides/your-page) | [/docs/guides/your-page](https://docs-git-branch-name-supabase.vercel.app/docs/guides/your-page) | unique phrase from the change | | Studio | [/dashboard](https://supabase.com/dashboard) | [/dashboard](https://studio-git-branch-name-supabase.vercel.app/dashboard) | unique phrase from the change | | Design system | [/design-system](https://supabase.com/design-system) | [/design-system](https://design-system-git-branch-name-supabase.vercel.app/design-system) | unique phrase from the change | | UI library | [/library](https://supabase.com/library) | [/library](https://ui-library-git-branch-name-supabase.vercel.app/library) | unique phrase from the change | | Knowledge base | [/kb/guides/your-page](https://supabase.com/kb/guides/your-page) | [/kb/guides/your-page](https://kb-git-branch-name-supabase.vercel.app/kb/guides/your-page) | unique phrase from the change | --> <!-- ## Additional context Optionally add any other context or screenshots. --> ## Review instructions 1. open [/docs?docs-search-v2=search-v2-active](https://docs-git-antlio-feat-docs-ask-ai-supabase.vercel.app/docs?docs-search-v2=search-v2-active) 2. make sure that the top nav shows the search box and an `Ask AI` button 3. press `cmd+i` (`ctrl+i` on windows and linux), and make sure that the ask ai dialog opens with example questions 4. select an example question, and make sure that the bolt icon changes from gray to color while the answer loads 5. press `cmd+k`, and make sure that the same dialog changes to search 6. search for `zzqqxx`, select `Ask Supabase AI: zzqqxx`, and make sure that ask ai opens and sends the question 7. search for `auth`, and make sure that the results footer shows `Ask Supabase AI` and the keycap hints ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [x] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) |
||
|
|
d1dcb57bdf |
feat(www): use the shared AiTools component on www pages (#52186)
## Problem Docs guides, docs troubleshooting pages, and knowledge base guides render the shared `AiTools` component from `ui-patterns`. The marketing site renders its own copy of the same actions in `MarkdownActions`, with the same styles and links. A change to one doesn't reach the other. Resolves [DOCS-1505](https://linear.app/supabase/issue/DOCS-1505/use-the-shared-aitools-component-on-www-pages). ## Solution Blog posts, customer stories, event pages, changelog entries, and pricing render `AiTools` through a www wrapper, and `MarkdownActions` is deleted. The wrapper sends `copy_as_markdown_clicked` and `ask_ai_clicked` with each page's type, as `MarkdownActions` did. - **Prefer on Google:** blog posts show the Prefer on Google link through `AiTools`, and clicks send `preferred_source_clicked`. #52026 proposed adding the link through `MarkdownActions`. This PR adds it through `AiTools` instead, and #52026 is closed. The link's URL is a shared constant in `markdown-affordance.ts`, which the docs wrapper also uses. - **Horizontal layout:** `AiTools` has an `orientation` prop. Pricing uses it to keep the actions in a row under the hero. The design system's AI Tools page documents it. - **Headings:** `AiTools` adds an "AI tools" heading: - Blog posts style it like the sidebar's On this page label. - Pricing, customer stories, and event pages hide it visually, so they look as they do on the live site. Screen readers still announce it as the section's label. - Changelog entries give AI tools its own sidebar section, like Change type and Products. The Links section appears only when an entry links to a GitHub discussion. The changelog index keeps `ChangelogLlmMarkdownButton`. It's a split button in the header toolbar, and `AiTools` is a list of links built for sidebars. ## Preview links Compare the before and afters (since there's a lot of examples here, links are less visually busy than images in this case): | Site | Live | Preview | | ------------- | -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | | WWW | [/blog/give-your-supabase-app-its-own-mcp-server](https://supabase.com/blog/give-your-supabase-app-its-own-mcp-server) | [/blog/give-your-supabase-app-its-own-mcp-server](https://zone-www-dot-com-git-alexisa-docs-1505-supabase.vercel.app/blog/give-your-supabase-app-its-own-mcp-server) | | WWW | [/pricing](https://supabase.com/pricing) | [/pricing](https://zone-www-dot-com-git-alexisa-docs-1505-supabase.vercel.app/pricing) | | WWW | [/customers/berriai](https://supabase.com/customers/berriai) | [/customers/berriai](https://zone-www-dot-com-git-alexisa-docs-1505-supabase.vercel.app/customers/berriai) | | WWW | [/events/agency-webinar-ai-prototyping-production](https://supabase.com/events/agency-webinar-ai-prototyping-production) | [/events/agency-webinar-ai-prototyping-production](https://zone-www-dot-com-git-alexisa-docs-1505-supabase.vercel.app/events/agency-webinar-ai-prototyping-production) | | WWW | [/changelog/cbc-tls-ciphers-deprecated](https://supabase.com/changelog/cbc-tls-ciphers-deprecated) | [/changelog/cbc-tls-ciphers-deprecated](https://zone-www-dot-com-git-alexisa-docs-1505-supabase.vercel.app/changelog/cbc-tls-ciphers-deprecated) | | WWW | [/changelog/17817-pgbouncer-and-ipv4-deprecation](https://supabase.com/changelog/17817-pgbouncer-and-ipv4-deprecation) | [/changelog/17817-pgbouncer-and-ipv4-deprecation](https://zone-www-dot-com-git-alexisa-docs-1505-supabase.vercel.app/changelog/17817-pgbouncer-and-ipv4-deprecation) | | Design system | [/design-system/docs/fragments/ai-tools](https://supabase.com/design-system/docs/fragments/ai-tools) | [/design-system/docs/fragments/ai-tools](https://design-system-git-alexisa-docs-1505-supabase.vercel.app/design-system/docs/fragments/ai-tools) | ## Review instructions 1. Open each live and preview link side by side. 2. On pricing, check that the actions sit in the same row under the hero. 3. On the blog post, check that the "AI tools" heading matches the On this page label. 4. On the blog post, check that Prefer on Google appears in the sidebar and at the end of the post on mobile. 5. On both changelog entries, check that AI tools has its own sidebar section. Links appears only on the pgbouncer entry, which links to a GitHub discussion. 6. On each page, click Copy as Markdown, Ask ChatGPT, and Ask Claude. On the blog post, also click Prefer on Google. In the browser's network tab, check that each telemetry request includes the page's `pageType`. 7. On the design system page, check the Horizontal layout example. ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) |
||
|
|
4cb9115581 |
docs: remove duplicated words in shipped site content (#50586)
## Description Two duplicated-word typos in shipped content: - `apps/design-system/content/docs/components/badge.mdx:7`: "should **be be** self-evident" (rendered by the design-system docs) - `apps/www/_blog/2024-08-12-postgres-new.mdx:230`: "a number **of of** other things" (rendered blog post) ## I have read the CONTRIBUTING.md YES <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Corrected a duplicated word in the Badge component documentation. * Fixed a typo in the PGlite deep-dive blog post. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
8bcbe3dcc7 |
feat(docs): extracts code block component (#51661)
## Problem new surfaces display code blocks their own way while docs has the full implementation but it lives inside `apps/docs` ## Solution - moves the docs code block parts to `ui-patterns/CodeBlock` as separate imports - kb code blocks now show line numbers, which matches docs | state | preview | | -------|------| | before | <img width="913" height="509" alt="image" src="https://github.com/user-attachments/assets/76ff0096-433a-4b06-9eca-1d79c4940e24" /> | | after | <img width="913" height="509" alt="image" src="https://github.com/user-attachments/assets/4f5d91d9-13df-44a0-9e65-edf605773c5f" /> | <!-- ## Preview links If relevant, include links to changed pages for easy review access. Copy the preview base URL from the Vercel bot comment on this PR. Use the following table as an example template. | Site | Live | Preview | Search for | | -------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ----------------------------- | | WWW | [/blog/your-post](https://supabase.com/blog/your-post) | [/blog/your-post](https://zone-www-dot-com-git-branch-name-supabase.vercel.app/blog/your-post) | unique phrase from the change | | Docs | [/docs/guides/your-page](https://supabase.com/docs/guides/your-page) | [/docs/guides/your-page](https://docs-git-branch-name-supabase.vercel.app/docs/guides/your-page) | unique phrase from the change | | Studio | [/dashboard](https://supabase.com/dashboard) | [/dashboard](https://studio-git-branch-name-supabase.vercel.app/dashboard) | unique phrase from the change | | Design system | [/design-system](https://supabase.com/design-system) | [/design-system](https://design-system-git-branch-name-supabase.vercel.app/design-system) | unique phrase from the change | | UI library | [/library](https://supabase.com/library) | [/library](https://ui-library-git-branch-name-supabase.vercel.app/library) | unique phrase from the change | | Knowledge base | [/kb/guides/your-page](https://supabase.com/kb/guides/your-page) | [/kb/guides/your-page](https://kb-git-branch-name-supabase.vercel.app/kb/guides/your-page) | unique phrase from the change | --> <!-- ## Additional context Optionally add any other context or screenshots. --> ## Review instructions 1. visit /[docs/guides/database/tables#enabling-row-level-security ](https://docs-git-feat-shared-code-block-parts-supabase.vercel.app/docs/guides/database/tables#enabling-row-level-security)code blocks, line numbers, colors in light and dark mode, copy, and word wrap match 2. visit [/docs/guides/auth/passwords](https://docs-git-feat-shared-code-block-parts-supabase.vercel.app/docs/guides/auth/passwords) hover over a typed identifier tooltip should still show 3. visit a kb guide with code, for example [/kb/guides/migrate-from-mysql](https://kb-git-feat-shared-code-block-parts-supabase.vercel.app/kb/guides/migrate-from-mysql) 4. visit the [design system code block page](https://design-system-git-feat-shared-code-block-parts-supabase.vercel.app/design-system/docs/fragments/code-block) ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [x] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) |
||
|
|
9bd86bee93 |
feat(design-system): document shared inline code defaults (#51984)
## Problem The design system repeats inline-code styles and does not document the new shared defaults. ## Solution Import the shared styles from #51980 and document how sizing, colour, weight and wrapping work. Add examples of bare and linked code, tables, long values, Tailwind overrides and `data-code-style="plain"`. Remove repeated styles from existing examples. Highlighted code blocks keep an explicit `text-sm` size so removing inline-code classes does not enlarge them. ## Review instructions This PR changes the design-system app only. 1. Open the [Layout page](https://design-system-git-dnywh-depr-707-code-design-system-supabase.vercel.app/design-system/docs/ui-patterns/layout). Check the inline-code examples at narrow and desktop widths in both themes. 2. Check code in headings, long values, explicit size overrides and the plain display example. Code should use the default foreground colour and follow the surrounding weight unless a class overrides it. 3. Check the [chart palette example](https://design-system-git-dnywh-depr-707-code-design-system-supabase.vercel.app/design-system/docs/ui-patterns/charts). CSS variable names should remain `<code>` elements with their own display styles. | Before | After | | --- | --- | | <img width="1666" height="770" alt="CleanShot 2026-10-20 at 16 37 20@2x" src="https://github.com/user-attachments/assets/2ac87442-12a9-49ab-8e4f-f82436308567" /> | <img width="1680" height="782" alt="CleanShot 2026-10-20 at 16 36 12@2x" src="https://github.com/user-attachments/assets/b0074844-3431-4fb9-827b-c6fd0de889fe" /> | | _Layout ([live](https://supabase.com/design-system/docs/ui-patterns/layout))_ | _Layout ([preview](https://design-system-git-dnywh-depr-707-code-design-system-supabase.vercel.app/design-system/docs/ui-patterns/layout))_ | | <img width="1072" height="476" alt="CleanShot 2026-10-20 at 16 35 14@2x" src="https://github.com/user-attachments/assets/242bf850-58fa-4b29-a978-bd0e296c2e8b" /> | <img width="1072" height="484" alt="CleanShot 2026-10-20 at 16 34 47@2x" src="https://github.com/user-attachments/assets/962adef0-05b7-47ed-8fdc-5229a3a332e1" /> | | _Charts ([live](https://supabase.com/design-system/docs/ui-patterns/charts))_ | _Charts ([preview](https://design-system-git-dnywh-depr-707-code-design-system-supabase.vercel.app/design-system/docs/ui-patterns/charts)): no visual changes as `data-code-style="plain"` has been used_ | |
||
|
|
c870822992 |
docs(design-system): add AI Tools fragment page (#52047)
## Problem The AI tools sidebar section (Copy as Markdown, Ask ChatGPT, Ask Claude) appears on docs guides, docs troubleshooting pages, and knowledge base guides. #51565 moved it into `ui-patterns` as `AiTools`, so every surface renders the same component. The design system has no page for it, so teams building new surfaces such as Learn can't find it or see its options. Resolves [DOCS-1453](https://linear.app/supabase/issue/DOCS-1453/move-the-supastart-component-into-the-design-system). ## Solution The design system has an AI Tools page under Fragment Components. It covers: - **Examples:** one with every action, and one with only the required props. - **Usage:** the canonical URL that the Ask prompts use, and the fallback text that Copy as Markdown copies when the Markdown file isn't available. - **Analytics:** AI Tools sends no telemetry. Each surface sends its own events from the component's callbacks, as the docs wrapper does. - **Props:** every prop with its type and default. ## Preview links [/design-system/docs/fragments/ai-tools](https://design-system-git-alexisa-docs-1453-supabase.vercel.app/design-system/docs/fragments/ai-tools) ## Review instructions 1. Open the preview link. 2. Check that AI Tools appears under Fragment Components in the sidebar. 3. In the first example, click Copy as Markdown. The button changes to "Copied!", and the clipboard holds `# Getting started`. 4. Check that Ask ChatGPT and Ask Claude open with a prompt that includes the page URL. ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) |
||
|
|
325a5a0da7 |
fix(studio): polish extension installation dialogs (#51463)
## Problem The enable-extension dialog in #51440 needs clearer installation copy and a consistent disclosure for custom-schema guidance. On narrow screens, footer buttons touch and dialog content can scroll sideways. ## Solution Polish the dialog on top of #51440: - Explain fixed-schema requirements and hide custom-schema guidance when the extension requires a specific schema. - Share the disclosure interaction with the session-expired and API-hardening dialogs through `ui-patterns/DialogDisclosure`, documented with a live design-system example. - Fix narrow-screen overflow and add vertical spacing to shared dialog footers. - Refine inline-code styling and update the PostGIS instructions and E2E button locator. | After | | --- | | <img width="852" height="710" alt="CleanShot 2026-10-09 at 12 17 47@2x" src="https://github.com/user-attachments/assets/59f6f1e7-9884-4cdb-b678-62b7f88a8ec5" /> | | _Standard extension_ | | <img width="836" height="1092" alt="52254" src="https://github.com/user-attachments/assets/dbf53d3e-6583-4c3b-8f43-577e0723d9a7" /> | | _Standard extension expanded accordion_ | | <img width="836" height="604" alt="CleanShot 2026-10-09 at 12 20 04@2x" src="https://github.com/user-attachments/assets/c8e3961f-2683-440c-a2a2-48ccd53c4a17" /> | | _Extension with fixed schema_ | ## Review instructions 1. Open `/project/<ref>/database/extensions`. Turn on the toggle for a disabled `postgres_fdw` extension. Expand **Install in a different schema** and check its hover, keyboard focus and full-width click target. Repeat with `pg_cron` or `pgmq`: the intro must say **must**, and custom-schema guidance must be absent. Cancel without enabling. 2. At 320 px and 375 px, check the extension dialog's alignment, inline-code rendering, wrapped SQL and stacked **Enable** / **Cancel** spacing. Confirm the page does not scroll sideways. 3. On a platform project with the Data API enabled, open `/project/<ref>/integrations/data_api/settings`. Under **Harden Data API**, click **Harden Data API**. Expand both sections and check the same trigger behaviour. Confirm completed sections still show their check icons. Close without applying either action. 4. The session-expired dialog has no direct route. It is rendered by `apps/studio/hooks/misc/withAuth.tsx` after authentication loading exceeds 10 seconds. For repeatable local review, temporarily pass `visible={true}` to its `SessionTimeoutModal` callsite, then open `/projects`. Expand **Having trouble?** by clicking the text or chevron and using Enter / Space. Check the help text and controls. Close the dialog without signing out or clearing site data, then undo the temporary prop change. 5. In the design system, open [`/docs/components/dialog#optional-details`](https://design-system-git-dnywh-choreextension-dialog-polish-supabase.vercel.app/design-system/docs/components/dialog#optional-details). Click **Export results**, then expand **What’s included** with the mouse and keyboard. The demo imports the same `ui-patterns/DialogDisclosure` used by Studio. 6. Open another dialog and an alert dialog at a narrow width. Check the shared 8 px gap between stacked footer buttons. Review inline-code examples on `/docs/components/typography` for the shared styling change. |
||
|
|
d95ff5bda9 |
docs(design-system): rewrite sidebar page for monorepo tokens (#51165)
## Problem The design-system Sidebar page was mostly an upstream shadcn paste: first-person voice, a broken `/blocks` link, missing structure images, CLI install steps that do not match this monorepo, and a long changelog / data-fetching tutorial that do not apply here. Separately, it still taught classic shadcn **HSL channel** variables plus `hsl(var(--sidebar-*))`. In this monorepo those tokens are **full colours**. Mixing the two patterns produces invalid CSS. Related call-site cleanup: https://github.com/supabase/supabase/pull/51161 ## Solution - Rewrite the Sidebar docs as a shorter monorepo guide: import from `'ui'`, structure, theming, provider / sidebar props, menu building blocks, controlled mode, state styling. - Move Studio’s `--sidebar-*` aliases into shared `packages/ui` compat CSS so every app on the shared theme gets working `bg-sidebar` utilities. - Drop the duplicate definitions from Studio `globals.css`. Left alone on purpose: brand / destructive channel tokens and docs that correctly use `hsl(var(--brand-…))`. ## Review instructions Design-system preview: [design-system](https://design-system-git-dnywh-docssidebar-full-colour-tokens-supabase.vercel.app/) 1. [Live Sidebar docs](https://supabase.com/design-system/docs/components/sidebar) · [Preview Sidebar docs](https://design-system-git-dnywh-docssidebar-full-colour-tokens-supabase.vercel.app/design-system/docs/components/sidebar). Confirm the page is no longer the upstream essay: no broken images, no `/blocks` link, imports from `'ui'`, theming shows full-colour aliases. 2. Smoke Studio: left nav should look unchanged (same aliases, now from compat.css). 3. Optional: in DevTools, confirm `--sidebar-background` resolves to a full `oklch(...)` colour. ## Checklist - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) |
||
|
|
8204854986 |
docs(design-system): document create actions in comboboxes (#51061)
## Problem Studio lets people create an item while selecting one, but the design system does not document this pattern. ## Solution Document the create action in the Combobox guide with a focused example. The action sits below the options and leaves the current selection unchanged. Products can connect it to their own creation flow. | After | | --- | | <img width="552" height="352" alt="CleanShot 2026-09-30 at 10 57 46@2x" src="https://github.com/user-attachments/assets/69c8069c-d4f9-45e2-b3a1-6e5431e2aff9" /> | ## Review instructions 1. Open the design system Combobox page and find “[Create from list](https://design-system-git-dnywh-document-select-create-action-supabase.vercel.app/design-system/docs/components/combobox#create-from-list)”. 2. Select a bucket, then choose “New bucket”. Because it’s just an example, the selector closes without replacing the selected bucket. ## Checklist - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a combobox example with a separate “New bucket” action. Choosing it closes the menu without changing the current selection; choosing an existing bucket updates the selection. * Added documentation showing how to use this create-action pattern, including guidance on labeling and positioning the action. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
93a032c90d |
Design System: Improve icon button example accessibility (#50783)
## Problem The Icon only button example lacks some accessibility features: - no `aria-label` for screen readers - no tooltip for sighted users ## Solution Add both with comments explaining the reasons ## Review instructions See https://design-system-imfc534k0-supabase.vercel.app/design-system/docs/components/button#only-an-icon <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Clarified icon-only button guidance: use a tooltip for sighted users and an accessible label for screen readers. When the tooltip repeats the button’s label, prevent it from being announced twice. * Added guidance to use a square button container and increase the tap target by 8px. Updated the icon-button example to demonstrate a “View logs” tooltip and accessible labeling. * **New Features** * Icon-only buttons now use a compact square layout with an expanded tap target. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com> |
||
|
|
9a03f3cd9c |
fix(studio): show keyboard focus on filter bar (#50827)
## Problem - Filter fields could not be re-entered with Tab, and remove buttons were previously skipped. - Earlier focus rings flashed or crowded controls. Segmented filters and design system examples also had uneven layout. ## Solution - Tab now reaches each filter’s property, operator, value and remove button. Editable fields use the caret; read-only values and remove buttons keep a visible focus cue. - Refined spacing and sizing. The segmented highlight is inset and clears when focus enters a control. Both variants and the focus guidance are documented on the [design system page](https://design-system-git-dnywh-fix-filter-bar-focus-supabase.vercel.app/design-system/docs/fragments/filter-bar). |After | | --- | | <img width="462" height="126" alt="CleanShot 2026-09-24 at 15 04 23@2x" src="https://github.com/user-attachments/assets/2ee8bee2-f4fa-40f4-ada5-67bfe32384e7" /> | | <img width="362" height="96" alt="CleanShot 2026-09-24 at 15 04 47@2x" src="https://github.com/user-attachments/assets/9f42054a-f432-493d-b417-f10892676c96" /> | ## Review instructions The easiest way to test this is to open Table Editor on both production/staging and on this PR’s [deploy preview](https://studio-staging-git-dnywh-fix-filter-bar-focus-supabase.vercel.app/). Try navigating by keyboard (tab, left/right arrow) within the Filter Bar. Compare the two. - In Studio’s Table Editor or the [design system example](https://design-system-git-dnywh-fix-filter-bar-focus-supabase.vercel.app/design-system/docs/fragments/filter-bar), add a filter. Tab through its property, operator, value and remove button, then Shift+Tab back into editing. - Check that the segmented and pill examples fill their preview width and that focus cues do not collide with neighbouring controls. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary * **New Features** * Added a pill appearance for the Filter Bar, with usage guidance and interactive examples for pill and segmented presentations. * **Accessibility** * Improved keyboard navigation through filter controls, including removing a filter with the keyboard. * Clarified that an editable text field’s insertion caret can serve as its visible focus indicator; read-only fields and controls without a caret still need another visible indicator. * **Style** * Refined Filter Bar spacing and focus styling across appearances. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
0e6fff6760 |
feat(design-system): segmented controls (#50738)
## Problem We don't have any one defined way of displaying segmented controls. This PR looks at unifying and using underlying primtives to put something together. Open to comment. ## Solution Improves upon the shadcn toggle group, which has a specific use case. ## Review instructions Run the design system and find "Segmented Controls" in the Fragment Components. Test [here](https://design-system-git-feat-button-group-component-draft-supabase.vercel.app/design-system/docs/components/toggle-group#segmented). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary * **New Features** * Added segmented toggle groups with default, text, outline, and primary tones. * Single-select groups display a sliding selection indicator; multi-select groups highlight selected items individually. * Groups can keep the selected option active; deselection is enabled by default. * Added examples for tone variations and a status filter. * **Documentation** * Updated segmented-control guidance and props tables, including usage recommendations, accessibility labeling, and filter options. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Gildas Garcia <1122076+djhi@users.noreply.github.com> |
||
|
|
3ec44e54d2 |
fix(ui): restore grouped textarea top padding (#50843)
## Problem - Grouped textareas render text too close to the top border. The standalone `Textarea` retains its normal top padding. - `InputGroupTextarea` has overridden the inner textarea with `py-0` since #44282 on 31 March 2026. The group initially supplied `py-2`; #44387 removed that outer padding later the same day, leaving no top spacing. The override was retained during the border and surface updates in #44690 and #48887. - The textarea component page had no grouped textarea example, so this difference was easy to miss. ## Solution - Give the grouped textarea `pt-2` while retaining `pb-0` for block-end addons. The outer group continues to own its border and focus styles. - Add a “With addon” example to the textarea component page to keep this composition visible. ## Review instructions - Open `/design-system/docs/components/textarea` and find “With addon”. Confirm its text has the same top inset as the default textarea and the block-end addon remains below the input. - Open `/design-system/docs/ui-patterns/forms` and find “Textarea Multi-line text input for longer content with addon”. Confirm the text has the same top inset as the standalone textarea example immediately above it. ## Checklist - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a textarea example with a supporting addon below the text field, showing a 120-character limit. * **Bug Fixes** * Clicking a block-end addon now focuses its textarea as well as an input. * **Documentation** * Added the textarea-with-addon example to the textarea component documentation. * **Style** * Added top padding to textareas within input groups while keeping bottom padding unchanged, adjusting spacing above entered text. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
d067e81a69 |
fix(ui): align primary colours across text, buttons, and controls (#50697)
## Problem Primary colour serves readable text and selected controls, but those uses need different shades. Light mode needs darker text, while dark mode needs a deeper button fill. Fixed brand green on interactive chrome also prevents a custom primary hue from carrying through the interface. Some slider tracks and selected text are hard to read. ## Solution - Keep `--primary` for accessible text and small selected indicators. Use `--primary-solid` for button fills, which need a deeper shade in dark mode. - Add `--primary-bright` for focus rings, selected control chrome, chart accents, and other interactive highlights. It follows `--primary-hue`; `brand-*` stays fixed for Supabase identity. - Make slider troughs clearer and text selection translucent with theme foreground text. - Document the split in the design-system colour guide. | Before | After | | --- | --- | | <img width="980" height="244" alt="Before: light mode primary controls" src="https://github.com/user-attachments/assets/dfae325d-0dfe-4231-8bcd-3f89c4b9d793" /> | <img width="982" height="204" alt="After: light mode primary controls" src="https://github.com/user-attachments/assets/5fdcb531-a6e3-4549-8a13-9d9a5ebe6e20" /> | | <img width="610" height="120" alt="Before: slider track" src="https://github.com/user-attachments/assets/04f768e0-51e8-4d06-9b97-c52f4a34f122" /> | <img width="622" height="126" alt="After: slider track" src="https://github.com/user-attachments/assets/95127f4e-13dc-4f0f-b63c-cf5d70a28b42" /> | | <img width="652" height="512" alt="Before: dark mode controls" src="https://github.com/user-attachments/assets/3f88de66-90cc-40ee-8cf1-b5f4eb87b09a" /> | <img width="658" height="498" alt="After: dark mode controls" src="https://github.com/user-attachments/assets/906bec30-6ca1-4614-9fb3-6cf5e5feec22" /> | ## Review instructions 1. Compare light and dark mode in the [colour usage guide](https://design-system-git-dnywh-fix-bright-brand-chrome-supabase.vercel.app/design-system/docs/color-usage#primary-and-brand-colors). Check primary ink, primary-solid, primary-bright, and fixed brand swatches. 2. In Studio, open the ‘new table’ sheet in [Table Editor](https://studio-staging-git-dnywh-fix-bright-brand-chrome-supabase.vercel.app/dashboard/project/_/editor). Tab through the new table sheet's fields and toggles. Check the focus rings, selected controls, and the sheet's edges in both themes. You do not need to save a table. 3. Select text in Studio in both themes, including a link or primary-coloured label. The selection and text should remain legible. 4. Check the [Field](https://design-system-git-dnywh-fix-bright-brand-chrome-supabase.vercel.app/design-system/docs/components/field) Price Range slider: the unused track should remain visible in both themes. The selected field card border should follow primary-bright. 5. Check the [Button](https://design-system-git-dnywh-fix-bright-brand-chrome-supabase.vercel.app/design-system/docs/components/button) and [Radio Group](https://design-system-git-dnywh-fix-bright-brand-chrome-supabase.vercel.app/design-system/docs/components/radio-group) previews. In dark mode, `primary` button fill should be deeper than primary [text](https://design-system-git-dnywh-fix-bright-brand-chrome-supabase.vercel.app/design-system/docs/color-usage#text); selected radios should remain readable. |
||
|
|
76c4f2b739 |
feat(studio): add time range to project logs filter bar (#50685)
<img width="1079" height="566" alt="image" src="https://github.com/user-attachments/assets/b6f360e9-dfcf-4717-86db-1fc9acc4ae6a" /> ## Problem Project logs only exposed time-range selection through the sidebar. ## Solution Add a Time range property to the filter bar using the sidebar’s picker, preset labels, and date formatting. Keep it synchronized with the sidebar and timeline, including retention checks. ## Review instructions 1. Open Project Logs and select **Time range** in the filter bar. Choose a preset and confirm the sidebar and logs update. 2. Select a custom range and confirm its label matches the sidebar’s date formatting. 3. Change the range in the sidebar or timeline and confirm the filter bar updates. Remove the time-range pill and confirm the range resets without removing other filters. 4. Select a range beyond the plan’s log retention and confirm the upgrade prompt appears. Validation: 67 focused tests passed, Studio typecheck passed, and changed Studio files passed lint. ## Checklist - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] Docs authoring skills (not applicable: no docs-site topic changes) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added human-readable filter value labels while preserving the underlying selections. * Added dedicated log time-range filters with preset and custom ranges. * Added inline date-range picker support for flexible layouts. * Added controls to show or hide filter properties based on availability. * Added consistent date-range formatting and custom range support. * **Bug Fixes** * Invalid or incomplete time-range filters are no longer applied. * Time-range filters remain separate from standard column filters. * Clipboard interactions are limited to the popover date-picker variant. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com> |
||
|
|
cd77bebafd |
chore(ui): refresh shared button styles (#50197)
## What kind of change does this PR introduce? UI polish / design system: refreshed button styles, related token tweaks, and a shared floating-button plate. Resolves DEPR-652. ## What is the current behavior? Default, primary, and secondary buttons use older fills, borders, and hover treatments. Primary still leans on brand scale utilities. Default fills don’t always read as raised chrome across surfaces, and floating copy / expand / scroll controls can let busy content show through translucent fills. Call sites hand-roll `rounded-* bg-background` wrappers for that. ## What is the new behavior? Refreshes primary, default, and secondary buttons with medium-weight labels, subtle shadows and inset edges, and smoother transitions. Light-mode default buttons use a raised fill with an accent hover state, primary text is brighter, and inline keyboard shortcuts inherit the button’s colour. Adds `FloatingPlate`: an opaque `bg-popover` shell for floating default buttons (and small clusters). Migrates Studio, Docs-related patterns, www, and `ui-patterns` floaters onto it so busy content no longer shows through translucent fills. Positioning, z-index, and hover/focus reveal stay on the plate’s `className`. Use `rounded="full"` for pills. Also: - Moves primary onto semantic `--primary` / `--primary-hover` (with a light-theme override) instead of brand utility fills - Tokenises button shadows as `--button-shadow-drop` / `--button-shadow-raised` / `--button-shadow-default` on the Button base - Aligns hover direction: darken on light mode, lighten on dark mode for both default and primary - Default fill stays opaque `bg-card` in light (occlusion) and translucent `bg-muted` in dark (adapts to the local surface) - Documents fills and `FloatingPlate` on the design-system Button page (with a live example) - Scales shared radius tokens in Studio and www; medium+ Button sizes use a proportionally softer radius - Fixes www nav CTA centering (`lg:inline-flex` instead of `lg:block`) - Query detail Expand/Collapse wires `aria-expanded` / `aria-controls` | Before | After | | --- | --- | | <img width="1074" height="438" alt="CleanShot 2026-09-18 at 15 52 51@2x" src="https://github.com/user-attachments/assets/ef43da21-b053-4b7e-9ac4-ab8b428228ab" /> | <img width="1090" height="464" alt="CleanShot 2026-09-18 at 15 50 59@2x" src="https://github.com/user-attachments/assets/2ddc55fc-4c8d-499c-a280-f3db3d99023c" /> | | <img width="1082" height="446" alt="CleanShot 2026-09-18 at 15 52 35@2x" src="https://github.com/user-attachments/assets/3dd5452d-325a-4e4a-a79d-26c6c6950a31" /> | <img width="1078" height="446" alt="CleanShot 2026-09-18 at 15 51 13@2x" src="https://github.com/user-attachments/assets/93666385-3e6e-42e0-9891-9cd6bb935b67" /> | ## To test ### Design system - [Button page](https://design-system-git-chore-button-styles-supabase.vercel.app/design-system/docs/components/button): default / primary in light and dark; hover should darken on light, lighten on dark - Same page: [Floating over content](https://design-system-git-chore-button-styles-supabase.vercel.app/design-system/docs/components/button#floating-over-content) / [Floating plate](https://design-system-git-chore-button-styles-supabase.vercel.app/design-system/docs/components/button#floating-plate) example; Copy over SQL should stay opaque - Spot-check hover on a code preview Copy control ### Docs [Docs deploy preview](https://docs-git-chore-button-styles-supabase.vercel.app/docs): - [Docs homepage](https://docs-git-chore-button-styles-supabase.vercel.app/docs): top-right **Sign up** / **Dashboard** primary; menu icon beside it (default icon button) - Shrink below `lg` and open the hamburger drawer: bottom **Sign in** (default) + **Start your project** (primary) medium block buttons - Tab once for **Skip to content** (FloatingPlate) - [MCP guide](https://docs-git-chore-button-styles-supabase.vercel.app/docs/guides/ai-tools/mcp): project picker - [Apple login](https://docs-git-chore-button-styles-supabase.vercel.app/docs/guides/auth/social-login/auth-apple): **Generate Secret Key** button in the Apple Secret Generator - Optional opacity check: any guide code block Copy control (e.g. at the bottom of [Import data into Supabase](https://docs-git-chore-button-styles-supabase.vercel.app/docs/guides/database/import-data)) ### Studio [Studio deploy preview](https://studio-staging-git-chore-button-styles-supabase.vercel.app/): - **Observability → Query Performance**: open a query detail → Expand/Collapse pill + SQL Copy chip (dark: no bleed-through) - **Observability → Query Insights**: select a query → Clear query pill - **Table Editor → any table → Definition** → floating **Open in SQL Editor** - **Connect → Framework → Add files**: Copy on the code tabs (FloatingPlate; light hover follow-up is DEPR-694) - Tab once for **Skip to content** ### WWW - [www deploy preview](https://zone-www-dot-com-git-chore-button-styles-supabase.vercel.app/): nav Sign in / Start your project vertical centering; hero medium CTAs radius --------- Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com> |
||
|
|
ec53175b8a |
refactor(ui): rename text-brand to text-primary (#50564)
## What kind of change does this PR introduce? Refactor. Follow-up to #49871. ## What is the current behavior? Branded (green) text still uses the `text-brand` classname while the colour comes from `--primary`. ## What is the new behavior? **Rename-only:** `text-brand` → `text-primary` across callsites and docs. Leftover `bg-brand` / `border-brand` alias to `brand-default`. No intentional colour changes in this PR. This better matches how we treat our green in other components and props, like `variant="primary"` for green buttons. ## To test On light mode: smoke-test that branded text still looks like #49871 (readable green, not the bright fill). - [Homepage](https://zone-www-dot-com-git-dnywh-depr-316-text-brand-de2380-supabase.vercel.app/): “Scale to millions” uses `text-primary` - [Docs homepage](https://docs-git-dnywh-depr-316-text-brand-to-primary-supabase.vercel.app/docs): branded links like “More on self-hosting” are still readable - [Typography docs](https://design-system-git-dnywh-depr-316-text-brand-to-primary-supabase.vercel.app/design-system/docs/typography): documents `text-primary` - [Colour usage](https://design-system-git-dnywh-depr-316-text-brand-to-primary-supabase.vercel.app/design-system/docs/color-usage): `text-primary` is visibly darker than `bg-brand-default` _on light mode_ - [Studio auth providers](https://studio-staging-git-dnywh-depr-316-text-brand-to-60fa6c-supabase.vercel.app/dashboard/project/_/auth/providers): enabled provider badge text readable; status dot stays bright green <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** * Updated branded text, link hover states, icons, badges, indicators, and highlighted content across the Design System, Docs, Studio, Learn, UI Library, and marketing experiences to use the primary theme color. * Updated syntax highlighting and table-of-contents styling for consistent primary-color presentation. * Refined brand color fallback behavior for bright fills and borders. * **Documentation** * Updated color-usage and typography guidance to recommend the primary text utility. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
a31ca2bad0 |
fix(ui): make brand text readable across themes (#49871)
## What kind of change does this PR introduce? Bug fix and design-system update. Resolves DEPR-316. Follow-up rename (`text-brand` → `text-primary`) is in a dedicated PR (https://github.com/supabase/supabase/pull/50564) stacked on this one. ## What is the current behavior? `text-brand` resolves to the canonical bright brand green in places that need readable text, which fails WCAG AA on light surfaces. A separate `text-brand-display` token adds another green for large type. ## What is the new behavior? - `text-brand` maps to accessible `--primary` (light mode darkened to meet ~4.5:1 AA) - `--hue` / `--primary-hue` aligned to 157.5 - `text-brand-display` removed; former display callsites use `text-brand` - Bright fills/borders stay on `brand-default` - Design-system colour and typography docs updated | Before | After | | --- | --- | | <img width="514" height="112" alt="CleanShot 2026-09-02 at 11 13 09@2x" src="https://github.com/user-attachments/assets/4e0138a9-a32d-4e4c-a426-90736706e1e7" /> | <img width="512" height="138" alt="CleanShot 2026-09-21 at 11 42 05@2x" src="https://github.com/user-attachments/assets/164cc5b1-a0c5-4e93-95f1-80016641a114" /> | | <img width="864" height="266" alt="CleanShot 2026-09-02 at 11 13 53@2x" src="https://github.com/user-attachments/assets/3c1ca53f-bf9e-431e-bc15-816b4a275b8e" /> | <img width="882" height="248" alt="CleanShot 2026-09-21 at 11 41 37@2x" src="https://github.com/user-attachments/assets/24828e7b-ed6b-44cb-b9dc-becc3398bdfc" /> | | <img width="782" height="692" alt="CleanShot 2026-09-02 at 11 16 30@2x" src="https://github.com/user-attachments/assets/fc871977-77bc-47fb-9e0e-9284e0ecd5cc" /> | <img width="730" height="690" alt="CleanShot 2026-09-21 at 11 42 52@2x" src="https://github.com/user-attachments/assets/bf479515-d5f9-471e-b82d-f097c0f4b56c" /> | | <img width="480" height="306" alt="CleanShot 2026-09-02 at 11 18 53@2x" src="https://github.com/user-attachments/assets/03f341f4-f02e-44f8-a2b2-8c31670d0427" /> | <img width="470" height="300" alt="CleanShot 2026-09-21 at 11 43 19@2x" src="https://github.com/user-attachments/assets/9df18217-d5e6-48b8-ba0b-579d2664b94b" /> | | <img width="960" height="300" alt="CleanShot 2026-09-02 at 11 32 04@2x" src="https://github.com/user-attachments/assets/6b1d9373-7a71-4247-81ff-26441604b09d" /> | <img width="980" height="306" alt="CleanShot 2026-09-21 at 11 44 13@2x" src="https://github.com/user-attachments/assets/41ad4784-02ec-4b29-b860-32af9fa79aa8" /> | | <img width="924" height="214" alt="CleanShot 2026-09-02 at 11 34 44@2x" src="https://github.com/user-attachments/assets/1de661fe-c7b6-499b-a94f-e4737436ec79" /> | <img width="752" height="162" alt="CleanShot 2026-09-21 at 11 44 56@2x" src="https://github.com/user-attachments/assets/1811890f-0660-4445-84e9-447720954fa1" /> | ## To test Test each callsite **in light mode** (dark mode is largely unchanged). ### WWW - [Homepage](https://zone-www-dot-com-git-dnywh-depr-316-brand-text-tokens-supabase.vercel.app/): “Scale to millions” uses readable brand text (display token is gone) - [Careers](https://zone-www-dot-com-git-dnywh-depr-316-brand-text-tokens-supabase.vercel.app/careers): small “Careers” eyebrow readable; green dividers stay bright `brand-default` - [Contact](https://zone-www-dot-com-git-dnywh-depr-316-brand-text-tokens-supabase.vercel.app/contact-us): email / policy links use readable brand text - [Regions](https://zone-www-dot-com-git-dnywh-depr-316-brand-text-tokens-supabase.vercel.app/regions): “Ask about early access to BYOC” readable ### Docs - [Docs homepage](https://docs-git-dnywh-depr-316-brand-text-tokens-supabase.vercel.app/docs): “DOCS” wordmark and resource links readable - [Database overview](https://docs-git-dnywh-depr-316-brand-text-tokens-supabase.vercel.app/docs/guides/database/overview): nav / footer brand links readable - [JavaScript reference](https://docs-git-dnywh-depr-316-brand-text-tokens-supabase.vercel.app/docs/reference/javascript/introduction): active sidebar treatment readable ### Design system - [Typography](https://design-system-git-dnywh-depr-316-brand-text-tokens-supabase.vercel.app/docs/typography): documents `text-brand` only (no display) - [Colour usage](https://design-system-git-dnywh-depr-316-brand-text-tokens-supabase.vercel.app/docs/color-usage): `text-brand` vs `bg-brand-default` - [Design-system homepage](https://design-system-git-dnywh-depr-316-brand-text-tokens-supabase.vercel.app/): brand text examples across themes ### Studio - [Auth providers](https://studio-staging-git-dnywh-depr-316-brand-text-tokens-supabase.vercel.app/dashboard/project/_/auth/providers): enabled provider badge text readable; status dot stays bright - [Database policies](https://studio-staging-git-dnywh-depr-316-brand-text-tokens-supabase.vercel.app/dashboard/project/_/database/policies?new=true): template hover text more legible - [Database connections](https://studio-staging-git-dnywh-depr-316-brand-text-tokens-supabase.vercel.app/dashboard/project/_/observability/connections): “Live” status readable; animated dot stays bright green --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com> |
||
|
|
512201dcd0 |
chore(ui): remove the Classic Dark theme (#50387)
## What kind of change does this PR introduce? Chore. ## What is the current behaviour? Classic Dark remains available across the shared theme library and several apps. Studio now supports System, Dark, and Light as its theme modes, but still carries compatibility paths for Classic Dark. ## What is the new behaviour? - Removes Classic Dark from shared theme options, application commands, stylesheets, previews, examples, and replay handling. - Deletes the Classic Dark and faux Classic Dark stylesheets. - Removes the now-unused Classic Dark branches from Studio theme colour controls. - Migrates `classic-dark` to `dark` so first rendered frame renders Dark (not Light) | After | | --- | | <img width="1458" height="1778" alt="CleanShot 2026-09-18 at 11 07 40@2x" src="https://github.com/user-attachments/assets/679bf87f-a3c1-4599-ad2f-292d98d0b856" /> | ## To test 1. In Studio, open Account Preferences → Appearance. Confirm the available themes are System, Dark, and Light, and that theme colour controls still work in each resolved mode. 2. Set the `theme` local storage value to `classic-dark`, then reload Studio. Confirm it renders as Dark immediately and the stored value becomes `dark`. 3. Open the theme switcher in Design System, Learn, and UI Library. Confirm Classic Dark is no longer available and Light, Dark, and System still apply correctly. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Changes** * Removed the Classic Dark theme option from theme menus and settings across the application. * Classic Dark selections are automatically migrated to the standard Dark theme. * Updated theme documentation and demonstrations to list only System, Light, and Dark. * Removed Classic Dark styling and preview support; existing Dark, Light, and System themes remain available. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
7fce0a12d9 |
feat(design-system): first pass at db report chart colours (#46787)
## 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? This is a first draft at introducing semantic colours to our Observability charts. This moves away from just random colours being assigned to prop after prop. They're only scoped to the Database reports right now, but if it flows nice, we can open it up to the other reports too. This also aims to tone down some of the harsher colours in our charts, such as the orange which sometimes can look like a warning metric/prop. | Before | After | |--------|--------| | <img width="839" height="336" alt="Screenshot 2026-06-10 at 09 14 56" src="https://github.com/user-attachments/assets/222747c5-973b-4165-aa53-df7b93412ad3" /> | <img width="950" height="341" alt="Screenshot 2026-09-14 at 18 14 47" src="https://github.com/user-attachments/assets/836f3ddd-4a97-4064-b8cf-3a3b435417ac" /> | cc @supabase/design for additional thoughts. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added semantic chart color roles with light and dark theme variants for consistent visualizations. * Standardized colors and fills across database, networking, storage, and connection charts. * Maximum-value lines now use configured chart colors when available. * Added chart palette reference and stress-test examples. * Added stacked bar charts, customizable margins, and gradient-filled line charts. * Improved multi-series bar chart focus and date-range footer alignment. * **Documentation** * Documented the chart palette, theme variants, accessibility guidance, and usage recommendations. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Gildas Garcia <1122076+djhi@users.noreply.github.com> |
||
|
|
7e9c483625 |
feat(ui): support bounded MultiSelector wrapping (#50439)
## What kind of change does this PR introduce?
UI component enhancement and Design System documentation update.
## What is the current behavior?
`MultiSelectorTrigger` can either limit the number of visible badges or
wrap every selected badge. Consumers cannot combine a numeric limit with
wrapping.
## What is the new behavior?
Adds `wrapBadges` so consumers can combine it with a numeric
`badgeLimit`. For example, `badgeLimit={3} wrapBadges` renders up to
three wrapped badges followed by the remaining `+n` count.
Existing `badgeLimit=\"wrap\"` behaviour remains supported.
## To test
1. Open the Design System Multi Select page.
2. Find the **Wrapped badge limit** example.
3. Confirm three selected fruit badges wrap within the trigger and the
remaining selections appear as `+2`.
4. Remove or add selections and confirm the visible badges and remaining
count update together.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Added a `wrapBadges` option to multi-select triggers, allowing
selected badges to wrap across multiple lines while retaining a numeric
badge limit.
- Numeric limits now show the specified badges and an overflow count for
additional selections.
- Updated the example with controls for adjusting the badge limit.
- **Documentation**
- Clarified multi-select badge limit and wrapping behavior.
- **Tests**
- Added coverage for badge limits, wrapping, visible selections, and
overflow counts.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
||
|
|
e57aae3c83 |
feat(design-system): document disabled controls and add focusableWhenDisabled (#50068)
## What kind of change does this PR introduce? Docs update, with supporting `ui` and Studio changes. ## What is the current behaviour? Disabled buttons with tooltips use native `disabled`, which removes them from the tab order. Keyboard users cannot focus the control or read the tooltip explaining why an action is blocked. The design system also lacked guidance on keeping disabled actions discoverable and explaining why they are unavailable. ## What is the new behaviour? - Adds a **Disabled controls** section to the accessibility docs, with live examples for a focusable disabled button and visible page-level context - Adds `focusableWhenDisabled` to `Button`, keeping `disabled` as the semantic state while using `aria-disabled`, retaining keyboard focus, and guarding click handlers - Updates Studio's `ButtonTooltip` to make disabled buttons with tooltip text focusable automatically Also includes earlier design-system fixes on this branch: - Centralises `BASE_PATH` with a `/design-system` fallback so asset URLs work without a local `.env` file - Fixes sidebar hover and active tokens in design-system and ui-library, aligned with Studio's `InnerSideMenuItem` ## To test **Design system** 1. Open the [accessibility preview](https://design-system-git-fix-design-system-docs-and-nav-fixes-supabase.vercel.app/design-system/docs/accessibility) 2. Scroll to **Disabled controls** 3. Tab to the **disabled-focusable** example. Confirm the button remains focusable, looks disabled, and shows its tooltip on focus 4. Confirm the **disabled-unavailable-with-notice** example shows the admonition and focusable disabled button pattern **Studio (optional, requires a High Availability project)** 5. Go to Settings → General → **Pause project**. Tab to the button and confirm it remains focusable, looks disabled, and shows the HA tooltip on focus 6. Go to Database → Backups and find **Restore** on a scheduled backup row. Confirm the same behaviour |
||
|
|
1131e3e2ce |
fix(ui): default Button variant to default instead of primary (#50160)
## What kind of change does this PR introduce? Bug fix / design-system alignment for the legacy `Button` from `ui`. ## What is the current behavior? Omitting `variant` on the legacy `Button` falls back to brand-green `primary`. That makes accidental greens easy, and it is hard to spot the real main action on busy pages. ## What is the new behavior? - Legacy `Button` now defaults to neutral `default` - Intentional primary CTAs (create, save, submit, marketing CTAs, and matching `ButtonTooltip` usages) now set `variant="primary"` so their appearance is unchanged - Neutral actions that previously relied on the old fallback (cancel, close, back, dashboard nav, and similar) become grey/white - Design-system docs updated; regression tests cover the new default `Button_Shadcn_` is unchanged. It already uses its own CVA default. This is PR 1 of 2 in a stack. PR 2 drops now-redundant `variant="default"` props. ## To test Studio (http://localhost:8082): - `/sign-in`: Sign in stays green - Open a project → Database → Tables: New table stays green - Auth → Users → Invite: Invite user stays green; Cancel / dismiss controls stay neutral - Project Settings → General: edit a field so Cancel and Save appear. Cancel is neutral, Save is green Design system (http://localhost:3003): - Components → Button: default demo is neutral; primary demo is green; featured preview is the default variant Marketing (optional): - www header: Start your project stays green; logged-in Dashboard is neutral <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Style** - Buttons now default to a neutral style, while primary actions across Studio, documentation, marketing pages, forms, dialogs, and error states use prominent primary styling. - Updated button examples and previews clarify the distinction between default and primary variants. - Event registration now includes a directional arrow icon. - **Tests** - Added coverage confirming default button styling and explicit primary styling behave as expected. - Updated related test fixtures to use primary styling where appropriate. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
bfe07a5937 |
fix(ui-patterns): stabilise multi-select trigger height (#50163)
## What kind of change does this PR introduce?
Bug fix and design-system documentation update.
## What is the current behaviour?
Multi-select examples inconsistently hide the default trigger icon,
which makes the component default difficult to understand from the
design-system page.
The empty trigger label and selected badges also use different content
heights. Selecting or removing the first item causes the default 34px
trigger to grow or shrink slightly.
## What is the new behaviour?
- Shows the default trigger icon in every existing multi-select example
- Adds a dedicated **Without trigger icon** example for
`showIcon={false}`
- Normalises the label and badge content rows to 20px so the default
trigger remains 34px when the first item is selected or removed
- Adds regression coverage for the default trigger height classes
This follows the 34px trigger sizing introduced in
[#48696](https://github.com/supabase/supabase/pull/48696).
## To test
1. Open [Design System > Fragment Components > Multi
Select](https://design-system-git-dnywh-fixmulti-select-icon-ex-772e13-supabase.vercel.app/design-system/docs/fragments/multi-select).
2. Confirm every existing example shows the default trigger icon.
3. Confirm the new **Without trigger icon** example is the only example
without it.
4. In the first example, select and remove the first fruit. The trigger
should remain the same height throughout.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added a multi-select example that hides the trigger icon.
* Added documentation and a preview for using multi-select without a
trigger icon.
* **Bug Fixes**
* Improved multi-select badge and label alignment.
* Preserved consistent trigger height when selecting the first item.
* Updated examples to display the trigger icon by default.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
||
|
|
6a4cbefbcf |
feat(ui): align combobox trigger with select styling (#49665)
## What kind of change does this PR introduce? Bug fix and shared UI primitive. ## What is the current behaviour? In **Database > Replication > Add destination**, the searchable **Publication** field uses a double chevron and button styling. It looks inconsistent beside the **Initial sync** select, which uses a single chevron and the standard select surface. The shared multi-select trigger uses the same inconsistent double chevron. These differences are easy to repeat because searchable comboboxes do not have a dedicated trigger that shares the select styling. ## What is the new behaviour? - Adds `ComboboxTrigger` with the same shared styling as `SelectTrigger` - Uses a fixed single down chevron so combobox and select triggers cannot drift - Migrates the Studio **Database > Replication > Add destination > Publication** field to `ComboboxTrigger` - Updates `MultiSelectorTrigger` to replace `ChevronsUpDown` with the same fixed `ChevronDown`, including **Connect > MCP > Feature groups** in Studio - Updates the canonical design-system combobox examples - Leaves `Button` unchanged, so adopting combobox styling is explicit | Before | After | | --- | --- | | <img width="1256" height="448" alt="CleanShot 2026-09-09 at 10 21 32@2x" src="https://github.com/user-attachments/assets/bb7a6056-0b4e-4cb4-8dce-e92fa4f5afe7" /> | <img width="1256" height="448" alt="CleanShot 2026-09-09 at 10 21 11@2x" src="https://github.com/user-attachments/assets/860a06b9-617d-4d94-ac98-944316e9fdc3" /> | | <img width="1210" height="520" alt="CleanShot 2026-09-09 at 10 58 28@2x" src="https://github.com/user-attachments/assets/e916d3a2-6a75-40eb-965a-56e0694ba447" /> | <img width="1210" height="520" alt="CleanShot 2026-09-09 at 10 57 57@2x" src="https://github.com/user-attachments/assets/c5f1b8ff-8083-47b8-8242-59116d085c00" /> | ## Left for incremental migration These existing Studio comboboxes still use bespoke button triggers and will move to `ComboboxTrigger` in focused follow-up changes: - **Database > Backups > Point in time > Timezone** - **Authentication > Third-party auth > AWS region** - **Account > Preferences > Timezone** - Shared schema and function selectors See https://github.com/supabase/supabase/pull/50157. The organisation and project switchers in the top navigation are intentionally out of scope. They are context switchers rather than form-field comboboxes. ## To test ### Studio callsites On the [Studio preview](https://studio-staging-git-dnywh-featcombobox-trigger-supabase.vercel.app): 1. Open **Database > Replication > Add destination**. 2. Compare **Publication** with **Initial sync**. Both should use a single down chevron and the same closed-field surface, border, sizing, and hover treatment. 3. Open **Publication**, search for an option, and select it. The popover should close and the selected publication should be shown. 4. Open **Connect** from the project header, select **MCP**, and check **Feature groups**. Its multi-select trigger should use a single down chevron. ### Design system 1. Check the [combobox examples](https://design-system-git-dnywh-featcombobox-trigger-supabase.vercel.app/design-system/docs/components/combobox). 2. Check the [multi-select examples](https://design-system-git-dnywh-featcombobox-trigger-supabase.vercel.app/design-system/docs/fragments/multi-select). 3. Both trigger types should use a single down chevron. |
||
|
|
9f5b5ea6a7 |
fix(ui): standardise disclosure focus rings (#49660)
## What kind of change does this PR introduce? Bug fix and design-system accessibility update. ## What is the current behavior? Accordion and collapsible triggers do not consistently use the shared focus treatment. Accordion focus can animate from the browser outline, while call sites need to manage radius and focus geometry themselves. ## What is the new behavior? Bare accordion and collapsible triggers use the rounded `focus-inset` treatment by default, positioned 2px inside the control. Interactive children composed with `asChild`, such as a standard `Button`, retain their own focus treatment. Accordion triggers include a small default horizontal hit-area padding (`px-2`) and retain an explicit outer-ring option for standalone controls. The focus indicator is not animated. Focused tests cover the default and opt-out accordion variants. | Before | After | | --- | --- | | <img width="1792" height="384" alt="CleanShot 2026-09-07 at 15 40 23@2x" src="https://github.com/user-attachments/assets/8c8fd99a-3669-465a-a7b2-d272ec92dec7" /> | <img width="1784" height="498" alt="CleanShot 2026-09-07 at 15 39 52@2x" src="https://github.com/user-attachments/assets/7a0b7de1-a4bc-48cf-b9fc-3421618806b9" /> | | <img width="1564" height="360" alt="CleanShot 2026-09-07 at 15 35 11@2x" src="https://github.com/user-attachments/assets/34945180-e671-4dc2-981a-4c683d08f221" /> | <img width="1552" height="378" alt="CleanShot 2026-09-07 at 15 36 19@2x" src="https://github.com/user-attachments/assets/09f2c030-9ffb-4fa5-bf63-5e172326e8ef" /> | ## Visual impact Most call sites should look the same at rest. The exceptions are accordion triggers that did not already set their own horizontal padding: they pick up the new default `px-2`, `rounded-md`, and lose the old blanket `transition-all` on the trigger (chevron rotation is unchanged). | Resting layout change | Why | | --- | --- | | Accordion triggers without an explicit `px-*` | Inherit new default `px-2` and `rounded-md` | | Accordion triggers with their own `px-*` | Unchanged (call-site padding wins) | | Collapsible triggers | Focus ring only; spacing comes from the child element | | Direct `focus-inset` users (table rows, etc.) | Focus ring only | ## To test Use Tab to focus each disclosure trigger. Confirm the focus outline is rounded, sits 2px inside the trigger, and appears immediately without a dark flash. Previews: [design-system](https://design-system-git-dnywh-fixaccordion-focus-rings-supabase.vercel.app) · [studio-staging](https://studio-staging-git-dnywh-fixaccordion-focus-rings-supabase.vercel.app) · [docs](https://docs-git-dnywh-fixaccordion-focus-rings-supabase.vercel.app) · [www](https://zone-www-dot-com-git-dnywh-fixaccordion-focus-rings-supabase.vercel.app) ### Design system - [Accordion](https://design-system-git-dnywh-fixaccordion-focus-rings-supabase.vercel.app/design-system/docs/components/accordion) - [Collapsible](https://design-system-git-dnywh-fixaccordion-focus-rings-supabase.vercel.app/design-system/docs/components/collapsible) ### Studio (focus-only unless noted) - [Account → Access tokens → **New token**](https://studio-staging-git-dnywh-fixaccordion-focus-rings-supabase.vercel.app/dashboard/account/tokens): permission category accordions (already `px-4`) - [Database → Roles](https://studio-staging-git-dnywh-fixaccordion-focus-rings-supabase.vercel.app/dashboard/project/_/database/roles): role row collapsibles - [Observability → Query performance](https://studio-staging-git-dnywh-fixaccordion-focus-rings-supabase.vercel.app/dashboard/project/_/observability/query-performance): index suggestion accordions (already `px-4`) - [Settings → JWT (legacy)](https://studio-staging-git-dnywh-fixaccordion-focus-rings-supabase.vercel.app/dashboard/project/_/settings/jwt/legacy): migration help collapsible ### Docs - Docs mobile nav (narrow viewport): accordion sections **(resting layout: +px-2)** ### WWW - [Pricing → FAQs](https://zone-www-dot-com-git-dnywh-fixaccordion-focus-rings-supabase.vercel.app/pricing): FAQ accordions **(resting layout: +px-2)** - WWW mobile nav (narrow viewport): menu accordions **(resting layout: +px-2)** ### Not worth opening manually Sheets, modals, error fallbacks, and replication/cron/integration advanced-settings accordions inherit the focus fix but need specific flows or failure states to reach. Error-state troubleshooting accordions (`TroubleshootingSections`) also gain **+px-2** when visible. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## New Features - Accordion triggers now use an inset focus style by default, with an option to use the standard ring style. - Accordion and collapsible trigger styling can be customized more flexibly. ## Accessibility - Focus indicators appear consistently without flashing browser defaults. - Focus transitions are limited to visual properties that preserve immediate keyboard focus visibility. ## Documentation - Updated accessibility guidance explains inset focus behavior and transition considerations. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
c6cdf4bd53 |
Migrate off contentlayer2 to Velite (design-system, ui-library, learn) (#48546)
## Summary - `contentlayer2@0.4.6` is unmaintained and drags in a heavy, stale dependency graph (esbuild pinned to 0.17–0.20, mdx-bundler, old `@opentelemetry/core`) that was the recurring source of vuln bumps. - Migrates all three apps that used it — `design-system`, `ui-library`, `learn` — to [Velite](https://velite.js.org), preserving the generated typed `allDocs`/`Doc` collection and the `body.code` + `useMDXComponent` runtime via a small shared local hook. - Same MDX pipeline (remark-gfm, remark-code-import, rehype-slug, rehype-pretty-code w/ Shiki compat + local theme, rehype-autolink-headings, custom `__rawString__`/`__src__`/`__event__`/`__style__` visitors) ported 1:1 into each app's `velite.config.js`. - `learn`'s extra frontmatter fields (`chapterNumber`, `explore`, `courseHero`) are now backed by real Velite/Zod schema types, so the `(doc as any)` casts in `get-next-page.ts` / `get-current-chapter.ts` / the doc page could be dropped. - `next.config.mjs` no longer wraps with `withContentlayer`; since Velite has no Next.js webpack-plugin equivalent, each app's `dev` script now runs `velite dev` and `next dev` in parallel via `npm-run-all`. Ref: [FE-3861](https://linear.app/supabase/issue/FE-3861/migrate-off-contentlayer2-learn-ui-library-design-system-to-shed) ## Test plan - [x] `pnpm build:content` (Velite build) succeeds for all three apps - [x] `pnpm typecheck` passes for all three apps - [ ] Manual smoke test of `pnpm dev` for each app in a browser (docs pages render, TOC, copy-button, code highlighting) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Improvements** * Improved content generation across documentation, learning materials, and the UI library for more consistent pages. * Preserved MDX rendering, navigation, table of contents, course metadata, source previews, and component examples. * Improved consistency when displaying documentation and interactive examples. * Improved application loading by optimizing how interface components are delivered. * **Chores** * Streamlined content compilation and development workflows across the design system, learning area, and UI library. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
24be387cdb |
docs: use sign in terminology across guides and style guides (#49877)
## What kind of change does this PR introduce? Docs update. Aligns documentation and style guides with the **Sign in / Sign out / Sign up** platform standard. Closes DOCS-1328. Related to [#49874](https://github.com/supabase/supabase/pull/49874). ## What is the current behavior? Docs style guides prefer _login_ / _log in_. Guide prose uses mixed login and sign in wording. ## What is the new behavior? - [WORD_LIST.md](apps/docs/WORD_LIST.md) and [copywriting.mdx](apps/design-system/content/docs/copywriting.mdx) document the sign in standard - Design-system auth examples updated - Guide prose and API reference spec descriptions updated ### Terminology **Standard:** Use _sign in_, _sign out_, and _sign up_ as verbs. Use _sign-in_, _sign-out_, and _sign-up_ as nouns and adjectives. Match Studio UI labels (**Sign in**, **Sign out**, **Sign up**). **Preserved intentionally:** | Category | Keep as-is | Example | | -------- | ---------- | ------- | | Feature name | social login | `/social-login`, `features.mdx` heading, OAuth provider section | | URL slugs | `login` in paths | `/phone-login`, `/login-flows`, `choosing-login-flow` | | CLI | `supabase login` / `supabase logout` | Reference ids `supabase-login` / `supabase-logout`; executable commands unchanged | | SDK methods | `logout()` | Kotlin/Swift method names in API reference titles and examples | | Third-party UI | Provider product labels | Facebook Login, Kakao Login, portal **Login** buttons | | Postgres | Database terminology | login privileges, login credentials, login via role | | Audit/logging | Log prose | "Generates the following **log** in the Postgres Logs" | | Code and routes | Paths and filenames | `app/login/`, `Login.tsx`, `demos/android-login` | | External URLs | Third-party login pages | `dash.cloudflare.com/login`, `console.neon.tech/login`, `vercel.com/login` | | API identifiers | Event and field names | Audit actions `login`/`logout`, `should_logout_user` | ## To test - Run `pnpm lint:mdx` in `apps/docs` - Spot-check `features.mdx`, `social-login.mdx`, and a provider guide (e.g. Facebook, Kakao) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Standardized authentication terminology across guides, reference material, CLI documentation, and copywriting guidance using “sign in,” “sign out,” and “sign up.” * Updated authentication instructions, headings, link text, examples, and SSO guidance for clearer, more consistent wording. * Corrected related grammar, spelling, hyphenation, and documentation links while preserving established product names and implementation commands. * **Style** * Refined code examples with consistent import ordering and spacing. * **Examples** * Updated authentication button and menu labels to “Sign in” and “Sign out.” <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
02cf09212e |
chore: Remove tsconfig paths (#49770)
This PR removes all `paths` in `tsconfig.json` for all apps and packages. They were added previosly because some of the components had a `_Shadcn` suffix because of an ongoing migration. How that the migration is done, the paths can be removed. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Standardized shared UI component, utility, and icon imports across design-system examples and application screens. * Simplified shared component access and project configuration. * Added shared access to anchor-link helpers and animation styles. * **Compatibility** * Updated component exports and imports without changing existing behavior. * No changes to user-facing workflows, screens, or functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
6cb08304d9 |
Fix: RadioGroupCard accessibility issues (#48527)
## Problem The `<RadioGroupCard>` component has an accessibility issue: duplicate ids on the items. Besides, its usage in the Design System app has additional issue: no label on the group itself when used outside a react-hook-form. Finally, the form example wrap each item in a `FormField` and `FormControl` which is unnecessary and causes another accessibility issue as all items are then injected the same `id` prop. ## Solution - Fix the duplicate ids issue - Fix all design system example - Fix the only wrong usage we have in studio No visual changes ## Notes When used outside a form, I added aria-label attributes on the group and they are announced by Mac Voice Over. However, when used in a form, our components adds a label with the correct for attribute but it seems that Mac Voice Over does not announce it. Not sure about how this should be handled. ## How to test On https://design-system-git-fix-radio-group-card-a11y-supabase.vercel.app/design-system/docs/components/radio-group-card, with Voice Over enabled: - tab to the first radio group, it should announce the value and the label of group itself, _Size_ - tab to the second, same but label is _Theme_ On https://design-system-git-fix-radio-group-card-a11y-supabase.vercel.app/design-system/docs/components/radio-group-card#form (Form example): - select any option and submit - check the correct option is submitted On https://studio-staging-git-fix-radio-group-card-a11y-supabase.vercel.app: - Go to your organization settings, Audit Log Drains, open your devtool network tab - Create a new custom endpoint and select the HTTP version - Check in the network tab that the correct http version is passed <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Accessibility** * Improved labeling for radio card groups, including size, spacing, theme, and webhook version selections. * Radio options now use stable or automatically generated identifiers with reliable label associations. * **Bug Fixes** * Simplified radio option structure in forms for more consistent behavior. * Improved ID handling across radio card, stacked, and large radio options. * Updated the themed radio card example to use the dark theme by default. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
14fe0c0cc8 |
fix(studio): slightly round split-button corners on focus (#49129)
## What kind of change does this PR introduce? UI polish for split buttons (primary action + dropdown chevron). Follow-up to #49055. ## What is the current behavior? The focus ring sits above the neighbouring half, but the inner edge stays square, so the ring has two sharp corners at the join. ## What is the new behavior? On keyboard focus, the squared-off edge uses a slight radius so the ring matches the outer corners more closely. Resting state is unchanged. Split-button callsites now share the same join classes as the design-system example. | Before | After | | --- | --- | | <img width="1030" height="296" alt="43471" src="https://github.com/user-attachments/assets/9df3bd72-c7ac-4419-ae18-a7e649dc2d66" /> | <img width="1056" height="276" alt="CleanShot 2026-08-17 at 10 45 09@2x" src="https://github.com/user-attachments/assets/52e8a4dc-9c52-45ce-b4d0-f0e7b1b75935" /> | ## To test Tab to each half (labelled button, then chevron). Inner corners of the focus ring should be slightly rounded, not square. 1. [Split with dropdown](https://design-system-git-fix-split-button-focus-radius-supabase.vercel.app/design-system/docs/components/button#split-with-dropdown) (no login) 2. [Access Tokens](https://studio-staging-git-fix-split-button-focus-radius-supabase.vercel.app/dashboard/account/tokens) → Generate new token 3. Any project on [studio staging](https://studio-staging-git-fix-split-button-focus-radius-supabase.vercel.app/dashboard/_/settings/general) → Settings → General → Restart project <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Accessibility** - Added accessible labels to dropdown and export controls. - Improved keyboard-focus visibility, layering, and rounded edge treatment across joined buttons and menus. - Removed misleading or redundant screen-reader text and titles. - **Bug Fixes** - Prevented split-button controls from shrinking or displaying awkward borders and corners. - Refined hover and focus behavior for action buttons throughout settings, database, storage, account, and documentation interfaces. - **Documentation** - Clarified guidance for using overflow menus and responsive split-button actions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
cb35e1f98e |
chore(library): update routes, redirects, and naming (#48668)
Our UI Library registry is expanding to include blocks that go beyond UI and in some cases focus purely on back-end. This PR is a precursor to adding more back-end related blocks. This PR includes the `ui-library -> library` rename plus redirects and small UI copy updates. Since this is a rename we'll need to update Vercel configuration. ## Vercel rollout Keep the Library project Root Directory as `apps/ui-library` 1. In the **Library** Vercel project, set: `NEXT_PUBLIC_BASE_PATH=/library` Apply it to Preview and Production, then redeploy the Library project. 2. In the **www** Vercel project, add: `NEXT_PUBLIC_LIBRARY_URL=<current value of NEXT_PUBLIC_UI_LIBRARY_URL>` Apply it to Preview and Production. Keep `NEXT_PUBLIC_UI_LIBRARY_URL` during the migration, then redeploy the www project. 3. Deploy in this order: 1. Library project 2. www project 4. Validate: - `/library` - `/library/docs/nextjs/password-based-auth` - `/ui` redirects to `/library` - `/ui/docs/nextjs/password-based-auth` redirects to `/library/docs/nextjs/password-based-auth` - `/ui/docs/ai-editors-rules/*` still uses its existing Docs redirects No Vercel dashboard redirect rules are needed. Environment-variable changes require a new deployment. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Supabase UI Library has been renamed to **Supabase Library** across navigation, pages, documentation, and resource links. * The Library is now available at `/library`, with updated descriptions covering components, blocks, and developer tools. * **Bug Fixes** * Added permanent redirects from legacy `/ui` URLs to corresponding `/library` paths. * Updated links throughout the site and documentation to prevent broken navigation and references. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
73c9dbfa52 |
fix(studio): standardise custom icon weight (#48478)
## What kind of change does this PR introduce? Bug fix and internal tooling update. Resolves FE-3472. ## What is the current behavior? Custom Studio icons use inconsistent source stroke widths, and some child-level styling prevents component props from overriding them. Mixed custom and Lucide icon sets can therefore appear uneven. ## What is the new behavior? Custom stroke icons use a root-level `stroke-width="1.5"`; fill-only logos use `stroke="none"`. The build validates that contract and regenerated components preserve existing exports and props. Studio applies the same `1.5` weight across Reports categories and uses one shared destination icon mapping in the replication selector, destination rows and diagram. | Before | After | | --- | --- | | <img width="418" height="516" alt="56398" src="https://github.com/user-attachments/assets/6afa7042-e6be-40e7-9911-af2f61238c9d" /> | <img width="390" height="550" alt="CleanShot 2026-07-30 at 17 12 37@2x" src="https://github.com/user-attachments/assets/870f49cf-c8fa-40db-8be8-2eb5f264ff4a" /> | | <img width="510" height="734" alt="CleanShot 2026-07-30 at 17 19 28@2x" src="https://github.com/user-attachments/assets/a5b2c088-dcd2-4907-976b-5820794d06e3" /> | <img width="554" height="742" alt="CleanShot 2026-07-30 at 17 16 06@2x" src="https://github.com/user-attachments/assets/ed3a77c4-5d94-4ca7-b9e4-1403b725a981" /> | ## Testing At 100% zoom, compare custom and Lucide icon weight in: - Reports: **Add your first chart** and **Add block** - Database > Replication: the destination selector, destination rows and replication diagram - Command menu (`⌘K`): **Search Database Tables**, **Search RLS Policies**, **Search Edge Functions** and **Search Storage** - Authentication > Users: right-click a user row and compare the context-menu icons - Database > Schema Visualizer: open a table node overflow menu - A paused project: **Export your data > Download backups** <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added consistent destination icons across replication panels, rows, and diagrams. * Updated instance health and metric icons for clearer identification. * Standardized icon stroke weight and reduced default icon stroke thickness. * **Documentation** * Clarified custom icon requirements, default properties, and validation guidance. * **Bug Fixes** * Improved consistency of icon rendering across replication destinations and reports. * **Tests** * Added coverage for icon SVG validation and replication destination icon rendering. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
7a77760a10 |
fix(studio): confirm before discarding dirty replication destination forms (#48522)
## What kind of change does this PR introduce? Bug fix (dirty form dismissal for Replication destination sheets), plus small docs/skill updates so agents pick up the existing modality pattern. ## What is the current behavior? Closing the Add/Edit destination sheet (Cancel, Escape, or backdrop) discards in-progress form state with no confirm. Same for the nested Create publication sheet. ## What is the new behavior? Dirty closes go through `useConfirmOnClose` + `DiscardChangesConfirmationDialog`, matching other Studio sheets. Successful submit still closes without prompting. Also: skills + `forms.mdx` now point at Modality “Dirty form dismissal”. | After | | --- | | <img width="1024" height="759" alt="Replication Database Chisel Toolshed Supabase" src="https://github.com/user-attachments/assets/6f568a2a-c76b-442a-b592-d638bb36adc4" /> | ### How to test 1. Studio → Database → Replication → **Add destination** (any pipelines type with access). 2. Change a field so the form is dirty. 3. Try Cancel, Escape, and backdrop click → discard dialog appears; **Keep editing** stays open; **Discard changes** closes. 4. Submit successfully with a valid config → sheet closes with no discard dialog. 5. Repeat for **Edit destination** from a destination row menu. 6. Optional: Add destination → create a new publication from the publication picker → dirty that nested sheet and dismiss the same way. 7. Optional: Add destination → Read Replica → change region → dismiss → discard dialog; deploy still closes without prompting. ## Additional context Sheet owns the close guard; forms report dirty via a ref because RHF lives in the child. Nested `NewPublicationPanel` wires the guard locally. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added unsaved-changes tracking to replication destination and publication forms. - Added confirmation prompts before closing forms with unsaved changes via Cancel, Escape, or backdrop dismissal. - Forms now reset appropriately after successful submission or confirmed dismissal. - **Documentation** - Updated form and UI pattern guidance to document dirty-form dismissal behavior for sheets and dialogs. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com> |
||
|
|
f7454cf94e |
feat(studio): oauth impersonation warning on authorize (#48162)
## What kind of change does this PR introduce? Feature + docs. Stacked on #48161 (logo contract / [DEPR-604](https://linear.app/supabase/issue/DEPR-604/define-connect-logo-asset-and-variant-contract)). ## What is the current behavior? After #48161, curated logos only resolve from allowlisted `redirect_uri` hosts. A requester can still present a trusted partner **name** (e.g. Claude) while redirecting to an unrelated remote host; the UI shows Supabase alone but does not call out the mismatch. ## What is the new behavior? - Shows a caution admonition when the requester name looks like a trusted partner (Claude, Cursor, ChatGPT/OpenAI, Perplexity) but `redirect_uri` is a **remote** host outside that partner's allowlist. - Skips localhost / loopback redirects for the caution (common for local MCP clients); those still get curated logos when the name matches a trusted partner. - Highlights the footer redirect URL in warning colour when the caution is shown. - Documents the behaviour in the Connect interstitials pattern. ### To test Real MCP clients (Claude, Cursor, etc.) only send users to **production** `/authorize`, so you cannot drive a local or preview Studio build from those tools. Use a Network override instead: 1. Start Studio and sign in (`pnpm dev:studio`, or use the [Vercel preview](https://studio-staging-git-danny-oauth-impersonation-warning-supabase.vercel.app/)). 2. Open `/dashboard/authorize?auth_id=foo` (any `auth_id` is fine; the real response may 404) ([Vercel preview](https://studio-staging-git-danny-oauth-impersonation-warning-supabase.vercel.app/dashboard/authorize?auth_id=foo)). 3. DevTools → **Network** → find `GET …/platform/oauth/authorizations/foo` (or whatever id you used). 4. Right-click → **Override content** (enable Local Overrides / pick a folder if prompted). 5. Paste one of the payloads below (status **200**), save, then reload the authorize page. 6. Keep `expires_at` in the future so the request does not look expired. #### Impersonation caution (trusted name + remote non-allowlisted redirect) Expect: - Supabase alone (no curated Claude mark) - Caution: “Redirect does not match this app name” - Footer redirect URL in warning colour ```json { "name": "Claude", "website": "https://claude.ai", "icon": null, "domain": "claude.ai", "redirect_uri": "https://evil.com/callback", "expires_at": "2099-01-01T00:00:00.000Z", "scopes": ["organizations:read", "projects:read"], "approved_at": null, "registration_type": "dynamic" } ``` | Preview | | --- | | <img width="764" height="958" alt="Authorize Claude Supabase" src="https://github.com/user-attachments/assets/e6eee016-5710-41ba-9925-87511e009e22" /> | #### Localhost MCP: no caution Expect curated Claude + Supabase pair (name match + loopback), **no** caution, normal footer colour. Local MCP clients often use loopback redirects. ```json { "name": "Claude", "website": "https://claude.ai", "icon": null, "domain": "claude.ai", "redirect_uri": "http://127.0.0.1:42813/callback", "expires_at": "2099-01-01T00:00:00.000Z", "scopes": ["organizations:read", "projects:read"], "approved_at": null, "registration_type": "dynamic" } ``` | Preview | | --- | | <img width="764" height="958" alt="Authorize Claude Supabase" src="https://github.com/user-attachments/assets/79f36865-3c8e-43e5-9490-24288efc74aa" /> | #### Legitimate curated partner: no caution Expect curated Cursor + Supabase pair, no admonition, normal footer colour. ```json { "name": "Cursor", "website": "https://cursor.com", "icon": null, "domain": "cursor.com", "redirect_uri": "https://cursor.com/callback", "expires_at": "2099-01-01T00:00:00.000Z", "scopes": ["organizations:read", "projects:read"], "approved_at": null, "registration_type": "dynamic" } ``` | Preview | | --- | | <img width="764" height="958" alt="56164" src="https://github.com/user-attachments/assets/412333a3-a74f-42eb-9f63-d56b6a26bf91" /> | #### Unrelated name + remote redirect: no caution Expect Supabase alone (no icon), no admonition. ```json { "name": "Acme Tools", "website": "https://evil.com", "icon": null, "domain": "evil.com", "redirect_uri": "https://evil.com/callback", "expires_at": "2099-01-01T00:00:00.000Z", "scopes": ["organizations:read", "projects:read"], "approved_at": null, "registration_type": "dynamic" } ``` | Preview | | --- | | <img width="764" height="958" alt="Authorize Acme Tools Supabase" src="https://github.com/user-attachments/assets/dab24817-5c26-4aa1-a447-796c4af5868b" /> | <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary by CodeRabbit - **New Features** - Added an OAuth caution when a requester name matches a known partner but uses an unapproved remote redirect host. - Improved trusted partner logo selection for localhost/loopback redirects while preserving safe fallbacks for untrusted redirects. - **Documentation** - Updated Connect interstitial guidance for redirect mismatches and localhost/loopback behavior. - **Tests** - Expanded coverage for caution visibility, messaging, localhost logo pairing, and trusted redirect scenarios. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |