mirror of
https://github.com/supabase/supabase.git
synced 2026-12-03 23:18:57 +00:00
create-pull-request/patch
121
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
28c2c2dd53 |
feat(www): add Launch Week 16 banner (#54511)
Add a dismissible bar above the www nav that promotes Launch Week 16 (December 7-11) and links to /launch-week. Hide the bar on /launch-week pages. Hide it on /state-of-startups too because the fixed nav on that page would cover it. ## Banner polish Adds shared animated dot artwork, a link CTA, and responsive spacing and alignment. Reduced-motion preferences keep the dots static. Studio uses this artwork in the dependent #54512. | After | | --- | | <img width="500" height="584" alt="31035" src="https://github.com/user-attachments/assets/7ebad641-158e-47ea-a8be-3097ecc5c0ae" /> | | <img width="500" height="584" alt="18287" src="https://github.com/user-attachments/assets/02c87481-1dbe-4576-afc0-bdc9f22fc893" /> | | <img width="995" height="584" alt="89244" src="https://github.com/user-attachments/assets/aad4b608-71f1-484f-bbf4-54c725800f52" /> | | <img width="995" height="584" alt="99848" src="https://github.com/user-attachments/assets/a8b50942-1ecd-4c63-91b3-a6b4847d8830" /> | ## Review instructions 1. Open the www homepage on the preview in light and dark mode. Check the centred desktop message, link hover, and close button. 2. At a phone width, check the left-aligned copy and artwork on the right. Open the mobile menu and close it; the banner should return. 3. Dismiss the banner and reload. It should stay dismissed. Validation: scoped ESLint, formatting, and ui-patterns typecheck pass. --------- Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com> |
||
|
|
5b31e21ddb |
feat(docs): guide video preview (#53981)
## Problem * video card in the docs guide sidebar blurs the thumbnail making it hard to preview * users cannot see which video the card opens before they click it ## Solution * adds a `GlassLens` filter wrapper to `ui-patterns` with lens curvature and color fringe settings * replaces the video card in both docs sidebars with a sharp thumbnail * changes the video dialog in docs and www to fade the backdrop + skip the zoom when reduced motion is on * fixes the white iframe in dark mode + a one-frame backdrop flash at the end of the close animation * adds autoplay on open + the card thumbnail behind the iframe while the video loads * adds a hidden dialog title for screen readers <!-- linear:table-colwidths:801 --> <table> <thead> <tr> <th>preview</th> </tr> </thead> <tbody> <tr> <td> https://github.com/user-attachments/assets/b41b3b8a-4d3e-47b3-92ea-3b2cd7629494 </td> </tr> </tbody> </table> ## Review instructions 1. open [/docs/guides/database/overview](<https://docs-git-antlio-docs-video-preview-supabase.vercel.app/docs/guides/database/overview>) in dark mode 2. make sure that the video card shows a thumbnail 3. make sure it feels better :) ## 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>) |
||
|
|
7c368aadfd |
refactor(ui-patterns): use FrameworkProvider for routing and drop next (#53907)
Migrates the remaining router consumers in `packages/ui-patterns` (`MobileSheetNav`, `CommandProvider`, `useCrossCompatRouter`) to `useFramework()` from `common`, removing the final `next` imports and `next` peerDependency from `packages/ui-patterns`. **Changed:** - `MobileSheetNav`: read `asPath` from `useFramework()` instead of `next/router`, and close as soon as a link inside it is tapped (Studio only updates `asPath` once the destination route has loaded) - `CommandProvider`: close the menu when `asPath` changes (ignoring hash-only changes), in every framework - `useCrossCompatRouter`: call `useFramework().push` and close/reset the menu once it settles. No `startTransition` around the push – awaiting a Pages Router push inside a transition deadlocks, since Next renders the route change in a transition of its own. This drops the `useTransition` / `onPendingEnd` plumbing - Updated `MobileSheetNav` and `CommandMenu` tests to wrap with `FrameworkProvider` instead of mocking `next/*`, plus regression tests for a Pages Router-style push, same-URL pushes, pushes that throw, children staying mounted, hash-only changes, and sheet link taps **Removed:** - `next` from `packages/ui-patterns/package.json` `peerDependencies` - `next-router-mock` from `packages/ui-patterns/package.json` `devDependencies` and `packages/ui-patterns/vitest.setup.ts` - `useCrossCompatRouter` from the `CommandMenu` barrel (no consumers outside `ui-patterns`) ## To test - Run `packages/ui-patterns` tests and typecheck - Open the command menu (`Cmd+K`) in Studio and WWW (both an App Router page and a Pages Router page), navigate to a route, and confirm it navigates and closes cleanly - Search docs from the command menu on a WWW Pages Router page and open a result - Open a mobile sheet nav in Studio, navigate routes/queries, and verify close-on-route-change and `shouldCloseOnQueryChange` behavior --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
b2cd26e054 |
chore(ui-patterns): remove trivial and unused next imports (#53903)
Removes unused and straightforward `next` imports in
`packages/ui-patterns` (and a dead `next/navigation` test mock in
`packages/ui`) that do not require a framework adapter.
**Removed:**
- Unused `LW15Banner`, `AnnouncementBanner`, `Announcement`, and
`PromoToast` components and their `package.json` exports
- Unused `HIDE_PROMO_TOAST` local storage key (only `PromoToast` read
it)
- Unused `next/navigation` mock from `packages/ui/vitest.setup.ts`
**Changed:**
- `PrivacySettings`: replace external `next/link` anchors with plain
`<a>` tags
- `Markdown/components` & `SqlToRest`: replace `next/dynamic` with
`React.lazy` + `Suspense` (plus a client-mount guard in `SqlToRest` to
preserve `{ ssr: false }`)
- `McpUrlBuilder` (`McpConfigurationDisplay` & `InstructionBlocks`):
replace `next/image` with plain `<img>` for static bundled
icons/screenshots. Both now share `normalizeAssetUrl` from
`mcpIconAssets.ts`, and the screenshot is lazy-loaded
- `types/assets.d.ts`: type `*.png` / `*.svg` imports as `string | {
src: string }` instead of `import('next/image').StaticImageData` (Vite
returns a string, Next returns an object, and consumers only read `src`)
## To test
- Run `packages/ui-patterns` and `packages/ui` unit tests and typecheck
- Open the MCP connect panel in Studio / Docs and confirm client icons
and setup screenshots render
- Open Privacy Settings modal in WWW / Docs and verify links open
properly
- Check SQL-to-REST translator page in Docs renders client-side
---------
Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
|
||
|
|
ef8005d863 |
fix(kb): header sign in state (#53558)
## Problem - the kb header shows "Sign up" to every reader, also to readers who are signed in to the dashboard - kb never reads the dashboard session, so a signed-in reader has no link to the dashboard and no way to sign out ## Solution - reads the dashboard session in the kb header with the shared `AuthProvider` from `common/auth`, the same as docs and www - changes the header link to "Dashboard" for a signed-in reader, and keeps "Sign up" for other readers and in the server html, so the header does not move on load - adds the email, "Account Preferences", "All Projects" and "Sign out" to the header menu for a signed-in reader, the same as the docs menu - changes the mobile menu footer to "Sign in" and "Start your project", or to "Dashboard" for a signed-in reader, the same as the docs drawer - adds tests that store a session and check the header and mobile menu links | before | after | | --- | --- | | <img width="760" height="1000" alt="image" src="https://github.com/user-attachments/assets/424feb44-4008-4d8e-b994-bd7d5c103bc3" /> | <img width="760" height="1000" alt="image" src="https://github.com/user-attachments/assets/54be6c7d-39e1-45ac-9a79-9fc0650d251c" /> | <!-- ## 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 [/kb](https://kb-git-antlio-fix-kb-header-sign-in-state-supabase.vercel.app/kb) at a desktop width, and make sure that the header link shows "Sign up" 2. open the browser console on the preview, and run this snippet, which stores a fake dashboard session with no real token: ```js const user = { id: 'test', aud: 'authenticated', email: 'you@example.com' } const key = 'supabase.dashboard.auth.token' localStorage.setItem(key, JSON.stringify({ access_token: 'a.b.c', refresh_token: 'r', token_type: 'bearer', expires_in: 3600, expires_at: Math.floor(Date.now() / 1000) + 3600, user })) localStorage.setItem(`${key}-user`, JSON.stringify({ user })) 3. reload page ## 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) |
||
|
|
ca2286dd56 |
feat(kb): hero refacto (#53626)
## Problem - kb home and topic heroes stay blank on load because their canvases wait for react dom and hydration - the guide lists fade in row by row so the rows show late (i liked it at first but now doesn't feel right) ## Solution - changes the heroes to start from a small head script so the first frame does not wait for react - changes the heroes to hydrate only the home search button so a hydration mismatch cannot remove the running canvases - removes the stagger from the guide lists - moves the `GlyphLines` canvas code and `toOpaque`, now `flattenColor` into modules without react <!-- ## 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 [/kb](https://kb-git-antlio-kb-hero-refacto-supabase.vercel.app/kb) now rings should show faster vs prod 2. open [/kb/topics/auth](https://kb-git-antlio-kb-hero-refacto-supabase.vercel.app/kb/topics/auth), reload, and make sure that the grid lines and shapes show directly after the title ## 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) |
||
|
|
22ea45a3ba |
feat: getting started v2 (#52511)
## Problem * the getting started page is a stack of content listings: an overview, use cases, framework quickstarts and tutorials * a new reader must find a path in that list, and the page gives no commands or agent prompt for their setup ## Solution * adds a stepper to the getting started page, so a reader gets the steps and an agent prompt for their setup * adds the `docs-getting-started-v2` posthog flag, so the stepper and the current page can run as an a/b test * adds events for stepper choices, link clicks and prompt copies, so the test can compare the two pages * adds a markdown export of the stepper, so the `.md` page lists every path for agents * moves the iso shapes from kb into `ui-patterns`, so the docs feature cards use the same shapes as the kb heroes * changes the edge functions shape to a flat puzzle piece, because the old shape had too many parts <!-- linear:table-colwidths:397,397 --> <table> <thead> <tr> <th>state</th> <th>preview</th> </tr> </thead> <tbody> <tr> <td>after</td> <td> https://github.com/user-attachments/assets/7127d817-4240-4d08-a1c9-6ada1b1b2563 </td> </tr> </tbody> </table> ## Review instructions 1. open [/docs/guides/getting-started?docs-getting-started-v2=stepper](<https://docs-git-docs-getting-started-explorations-supabase.vercel.app/docs/guides/getting-started?docs-getting-started-v2=stepper>) and make sure that the stepper shows with agent selected 2. select next.js and the auth card, then make sure that the setup prompt names next.js and has a step for auth 3. open [/docs/guides/getting-started?docs-getting-started-v2=stepper&start=cli&fw=nextjs](<https://docs-git-docs-getting-started-explorations-supabase.vercel.app/docs/guides/getting-started?docs-getting-started-v2=stepper&start=cli&fw=nextjs>) and make sure that connect your app shows the install command and the quickstart button ## 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>) |
||
|
|
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. |
||
|
|
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. |
||
|
|
bf39c95230 |
feat(design-system): trace ui foundations (#52153)
## Problem We're adding tracing UI primitives to the design system as building blocks for future trace waterfalls. This is the first PR in a stack of small PR's and it lays the data layer and foundations. It doesn't render anything yet. Part of [DEBUG-243](https://linear.app/supabase/issue/DEBUG-243/tracing-ui-primitives-stacked-prs) ## Solution Adds the span types, the trace index and `Trace.Root`: - OpenTelemetry-compatible span types (trace id, span id, parent span id, name, start/end, status, attributes, events). - `buildTraceIndex` and the time-to-position scale that later primitives share. - `Trace.Root`, which provides the index through context. It's the only UI export in this PR. - Three additions to the index: - `isLive`: true if any span is still running (`endMs === null`). - `minRangeMs`: an optional `Trace.Root` prop that sets a floor on the visible duration while the trace is live. - `slowestId`: the id of the longest finished span (first encountered wins ties), or `null` if there is none. Everything visual (Waterfall, Ruler, Rows, Bar, Minimap, Inspector and so on) comes in the PRs after this one. There are no visual changes here, so no screenshots. ## Additional context This is PR 1 of a stack, so later PRs build on this branch. The earlier exploration is in the draft #51184, which stays open as reference until the stack lands. ## Review instructions Nothing renders in this PR, so review is code-only. 1. Read the span types and check they cover the OpenTelemetry fields listed above. 2. Read `buildTraceIndex` and check `isLive`, the `minRangeMs` floor and `slowestId` against the descriptions above. The floor should only apply while the trace is live, and a running span should never be picked as slowest. 3. Run the Trace unit tests in `packages/ui-patterns` and check they pass. The new cases cover `isLive`, `minRangeMs` and `slowestId`. 4. Run typecheck and lint for the package. |
||
|
|
e928d28e69 |
feat(ui-patterns): top nav menu (#52501)
## Problem - kb and docs each keep their own copy of the top bar menu and its buttons - the kb bar has no search box, and the docs bar has one on the right ## Solution - adds a shared top nav to `ui-patterns`, so kb and docs use one megamenu and one set of bar buttons - replaces the docs desktop dropdowns with the megamenu, so docs and kb show the same menu design - adds a heading to the first column of each docs menu, so the reader sees which group a list belongs to - adds the search box and a "sign up" button label to the kb bar, so it matches docs | state | preview | | -------|------| | before | <img width="1506" height="350" alt="image" src="https://github.com/user-attachments/assets/3045d400-4ac0-41d7-a94f-acc23fa919fa" /> | | after | <img width="1506" height="350" alt="image" src="https://github.com/user-attachments/assets/334e5130-611a-4eb7-a95a-c796e2bbcf80" /> | <!-- ## 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 kb and docs preview links above in desktop 2. on kb, hover "topics" and make sure that the panel opens under the bar 3. click the search box and make sure that the kb search dialog opens 4. on docs, open [/docs/guides/auth](https://docs-git-antlio-feat-shared-top-nav-supabase.vercel.app/docs/guides/auth) and make sure that the "products" label has an underline 5. open each docs menu and make sure that the first column has a heading 6. make sure that the menu button opens and closes the mobile menu in kb and docs ## 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) |
||
|
|
9eaae4cd2c |
feat(www): brand page (#52295)
## Problem - a person or an agent cannot link one logo file or pick the file for a light or a dark background as the brand assets page has one preview image and two zip downloads only - `apps/www/lib/json-ld.ts` sets `Organization.logo` to the open graph banner instead of a logo file ## Solution - [proposal] Brand Assets -> Brand Guidelines - [proposal] `/brand-assets` -> `/brand` - adds the official logos as separate svg and png files in `/brand-assets/`, with a catalog that tells the background that each file is for - show each file on its background, with copy and download actions - adds `/brand.md` and a "Copy agent prompt" button, so an agent can read which file to use for each background - adds a "Copy wordmark" item to the nav logo menu, which copies the wordmark file for the site theme - changes `Organization.logo` from the open graph banner to the wordmark png `brand assets page` | before | after | | -------|------| | <img width="1637" height="901" alt="image" src="https://github.com/user-attachments/assets/6b5361c8-0995-4e61-bc29-b5a7ccab7d69" /> | <img width="1637" height="901" alt="image" src="https://github.com/user-attachments/assets/0f65ab36-d6f2-427e-8973-eb559139cf8e" /> | `logo right click` | before | after | | -------|------| | <img width="676" height="362" alt="image" src="https://github.com/user-attachments/assets/5abde373-8a37-4ab8-8193-fb7112b97104" /> | <img width="676" height="362" alt="image" src="https://github.com/user-attachments/assets/ef5d0724-6a91-4af7-8e9d-59025a9eba87" /> | <!-- ## 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. run `pnpm dev:www` and open `http://localhost:3000/brand-assets` 2. in the gallery, copy and download one file of each group, and make sure that each file opens 3. click "Copy agent prompt", and make sure that the copied text names `https://supabase.com/brand-assets.md` 4. open `http://localhost:3000/brand-assets.md`, and make sure that it links each svg and png file 5. right-click the nav logo, hover "Copy logo" and "Copy wordmark", and make sure that the frame moves to the part that each item copies 6. click "Copy wordmark" in the light theme and in the dark theme, and make sure that the pasted svg has black and then white lettering 7. run `pnpm --filter www exec vitest run data/brand-assets.test.ts`, and make sure that the tests pass ## 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) |
||
|
|
a9f56b3c4a |
feat(ui): mobile nav drawer (#52177)
## Problem on mobile docs pages with a sidebar have two menu buttons: the burger opens the global menu, and a second bar opens the sidebar while kb has its own full-screen accordion menu making two apps sharing no mobile nav code ## Solution - adds `MobileNavDrawer`, `MobileNavTabs` and `MobileNavThemeButton` to `packages/ui-patterns/src/MobileNav` - makes docs and kb use the same three parts - adds a full-width drawer in `MobileNavDrawer` under `--header-height`. It sets `inert` while it is closed - adds a tab row in `MobileNavTabs`, with a dropdown below `@xl` to avoid multiple tab lines - adds a theme button in `MobileNavThemeButton`. Each tap moves to the next theme in `singleThemes` - shows the group tabs, the theme button and the links of the selected group above the sidebar | before | after | | -------|------| | <img width="619" height="802" alt="image" src="https://github.com/user-attachments/assets/09d441c6-b4f3-4768-bb29-1e1d4f23fad1" /> | <img width="619" height="802" alt="image" src="https://github.com/user-attachments/assets/53043083-f05f-45aa-b30e-3db6fccdd443" /> | <!-- ## 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 Provide a clear numbered procedure that the PR reviewer can walk through. 1. For example, `Open the live and preview links side-by-side.` 2. For example, `See the issue is fixed.` ## 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) |
||
|
|
54a271b0f8 |
Upgrade sonner to 2x and update toast design (#52003)
## Problem Two issues: - There's an accessibility issue with sonner before v2 as it applies `role="status"` to an `li` element - The custom Tailwind classes we pass are not applied and once applied correctly, the design is not what we want ## Solution - Upgrade sonner to v2 (the aria attribute are now applied to the toasts container) - Fix the design, especially the close icon and the upload usages (with progression) In all screenshots, the close button is only displayed when hovering the toast. <img width="384" height="73" alt="image" src="https://github.com/user-attachments/assets/c34038f1-30ce-43d7-a031-81727d61592c" /> <img width="776" height="156" alt="image" src="https://github.com/user-attachments/assets/ec27ff42-6887-4b12-a39b-262a3adacf6b" /> <img width="385" height="78" alt="image" src="https://github.com/user-attachments/assets/c6b36ec9-881c-4dbe-a0c0-81b2b2b5053f" /> ## Review instructions On [Design System](https://design-system-hgbzzl10s-supabase.vercel.app/design-system/docs/components/sonner): - Check each example with extra attention to the loading/promise and upload ones On [Studio](https://studio-staging-1nx2cwequ-supabase.vercel.app/dashboard/), in the Table Editor: - Create a new table by importing a CSV file and check there's only one loading icon while the progress is shown (requires a quite big CSV as it's fast) - Then import more data in the new table |
||
|
|
942246995a |
feat(ui-patterns): toc disclosure (#51651)
## Problem as highlighted in [#51565](https://github.com/supabase/supabase/pull/51565#discussion_r4260820836) we are lacking toc on mobile ## Solution this is a proposal to add a toc disclosure for mobile breakpoint | state | preview | | -------|------| | after | <img width="1492" height="618" alt="image" src="https://github.com/user-attachments/assets/cc4d174f-47ee-499c-af6d-8f62a2edf25a" /> | | after | <img width="1492" height="618" alt="image" src="https://github.com/user-attachments/assets/ef76288a-3e28-45fa-9a22-0af84247798b" /> | <!-- ## 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 Provide a clear numbered procedure that the PR reviewer can walk through. 1. visit `/docs/guides/observability/advanced-log-filtering` 2. decrease screen size or use mobile ## 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) |
||
|
|
17582d8373 |
Cmd K to sort results based on relevance score (#52211)
## Context Realised that Cmd K doesn't really sort results by relevance. e.g here searching for "Cron" shows the first result as "Edge functions" which has nothing to do with Cron, so this PR just addresses this <img width="618" height="552" alt="image" src="https://github.com/user-attachments/assets/d643136d-a7ec-4d67-84b7-47ef0ccb5d1d" /> |
||
|
|
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) |
||
|
|
d9faba5a2c |
feat(kb): design overhaul (#51565)
## Problem knowledge base homepage was a list of topic cards with nothing to browse by, and guide pages had no table of contents ## Solution - adds grid drawn hero proposal - adds featured guides and topic cards - updates guide page layout | state | preview | | -------|------| | after | <img width="1504" height="757" alt="image" src="https://github.com/user-attachments/assets/41492e87-f4ad-4dea-ad30-7dc3ca2882b0" /> | `variants` homepage ships with a few design options behind query params, so we can compare them on the preview before picking one, temporary and non selected one will be removed Param | Values | What it does -- | -- | -- hero | grid (default), warp | grid draws the flat table grid _ warp bends the ASCII field into a funnel below the hero copy featured | cover (default), book | cover shows the featured guides as cards with an ascii cover _ book shows them as books search | off (default), on | on adds a search button under the hero copy that opens the guide search dialog. Cmd+K / Ctrl+K also opens it <!-- ## 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 kb preview at `/kb` 2. open a guide such as `/kb/guides/migrate-from-firebase-auth` ## 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) |
||
|
|
1ddb9ac787 |
Refactor organization audit logs to use filter bar (#51921)
## Context Related to this PR [here](https://github.com/supabase/supabase/pull/51790), gonna refactor the Organization audit logs UI to also use the FilterBar component to match a consistent UX across log surfaces, instead of the individual filter popovers. <img width="1450" height="684" alt="image" src="https://github.com/user-attachments/assets/c1a4aab3-59d0-46a5-b7c7-1e7a5ad86b0d" /> ### For design Adding a small update to the `FilterBar` component here with a `topLevelOnly` parameter if the component is being used with `supportsOperators` (nested groups) - In the case of AuditLogs as least, figured that the date range filter option only makes sense as a top level filter - Hence this prevents the date range filter from being selectable while managing filters within a group <img width="366" height="186" alt="image" src="https://github.com/user-attachments/assets/e34ea0c8-5f03-4115-9fb1-554612f148dd" /> |
||
|
|
3960e6ac41 |
chore(deps): bump lucide-react to v1 (#51770)
## Problem Lucide React v1 improves screen reader behaviour (icons are hidden from assistive tech by default). It also removes brand icons such as GitHub. We were still on Lucide 0.x across the monorepo. ## Solution - Move every workspace onto one shared Lucide React v1 version via the pnpm catalog. - But Lucide React v1 [deprecated brand icons](https://github.com/lucide-icons/lucide/blob/main/BRAND_LOGOS_STATEMENT.md) - Meaning we need to handle any _old_ brand icons we used from Lucide 0.x. - Luckily, that was just `GitHubIcon`. So... - Add a `GithubIcon` in `packages/ui` that matches Lucide’s previous GitHub icon, and use it wherever we imported GitHub from Lucide. - No other Lucide brand icons were in use. - Studio “Continue with GitHub” sign-in still uses the existing SVG asset (`github-icon.svg`), not this component. - Keep the `Icon` suffix import style [recently introduced](https://github.com/supabase/supabase/pull/51659) - Monorepo apps now use `catalog` Lucide React v1. ## Review instructions 1. Open [Studio preview](https://studio-staging-git-dnywh-bump-lucide-react-v1-supabase.vercel.app/dashboard/org) on a project that is connected to GitHub: - Project home → Activity stats “GitHub” row - Org project list → GitHub badge on a connected project card/row - Branches → GitHub link on a branch row, or “Sync with a GitHub branch” - Project Settings → Integrations → GitHub integration panel 2. Open [/kb/guides/sample-guide](https://supabase.com/kb/guides/sample-guide) → confirm “Go to the GitHub discussion” shows the icon. 3. Open [/docs/reference/javascript](https://supabase.com/docs/reference/javascript) → confirm the header GitHub control still shows the icon. Or [/docs/guides/troubleshooting/rls-simplified-BJTcS8](https://supabase.com/docs/guides/troubleshooting/rls-simplified-BJTcS8) → “View discussion on GitHub”. |
||
|
|
f1082e28c7 |
chore: migrate Framer Motion imports to Motion (#51520)
## Problem Closes #31221. The applications and shared UI packages still import the former `framer-motion` package instead of Motion's React entry point. ## Solution Replace runtime imports, type imports, and three test mocks with `motion/react` across the consuming workspaces. Replace the seven direct dependency declarations with `motion: ^11.18.2`. Preserve the existing animation engine version and all other dependency resolutions, including the asynchronous `domMax` feature loader. Historical blog examples remain as published; `framer-motion` remains a transitive implementation dependency of Motion. ## Review instructions 1. Run `pnpm install --frozen-lockfile` and check the seven dependency replacements in the lockfile. 2. Open the WWW Auth page and Docs homepage at desktop and mobile widths, with normal and reduced motion preferences. 3. Open the mobile navigation, expand Product on WWW, and close the menu using Escape and the close button. 4. Check the existing animation components, shared form validation, and Studio tests for unchanged behavior. Validation: - Studio: 731 test files, 8,334 passing tests and one expected failure, with `--maxWorkers=4`. - Shared UI, UI patterns, WWW, and UI library: 615 passing tests. - `pnpm run typecheck --concurrency=1`: all 16 repository tasks pass. - All six application source lint scripts and lint ratchets pass; generated Docs example copies are excluded from local lint. - Repository Prettier source check, lockfile formatting, and case hazard check pass. - WWW: 10 existing end-to-end checks across nine pages. - Docs: 5 existing guide link and accessibility checks across Database and Auth. - WWW and Docs mobile navigation pass at desktop/mobile sizes with normal/reduced motion; SQL-to-REST translation tabs exercise the asynchronous feature loader without browser errors. - Frozen-lockfile installation passes; all existing package and snapshot resolutions are unchanged. - Learn and UI library command palettes open, filter results, and close with Escape without browser errors. - Independent code review finds no actionable defects. - `npm run build -- --filter=www --filter=docs --filter=studio --filter=learn --filter=library --concurrency=1 --continue=always`: all five affected applications build successfully (9 tasks including prerequisites); asset uploads disabled for local validation. ## Checklist - [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) (no docs topics changed) --------- Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com> |
||
|
|
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. |
||
|
|
ba82106697 |
chore(www + studio): remove expired Select 2026 promo banners (#51245)
## Problem Supabase Select 2026 has finished. The promo banners already hide via the scheduled expiry from #51006, but the campaign code, assets, and wiring are still in the tree. ## Solution Remove the Select 2026 sitewide promotion across www and Studio: - Delete shared `Select26*` banner code, font, and tests from `ui-patterns` - Delete Studio `BannerSelect2026*` and its Banner Stack registration - Unmount the www announcement banner and revert the State of Startups spacing that only existed for it - Drop the Select-only session-replay `data-band` allowlist entry and lint ratchet baseline Event go pages, blog posts, and other Select content are left alone. The `Announcement` shell stays for the next campaign. ## Review instructions 1. Open the www homepage on the deploy preview. Confirm there is no Select announcement bar above the nav. 2. Open `/state-of-startups` on the deploy preview. Confirm the hero still looks correct with no extra top gap from the removed banner. 3. Open a hosted Studio dashboard page on the deploy preview. Confirm the Banner Stack no longer shows a Select card. ## 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) |
||
|
|
1966209483 |
chore(deps): upgrade vitest to v5 (#49994)
Upgrades Vitest from 4.1.4 to 5.0.0 across the monorepo, fixes the handful of things v5 turned into hard errors, and drops the `vi.clearAllMocks()` boilerplate that v5's `clearMocks` default makes redundant. **Changed:** - `vitest`, `@vitest/ui`, `@vitest/coverage-v8` 4.1.4 → 5.0.0 (catalog) - `vi.mock` calls that lived inside `beforeAll`/`beforeEach`/test bodies moved to module scope (v5 throws on nested calls). Affects the Studio and docs setup files and four Studio tests. - `detectBrowser` test restores `navigator` via `vi.unstubAllGlobals()` instead of assigning `global.navigator`, which now reaches jsdom's getter-only property. - `RowEditor.utils.test.ts` restores its `JSON.stringify` spy. It used to leak a throwing mock for the rest of the file, which v5's coverage provider now trips over. A later test in the same file had been asserting the leak's side effect (valid JSON reported as invalid) and now asserts the correct behavior. - `@testing-library/jest-dom` 6.6 → 7.0.1. Its vitest type augmentation resolves through a peer now, so it lands on each package's own `vitest` instead of whichever copy pnpm hoisted. Fixes `toBeInTheDocument` type errors in dev-tools after the reshuffle. - `@testing-library/react` 16.0.0 → 16.3.3 for the React 19 peer range. - `vite: catalog:` added to dev-tools, www, and common. Without it they resolved a newer vite than the catalog pin, which forked a second vitest instance in the lockfile. There's now one. - ai-commands custom matcher types use v5's `Matchers<R, T>` form. - 110 test files: `vi.clearAllMocks()` removed from `beforeEach`/`afterEach` hooks, along with hooks that only did that and the imports they left unused. Calls that also reset/restore mocks are untouched. Second commit, mechanical. **Added:** - `.vitest/` to the root gitignore (v5 writes JSON/JUnit/HTML reporter output there) **Removed:** - `vite-tsconfig-paths` catalog entry and deps. Vitest 5 resolves tsconfig paths itself. Release-age note: this sat in draft with a temporary `minimumReleaseAgeExclude` entry for `vitest` and `@vitest/*` while 5.0.0 was inside the workspace's 3-day `minimumReleaseAge` window. That window has closed, so the exclusion is gone and nothing bypasses the release-age gate. **Perf** (local, medians of 3 runs, same machine): | Suite | v4.1.4 | v5.0.0 | |---|---|---| | studio | 144.1s | 141.7s (-2%) | | studio `--coverage` | 156.9s | 146.4s (-7%) | | ui-patterns | 6.27s | 5.07s (-19%) | | ui `--coverage` | 3.35s | 2.14s (-36%) | | www | 0.89s | 0.47s (-47%) | Studio is dominated by jsdom environment setup per file, which v5 doesn't change. `vitest doctor` recommends keeping the current pool config: the vm pools and `isolate: false` all break tests. ## To test - `pnpm install --frozen-lockfile` succeeds with no `minimumReleaseAgeExclude` entry for vitest. - CI: Studio unit tests, ui, ui-patterns, www, docs, and typecheck/lint should all be green. The lint ratchet was checked locally: warning counts on touched Studio files are identical to master. - `pnpm test:studio` locally passes with coverage (588 files, 6240 tests). - Open a Studio test that uses `toBeInTheDocument` in your editor and confirm no type errors on jest-dom matchers, in Studio and in `packages/dev-tools`. - Known pre-existing failures unrelated to this PR: one dev-tools test (`getEventCountBadge` capped pill) fails on master too. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Tests - Improved test coverage for JSON validation and mobile navigation behavior. - Updated test setup, cleanup, environment configuration, and matcher support across application and shared package suites. - Removed obsolete coverage for alternate MCP transport selection. ## Chores - Streamlined TypeScript path resolution and Vitest reporter output handling. - Updated testing libraries and Vitest tooling across documentation, Studio, website, and shared packages. - Added Vitest reporter output to ignored files. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com> |
||
|
|
ec1029dff0 |
chore: migrate from clsx + tailwind-merge to shadcn-ui/cn (#49938)
Migrates the repo off `clsx` + `tailwind-merge` to [shadcn-ui/cn](https://github.com/shadcn-ui/cn). Every app and package already gets `cn` from `packages/ui`, so the swap happens in that one helper and flows through to Studio, docs, www, and the rest. **Changed:** - `packages/ui` `cn` helper now uses `createCn` from `cn/config`, keeping the custom `card`/`content` spacing scale so `p-card` still overrides `p-4`. It has an explicit signature and re-exports `ClassValue`. - The four www Launch Week files that imported the `ClassValue` type from `clsx` now import it from `ui`. - `blocks/vue` local `lib/utils.ts` re-exports `cn` from the package. - Comments/README that referenced tailwind-merge. **Removed:** - Direct `clsx` and `tailwind-merge` deps from `ui`, `ui-patterns`, `www`, and `blocks/vue`. `ui-patterns` and `www` declared them without importing. **Added:** - `packages/ui/src/lib/utils/cn.test.ts` covering clsx-style joining, conflict resolution, the custom spacing scale, and variant handling. Not migrated: the standalone apps under `examples/`. They're outside the workspace and mostly on Tailwind v3, which `cn` doesn't support. Lockfile note: after merging master, the lockfile diff is only the intended swap (`clsx` and `tailwind-merge` out, `cn@0.2.5` in). `tailwind-merge` stays in the lockfile as a transitive dep of a third-party package. Release-age note: this sat in draft with a temporary `minimumReleaseAgeExclude` entry for `cn` while `cn` was inside the workspace's 3-day `minimumReleaseAge` window. That window has closed, so the exclusion is gone and nothing bypasses the release-age gate. ## To test - `pnpm install --frozen-lockfile` succeeds with no `minimumReleaseAgeExclude` entry for `cn`. - `pnpm --filter ui test` – new `cn.test.ts` passes, including `cn('p-4', 'p-card')` → `p-card`. - Typecheck passes for studio, ui, ui-patterns, vue-blocks. www typecheck panics under tsgo on master already (pre-existing, unrelated); it passes with the JS `tsc` binary. - Spot-check Studio locally: class overrides still win in the usual places (e.g. `CodeEditor` height, `Button` variants with a custom `className`). https://claude.ai/code/session_01MkAt16tsPRDTm9oB5Jr8Ub <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Improvements** * Standardized Tailwind class merging across shared UI utilities while preserving conditional classes, custom spacing classes, and variant behavior. * Updated related components and examples to use the standardized class-merging utility. * **Tests** * Added coverage for conditional class handling, conflicting utility resolution, custom spacing classes, and variant separation. * **Documentation** * Updated usage guidance to reflect the standardized Tailwind class-merging approach. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
924b3f5793 |
feat(ui-patterns): add async selection feedback (#49843)
## What kind of change does this PR introduce? Shared UI pattern and Studio UX improvement. ## What is the current behavior? Async selectors use bespoke loading and error layouts. Some replace the entire field while fetching, and opening a selector does not consistently refresh its options. ## What is the new behavior? Adds shared loading, error, and empty states for Select, command, and MultiSelector lists, including a persistent polite live region and reduced-motion support. Analytics Bucket and DuckLake selectors keep their controls in place, retain populated options during background refreshes, and refresh when reopened. ## To test Open the [Replication preview](https://studio-staging-git-dnywh-featasync-selection-feedback-supabase.vercel.app/dashboard/project/_/database/replication?destinationType=Analytics%20Bucket). The destination sheet should already be open on **Analytics Bucket**. You do not need to create a bucket, configure a destination, or start a pipeline. Open **Select a bucket**, then review these outcomes: 1. **The trigger stays put.** Opening the picker must not replace the form field with a full-width loading placeholder. 2. **Loading belongs inside the menu.** While options are fetched, the open menu shows a compact skeleton list. 3. **No resources has a clear explanation.** If the project has no Analytics Buckets, the menu says **No buckets available**. It still offers **Create a new bucket** beneath that message. 4. **Existing options do not disappear on refresh.** If the project does have buckets, close and reopen the picker. Its current options remain visible while the refresh happens in the background, rather than flashing back to skeletons. 5. **The pattern is consistent.** If convenient, select a bucket and open the namespace or access-key picker. The same in-menu loading, empty, and error treatment applies there too. The deterministic request-error and reduced-motion cases are covered by focused unit tests because the deploy preview cannot reliably force those states. |
||
|
|
b5462ee7bb |
feat(www + studio): promote Select 2026 in www and Dashboard (#49511)
## What kind of change does this PR introduce?
Feature. Promotes Supabase Select 2026 across www and the Dashboard.
## What is the current behavior?
There is no active Select promotion on www or in the Dashboard.
## What is the new behavior?
- Adds a dismissible Select 2026 banner above the www navigation.
- Adds a low-priority Banner Stack card across hosted Studio project
pages.
- Shares a lightweight pixel lockup and CSS-only motion across both
surfaces, with light, dark, and reduced-motion treatments.
- Opens the application page in a new tab and automatically expires both
placements after October 2 in San Francisco.
## To test
- Open `/database` on the www preview. Confirm the banner is legible in
light and dark mode, the complete message remains visible at a phone
width, and the CTA opens `select.supabase.com` in a new tab.
- Dismiss the www banner, then refresh the page. Confirm it stays
dismissed.
- Open any `/project/{ref}` route in the Dashboard preview. Confirm the
Select card appears in the bottom-right Banner Stack behind
higher-priority notices.
- Dismiss the Dashboard card, navigate to another project page, and
confirm it stays dismissed.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added a time-limited Select 2026 promotional banner across the website
and Studio.
* Added responsive themed artwork, animated visuals, campaign messaging,
and an external “Apply to attend” CTA.
* Banner dismissal preferences are saved and respected across visits.
* Promotion automatically disappears after the campaign ends.
* **Accessibility**
* Improved announcement dismissal controls with semantic buttons and
accessible labels.
* Added reduced-motion support for promotional artwork.
* **Bug Fixes**
* Improved product-card loading effects to prevent hydration
inconsistencies.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
||
|
|
3b06c6c7cc |
fix(docs): unify docs card hover and retire IconPanel (#48379)
## What kind of change does this PR introduce?
Bug fix / docs UI polish.
## What is the current behavior?
- Many docs `GlassPanel`s use `background={false}`, so hover only tweaks
the border and reads as having no hover state
- Compact icon+label grids still use `IconPanel`, which has a broken
`-z-10` hover fill and overlaps with the newer `IconLink` pattern
- Description card grids jump to 3-up too early on medium widths
## What is the new behavior?
**GlassPanel**
- Removes the `background` prop; cards always use the filled surface
with stronger border hover
- Tightens icon→description gap (`gap-6` → `gap-3`)
- Decorative icons/logos use empty `alt` so screen readers don’t hear
the title twice
**Icon tiles**
- Retires `IconPanel` from docs and deletes it from `ui-patterns`
- Uses `IconLink` / `IconLinkList` for compact navigation tiles (auth
providers, social login, etc.)
- Adds `IconLinkButton` for SMS provider pickers (same chrome, opens a
dialog)
- Adds focus styles, list labelling, and dialog-trigger ARIA where
needed
**Layout / content**
- Migrate-to-Supabase description cards on resources use `GlassPanel`
(not slim icon tiles)
- Grid spans use `md:… xl:…` so cards stay 2-up until ~1280px
- Fixes migrate links to `/guides/platform/migrating-to-supabase/…` and
SSR quickstarts to `creating-a-client` with framework query params
- Moves the Extensions list `key` onto the outer `Link`
| Before | After |
| --- | --- |
| <img width="1185" height="1323" alt="Resources Supabase Docs"
src="https://github.com/user-attachments/assets/1677bf65-d3a3-4202-8c70-e758f7c3bcce"
/> | <img width="1185" height="1323" alt="Resources Supabase Docs"
src="https://github.com/user-attachments/assets/51760f0f-62b6-4010-9841-de26039f37b4"
/> |
## Additional context
Homepage compact sections already use `IconLinkList` from #48317; this
PR finishes that pattern for remaining docs `IconPanel` callsites and
cleans up GlassPanel hover.
`www/customers` only drops the removed `background` prop; those cards
already use the filled surface via `logo`.
## Test plan
- [ ] `/guides/getting-started`: GlassPanels show filled surface and
clearer border hover
- [ ] `/guides/resources`: migrate cards are GlassPanels with working
`/platform/…` links; 2-up until xl
- [ ] `/guides/auth/social-login` and auth providers partial: IconLink
tiles hover/focus correctly
- [ ] `/guides/auth/phone-login`: SMS provider buttons open dialogs;
keyboard focus works
- [ ] Docs homepage: migrate / self-host IconLinkLists unchanged in
behaviour
- [ ] `/guides/auth/server-side`: Next.js / SvelteKit cards resolve on
docs preview
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Improved Layouts**
* Made “GlassPanel” card grids more responsive and consistent; refined
card and success badge spacing for a cleaner presentation.
* **Updated Documentation**
* Refreshed multiple guide and resource pages (including quickstarts and
migration content) with standardized card layouts and updated link
destinations.
* **Component Updates**
* Standardized “GlassPanel” styling (background toggle removed) and
simplified icon-based panels; added an `IconLinkButton` for action
tiles; updated authentication provider grids to use the shared tile UI.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
||
|
|
6b14df7724 |
chore: Bump vulnerable deps (#48387)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated Next.js, PostCSS, and tar package versions. * Added the required TypeScript native tooling where needed. * Refined package configuration and dependency ordering across the project. * Removed an unused empty dependency configuration. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
37dded67d1 |
feat: unify SkipToContent across studio, docs, www, and design-system (#48314)
## What kind of change does this PR introduce? Feature / a11y polish ## What is the current behavior? Studio and Docs each had their own skip-to-content link (different styling and behaviour). www and design-system had none. ## What is the new behavior? Shared `SkipToContent` in `ui-patterns`, adopted by Studio, Docs, www, and design-system. Documented as a fragment with a short note under Accessibility → Jumping ahead. Tab once to reveal the button (top-left), Enter to jump to a content-only `<main>`. | After | | --- | | <img width="836" height="324" alt="CleanShot 2026-07-24 at 14 08 47@2x" src="https://github.com/user-attachments/assets/6df29452-e53a-4eca-8f64-946f2b9f605d" /> | ## To test Shared steps for every app: enable Tab key navigation if needed, load the preview, press **Tab** once — skip button should slide in top-left. Press **Enter** — focus jumps to main content (no blue ring on `<main>`). Press **Tab** again — first interactive control in the page body, not the sidebar/nav. Hover the skip button — solid fill, clear hover state, no chrome showing through. - **Studio** — [preview](https://studio-staging-git-dnywh-featskip-to-content-supabase.vercel.app) → sign in → any project page - **Docs** — [preview](https://docs-git-dnywh-featskip-to-content-supabase.vercel.app) → any docs page with sidebar - **www** — [preview](https://zone-www-dot-com-git-dnywh-featskip-to-content-supabase.vercel.app) → homepage or any marketing page with the default nav - **Design system** — [preview](https://design-system-git-dnywh-featskip-to-content-supabase.vercel.app) → any docs page (confirm Tab from content does **not** walk the sidebar), plus [Skip to Content fragment](https://design-system-git-dnywh-featskip-to-content-supabase.vercel.app/docs/fragments/skip-to-content) ## Additional context Follow-up to #47694 / #48303 (Studio) and #47515 (Docs). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added a reusable “Skip to content” accessibility link across key layouts and pages. - Updated main landmarks to support keyboard focus and skip-link navigation (`id="main"`). - **Accessibility** - Skip links now follow consistent landmark-target conventions and remain hidden until focused. - Improved documentation for skip links/jump shortcuts in persistent chrome layouts. - **Documentation** - Added a dedicated Skip to Content fragment, navigation entry, and expanded accessibility guidance. - Updated button description wording in component docs. - **Tests** - Added component tests for SkipToContent. - **Chores** - Exposed SkipToContent via additional public package entry points. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
ca2b50a0a7 |
chore(ui-patterns): collapse the admonition shim into ui-patterns/Admonition (#48377)
Follow-up to #48344: collapses the two resolution paths for the Admonition module into one. `src/admonition.tsx` was a back-compat shim re-exporting `src/Admonition/`. Two ways to resolve one module is exactly what produced the macOS self-import bug fixed in #48344, and the local typecheck errors that #48374 worked around. This removes the shim and standardizes on the PascalCase subpath, matching every other export in the package. **Changed:** - Codemodded all 246 `ui-patterns/admonition` imports to `ui-patterns/Admonition` (240 `.tsx`, 5 `.mdx`, 1 `.ts` across studio, docs, www, design-system, and lite-studio) - Pointed the 5 internal `'../admonition'` imports back at the `'../Admonition'` directory **Removed:** - `packages/ui-patterns/src/admonition.tsx`, and its `./admonition` entry in the exports map (regenerated with `pnpm gen:exports`) ## To test - `grep -r "ui-patterns/admonition" --include='*.ts*'` → no hits - `pnpm test:case-hazards` → passes - `pnpm typecheck` → all 15 tasks green - `pnpm --filter studio run lint:ratchet` → passes - `pnpm --filter ui-patterns vitest run src/Admonition` → 11 tests pass <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Standardized Admonition component imports across the application and documentation. * Improved compatibility with case-sensitive environments by using the canonical component path. * Removed the legacy Admonition import entry point. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
2b27ed0ab1 |
fix(docs) Improve a11y for Admonitions with file refactor (#48112)
Closes FE-3914 ## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## Problem On screenreader, I found that the Admonition was not behaving as it should: - There was no way on screenreader to tell what type of note I was seeing - I could not tell when a note began or ended. - The screenreader also read aloud an 'image' icon without knowing what it was. - Notes with titles were an `h5`, breaking header hierarchy structures. ## Solution This PR does several things to resolve the issue: - Adds `aria-hidden` to all icons. Instead of duplicating code, I refactored the icons into a Base Icon and moved Admonitions into its own folder. - ~Adds a text label for each of the notes. For example, "**Note:**". This is a standard practice in other documentation. If there is a title, it is added there. Otherwise, it's added to the description.~ Change reverted from design feedback. - ~Adds `role='note'` and `aria-label` to the Admonition. While `<aside>` is recommended semantic HTML, the base UI element does not allow for that change.~ This will be done in a follow-up for docs only. - Refactors Admonition into a folder with files so that it is more readable - Removes `h5` by default with a new prop to declare a header Additionally adjusts the icon so that it aligns with text better. ## Testing 1. Open documentation preview 2. Navigate to any guide and see its admonition. Compare to live. You can also see the Design System: https://design-system-git-a11y-docs-admonition-supabase.vercel.app/design-system/docs/fragments/admonition 3. See the icon position is in line with the text. 4. See the text label. 5. Use a screenreader like Voiceover on the admonition. Hear that it is clearly defined. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary by CodeRabbit - **New Features** - Added the Admonition UI pattern with support for `type`, `layout`, `title`/`description`, optional actions, and configurable icons. - Expanded Admonition’s public export surface with dedicated subpath entry points and icon/type exports. - **Bug Fixes** - Standardized Admonition import path casing across related components. - **Documentation** - Updated design system examples to use `type="warning"` instead of `variant="warning"`. - **Tests** - Added/updated the Admonition test coverage and removed the legacy test file. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com> |
||
|
|
24ce0ba5f8 |
chore: migrate repo to pnpm v11 (#48033)
## 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? Chore / dependency tooling update. ## What is the current behavior? The repo is pinned to pnpm 10.24.0. Closes https://linear.app/supabase/issue/FE-3673/migrate-the-repo-to-use-pnpm-v11. ## What is the new behavior? The repo is pinned to pnpm 11.13.1, pnpm v11 workspace settings are migrated to `allowBuilds`, and the Studio Dockerfile installs pnpm 11.13.1. ## Additional context Validated with `CI=true mise exec node@22 -- pnpm install --frozen-lockfile`, `mise exec node@22 -- pnpm run typecheck`, and `mise exec node@22 -- pnpm run lint`; full Prettier check still fails on existing generated docs/router files outside this migration. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated tooling requirements (pnpm **11.13.1**, Node **>=22.13**) and aligned container build tooling accordingly. * Adjusted package manager behavior (scoped registry override, update notifications disabled) and workspace build/engine validation settings. * **Maintenance** * Updated `clean` scripts across apps/packages to remove only build/cache artifacts (no longer delete installed dependencies). * Reduced Turbo `clean` task output to **errors-only** for cleaner logs. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
a3f2c4ffc1 |
chore(deps): upgrade to TypeScript 7 (native compiler) (#47757)
Upgrades the monorepo to TypeScript 7.0.2, released 2026-07-08. `tsc` is now the native Go compiler ([announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/)) — full turbo typecheck drops from ~56s to ~19s locally. TS 7.0 ships **without a programmatic API** (it lands in 7.1), so this uses Microsoft's recommended side-by-side setup: the `typescript` name resolves to `@typescript/typescript6` (the 6.0 API republished) for API consumers — typescript-eslint and Next.js build typechecking — while `@typescript/native` (the real `typescript@7.0.2`) owns the `tsc` bin that typecheck scripts run. Exactly one version of each is in the lockfile; nothing imports the native package as a library. When 7.1 + tool support lands we can collapse back to a single `typescript` dep in the catalog. **Changed:** - `pnpm-workspace.yaml`: catalog aliases for `typescript` / `@typescript/native` - 17 package.json files: `@typescript/native` added beside each `typescript` dep so every package's `tsc` is the native binary - `apps/studio/tsconfig.json`: exclude `dist/` (gitignored build output) from typechecking **Fixed** (real type errors TS 6 under-reported): - `packages/ui-patterns` CodeBlock: `borderLeft: null` → `undefined` (`CSSProperties` doesn't accept null) - `apps/www` CodeBlock: removed a JSX `@ts-ignore` comment that tsgo doesn't honor and fixed what it masked (untyped `.js` theme objects, possibly-undefined highlighter children) ⚠️ **Merge timing:** the new packages are inside pnpm's 3-day `minimumReleaseAge` window until ~July 11. Installs from the committed lockfile are unaffected (resolution is skipped), but anything that forces a re-resolution before then will fail — hold off merging until the window passes. Note for editors: the compat package has no `lib/tsserver.js`, so VS Code's "Use Workspace Version" won't work — use the bundled TS or the TypeScript Native Preview extension. ## To test - `pnpm install && pnpm typecheck` — all 15 tasks green, and `./node_modules/.bin/tsc --version` prints 7.0.2 - `pnpm lint --filter=studio` — typescript-eslint still parses (resolves the 6.0 API) - `pnpm build --filter=design-system` (or any Next app) — Next's tsconfig validation and build typecheck still work - CodeBlock rendering on www (syntax highlighting, line highlights with/without border) — the two fixes are behavior-neutral but worth an eyeball <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Improvements / New Features** * Enhanced TypeScript tooling support across the workspace for smoother development builds and checks. * **Bug Fixes** * Code blocks render more reliably when content is empty or missing. * Highlighted code line styling applies more consistently. * **Maintenance** * Studio TypeScript builds now avoid including generated output (such as `dist`) during compilation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com> |
||
|
|
4b7cb27ba9 |
chore: refactor docs tabs (#47557)
## Problem Now that `docs` is the only place where we use the deprecated `ui/Tabs`, we can move this component and the related HOC from `ui-patterns` in `docs` ## Solution - Move `ui/Tabs`, `ui-patterns/ComplexTabs/withQueryParams` and `ui-patterns/ComplexTabs/withSticky` to `docs` - Refactor `ui-patterns/ComplexTabs/withQueryParams` and `ui-patterns/ComplexTabs/withSticky` HOCs as hooks to make them easier to understand - Refactor `Tabs` accordingly No visual nor functional changes. ## How to test On https://docs-git-chore-refactor-docs-tabs-supabase.vercel.app/docs/guides/auth/passwords (Tabs are driven by URL and the flow tabs should have sticky headers even though there's a CSS bug already reported) - check that by default, the first tab in each tabs is active - change the tabs in different groups and validate it works - refresh the page and check that previously selected tabs are active (URL based selection) - In a new tab, visit https://docs-git-chore-refactor-docs-tabs-supabase.vercel.app/docs/guides/auth/passwords again and check that previously selected tabs are active (LocalStorage based selection) Do the same on https://docs-git-chore-refactor-docs-tabs-supabase.vercel.app/docs/guides/database/database-advisors (This one is driven by URL but does not have sticky tab headers) Do the same on https://docs-git-chore-refactor-docs-tabs-supabase.vercel.app/docs/guides/deployment/terraform/reference (this one is not driven by URL nor has sticky tab headers) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Docs tabs now persist and restore the active tab via URL query parameters. * Added optional “sticky” tab behavior that keeps the active panel in view. * Enhanced keyboard interaction for selecting tabs. * **Bug Fixes** * Improved active-tab initialization and synchronization when the URL query changes. * **Chores** * Refreshed the tabs UI implementation and styling to improve consistency and remove deprecated tab exports from shared UI packages. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
c41e2835e3 |
chore: UI theme cleanup (#47519)
## Problem - We still use/maintain the legacy theming even though we moved to Shadcn - We have two themes list with similar code ## Solution - Migrate some components to `cva` and `cn` instead of `styleHandler` - Remove redundant `themes` in favor of `singleThemes` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Standardized theme selection across the app so theme menus consistently offer the same light/dark/system options, including dropdowns, navigation menus, and command menus. * **Refactor** * Refreshed styling for multiple shared UI components (menus, tabs, side panels, loading indicators, icons, and modal dialogs) to improve consistency while preserving visual behavior. * **Chores** * Improved the UI patterns CI “validate exports” check for clearer failure output when exports change unexpectedly. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
74881cbb73 |
feat: render the mcp config component as markdown (#47292)
Renders the MCP config component as markdown for static markdown builds. Currently we have no special case for `<McpConfigPanel />`, so it gets stripped out during markdown rendering. This adds a static markdown version of this component that renders all agents/tools consecutively. Adds a new `McpConfigPanel.md.tsx` component that reuses data structures used by `McpConfigPanel.tsx` but renders as markdown instead of React. Instead of building the markdown via string concatenation, we use [supabase-community/mdast-jsx](https://github.com/supabase-community/mdast-jsx) which allows you to author markdown using JSX (providing type safety, better DX, maintainability). E.g. ```jsx <code lang="json" value='{ "key": "value" }' /> ``` produces: ````md ```json { "key": "value" } ``` ```` ## Preview https://docs-git-feat-mcp-config-markdown-supabase.vercel.app/docs/guides/ai-tools/mcp.md <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary by CodeRabbit - **New Features** - Added a docs-only MCP configuration panel with client-specific setup steps, deep links, and generated configuration snippets. - Enhanced guide generation to render richer, component-produced markdown content. - **Bug Fixes** - Improved MCP config serialization and display for consistent JSON/YAML/TOML output. - **Refactor** - Centralized MCP client metadata, instruction content, and config build/serialization logic for reuse. - **Chores** - Expanded package exports for MCP URL builder assets and utilities; improved runtime code-block language validation and updated PNG asset typing. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com> Co-authored-by: Chris Chinchilla <chris.ward@supabase.io> |
||
|
|
70c3bafe63 |
chore: CSS cleanup (#47443)
## Problem - We have unused CSS from previous design system (`.sbui-*` classes) - We use Tailwind `@apply` when we could set the tailwind classes on the components directly ## Solution - Delete all `.sbui-*` classes as we don't use them anymore - Move classes directly on components when that make sense ## Notes I did not migrate all `sbgrid` classes as they are applied in multiple components <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Updated grid editors, placeholders, headers, and dropdowns for cleaner spacing, truncation, and alignment. * Improved layout consistency across text, number, time, JSON, and foreign-key cells. * Adjusted search and impersonation inputs for better fit and padding. * **Chores** * Simplified and removed outdated styling overrides across the Studio and web app. * Reduced unused UI package surface by removing an unused input icon container export. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
0361d1b727 |
chore: Remove CDN loading for the Monaco editor in all environments (#47182)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Standardized Monaco Editor package versions across the workspace using the shared dependency catalog. * **Bug Fixes** * Improved Monaco initialization by configuring asset loading only on the client and serving Monaco assets from a single base-path URL (removing platform-specific switching). * Streamlined Monaco stylesheet injection in Studio’s document rendering. * **New Features** * Added/updated Monaco language support in Studio, including GraphQL, SQL, and PostgreSQL, with refreshed HTML, JSON, and CSS editor modes. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
b30db91d71 |
chore: cleanup UI patterns exports (#47406)
## Problem We now export components under a subpath in ui-patterns to avoid barrel files as they slow down every tools (from IDE to linters, etc.) and may also affect bundles our users have to download. ## Solution - Remove the UI patterns index file - Fix invalid impors |
||
|
|
9eab4f8fbf |
build(studio): Vite/TanStack-Start build pipeline behind flag (stack 1/6, from #46424) (#47107)
**Stack 1/6** of the TanStack Start migration (#46424), split into reviewable, independently-mergeable PRs. > [!IMPORTANT] > **Next stays the default and only active framework after this PR.** This wires up the Vite/TanStack-Start build pipeline behind the `STUDIO_FRAMEWORK` flag, but there are no TanStack routes yet — so the TanStack build isn't functional or tested until later PRs in the stack. Nothing about the Next build, dev, or deploy changes behaviourally here. ## What's in this PR - **Dispatch:** `dev`/`build`/`start` now go through `scripts/dispatch.js`, which runs the Next variant unless `STUDIO_FRAMEWORK=tanstack`. The original commands are preserved as `dev:next`/`build:next`/`start:next`. - **Build pipeline:** `vite.config.ts`, `serve.js`, `smoke-server.mjs`, vite/tanstack deps, `turbo.jsonc`. - **`tsconfig.json`:** `jsx: react-jsx`, `moduleResolution: Bundler`, `target: ES2022`. Because `include` is `**/*.ts(x)`, this re-typechecks the whole app, so the companion adaptations below land with it. - **Shared adaptations (companions to the tsconfig change):** `BufferSource` casts, `packages/ui` unused-`React` import removals, etc. - **Routing/middleware plumbing:** `next.config.ts` + `redirects.shared.ts` (redirect rules now shared with `vercel.ts`), `proxy.ts`/`start.ts` middleware + `hosted-api-allowlist.ts`. ## Verification Run locally off `master`: frozen install ✓, `studio` typecheck ✓, **Next build ✓** (compiles + generates all routes), lint ratchet ✓ ("some rules improved"), prettier ✓. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a hosted API endpoint allowlist to return 404 for non-supported `/api/*` routes. * Introduced a TanStack route-migration checklist and expanded TanStack Start routing support. * **Improvements** * Enhanced deployment refresh/detection by tightening cookie handling for “latest deployment” updates. * Centralized redirect/maintenance-mode rules for consistent platform vs self-hosted behavior. * Improved production serving with a dedicated static + proxy server and a post-build smoke test. * **Dependencies** * Updated TanStack-related packages and React Table/query tooling versions. * **Documentation / Chores** * Updated formatting and tooling config; added shared build environment parsing utilities. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com> |
||
|
|
093ed8f610 |
introduce DatePicker (#46837)
## Problem The date picker pattern we currently have: - requires developers add classes and props themselves to get the expected result. This is cumbersome and prone to error. - does not visually convey the field invalid state like inputs do <img width="702" height="256" alt="image" src="https://github.com/user-attachments/assets/cacd6414-6789-42e3-8d06-88e44fd9fe0a" /> ## Solution Introduce a new `DatePicker` _UI pattern_ that wraps the `Popover` and `Button` components to ease the most common scenarios while still allowing full customization <img width="699" height="250" alt="image" src="https://github.com/user-attachments/assets/e80f842c-28b2-4a4f-b316-c2005e771912" /> ## Component usage Note how we manually pass the `isInvalid` prop to the `<DatePickerButton>` to avoid relying on `react-hook-form` contexts which would make the date picker unusable outside RHF forms. Alternative would be to also have a `<DatePickerInput>` that could be used instead of `<DatePickerButton>` when inside an RHF form. ```tsx <FormField control={form.control} name="expiryDate" render={({ field, fieldState }) => ( <FormItemLayout layout="horizontal" label="Date Picker" description="Date selection with calendar popover" > <FormControl className="col-span-6"> <DatePicker> <DatePickerTrigger asChild> <DatePickerButton isInvalid={fieldState.invalid}> {field.value ? format(field.value, 'PPP') : 'Pick a date'} </DatePickerButton> </DatePickerTrigger> <DatePickerContent> <Calendar mode="single" selected={field.value} onSelect={field.onChange} initialFocus /> </DatePickerContent> </DatePicker> </FormControl> </FormItemLayout> )} /> --------- Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com> |
||
|
|
55ee3e0f2c |
feat(ui-patterns): add CollapsibleCardSection component (#46250)
## What kind of change does this PR introduce? New shared component + docs. ## What is the current behavior? `AdvancedConfiguration` and `InternalOnlyConfiguration` in the New Project form each contain bespoke `<Collapsible>` markup. There's no reusable collapsible section component available to other card/panel forms. ## What is the new behavior? - Extracts a shared `CollapsibleCardSection` into `packages/ui-patterns`, exported via `ui-patterns/CollapsibleCardSection` - Refactors `AdvancedConfiguration` and `InternalOnlyConfiguration` to use it - Adds design system docs with a live demo at `/docs/fragments/collapsible-card-section` This is a prereq for #45707 and #46187, which both consume this component. | Example Usage | | --- | | <img width="1464" height="500" alt="CleanShot 2026-05-22 at 15 20 38@2x" src="https://github.com/user-attachments/assets/5b88ef8d-3f9a-4454-b246-5bbaf53e027a" /> | ## To test - [ ] Check that [the Design System page](https://design-system-git-dnywh-collapsible-card-section-supabase.vercel.app/design-system/docs/fragments/collapsible-card-section) makes sense - [ ] Check that the [new project form](https://studio-staging-git-dnywh-collapsible-card-section-supabase.vercel.app/dashboard/new/) collapsible sections work as expected <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **New Features** * Introduced CollapsibleCardSection component as a reusable UI pattern for collapsible card-based content with customizable title, description, and open state. * Refactored project configuration interfaces to use the new component for improved visual consistency. * **Documentation** * Added comprehensive documentation with interactive examples and multiple usage patterns for CollapsibleCardSection. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46250?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Joshen Lim <joshenlimek@gmail.com> |
||
|
|
f0afc5948b |
page layout patterns (#46126)
Adjusts layout / page patterns including design system documentation and page components. <img width="937" height="643" alt="image" src="https://github.com/user-attachments/assets/5f7864a3-04ae-4ccf-b2b8-d9fe5e29554e" /> **To test** - Ensure all existing page types in Studio are un-effected. They shouldn't be since existing components aren't touched. - Run design-system and have a read through layout and page header documentation. Make sure you understand when and where to use the various combinations of page components and their variants. **Next** Once we are happy with these patterns we can gradually start to update Studio pages that make use of breadcrumbs and/or sub navigation. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added PageBreadcrumbs and PageNav page chrome * Several new interactive layout examples (Auth Emails, Edge Functions, Full‑Width, Logs) and demo pages * **Documentation** * New docs for PageBreadcrumbs and PageNav * Reworked layout guidance and patterns; updated fragment/example docs and usage notes * **Improvements** * Component preview now supports explicit padding control * Simplified page header demo and updated previews <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46126?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
224dbb09bb |
chore: rename CommandMenu internal components to avoid conflicts with base shadcn ones (#45996)
## Problem The `ui-patterns/CommandMenu` exposes internal components that have the same names as the base shadcn components they wrap. This create confusion about which one to use and forces us to expose the base ones with the `_Shadcn_` suffix. ## Solution Rename those internal components to have `CommandMenu` in their names to make it clearer they are meant to be used with `CommandMenu`. We will then rename the shadcn base ones to remove the suffix. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Refactor * Standardized Command Menu component naming across the design system for improved consistency and clarity. Updated component names: `CommandInput` → `CommandMenuInput`, `CommandList` → `CommandMenuList`, `CommandItem` → `CommandMenuItem`, `CommandEmpty` → `CommandMenuEmpty`, and `CommandGroup` → `CommandMenuGroup`. Updated public API exports, internal subpath references, all examples within the registry, and implementations across documentation, studio, and application interfaces. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/45996) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
09fa2b8fc1 |
Clarify alert and collapsible design-system patterns (#45863)
## What kind of change does this PR introduce? Docs update and design-system component taxonomy cleanup ## What is the current behavior? The design-system docs conflate low-level shadcn primitives with product-level alert patterns. Collapsible documentation previews the alert-specific wrapper, and the alert/collapsible relationship is unclear ## What is the new behavior? - Documents Alert and Collapsible as low-level atom components - Moves the alert-styled expandable wrapper into `ui-patterns/expandable-alert` as `ExpandableAlert` - Documents Expandable Alert as a Fragment Component next to Admonition - Updates the Session Timeout modal to import `ExpandableAlert` from `ui-patterns/expandable-alert` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * `CollapsibleAlert` component is now available for alert-styled expandable content. * **Documentation** * Updated component documentation to clarify when to use `Alert`, `Collapsible`, `Admonition`, and `CollapsibleAlert`. * Added comprehensive documentation for `CollapsibleAlert` with usage examples and variant options. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/45863) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Gildas Garcia <1122076+djhi@users.noreply.github.com> |