mirror of
https://github.com/supabase/supabase.git
synced 2026-09-22 13:37:53 +08:00
a31ca2bad0
## What kind of change does this PR introduce? Bug fix and design-system update. Resolves DEPR-316. Follow-up rename (`text-brand` → `text-primary`) is in a dedicated PR (https://github.com/supabase/supabase/pull/50564) stacked on this one. ## What is the current behavior? `text-brand` resolves to the canonical bright brand green in places that need readable text, which fails WCAG AA on light surfaces. A separate `text-brand-display` token adds another green for large type. ## What is the new behavior? - `text-brand` maps to accessible `--primary` (light mode darkened to meet ~4.5:1 AA) - `--hue` / `--primary-hue` aligned to 157.5 - `text-brand-display` removed; former display callsites use `text-brand` - Bright fills/borders stay on `brand-default` - Design-system colour and typography docs updated | Before | After | | --- | --- | | <img width="514" height="112" alt="CleanShot 2026-09-02 at 11 13 09@2x" src="https://github.com/user-attachments/assets/4e0138a9-a32d-4e4c-a426-90736706e1e7" /> | <img width="512" height="138" alt="CleanShot 2026-09-21 at 11 42 05@2x" src="https://github.com/user-attachments/assets/164cc5b1-a0c5-4e93-95f1-80016641a114" /> | | <img width="864" height="266" alt="CleanShot 2026-09-02 at 11 13 53@2x" src="https://github.com/user-attachments/assets/3c1ca53f-bf9e-431e-bc15-816b4a275b8e" /> | <img width="882" height="248" alt="CleanShot 2026-09-21 at 11 41 37@2x" src="https://github.com/user-attachments/assets/24828e7b-ed6b-44cb-b9dc-becc3398bdfc" /> | | <img width="782" height="692" alt="CleanShot 2026-09-02 at 11 16 30@2x" src="https://github.com/user-attachments/assets/fc871977-77bc-47fb-9e0e-9284e0ecd5cc" /> | <img width="730" height="690" alt="CleanShot 2026-09-21 at 11 42 52@2x" src="https://github.com/user-attachments/assets/bf479515-d5f9-471e-b82d-f097c0f4b56c" /> | | <img width="480" height="306" alt="CleanShot 2026-09-02 at 11 18 53@2x" src="https://github.com/user-attachments/assets/03f341f4-f02e-44f8-a2b2-8c31670d0427" /> | <img width="470" height="300" alt="CleanShot 2026-09-21 at 11 43 19@2x" src="https://github.com/user-attachments/assets/9df18217-d5e6-48b8-ba0b-579d2664b94b" /> | | <img width="960" height="300" alt="CleanShot 2026-09-02 at 11 32 04@2x" src="https://github.com/user-attachments/assets/6b1d9373-7a71-4247-81ff-26441604b09d" /> | <img width="980" height="306" alt="CleanShot 2026-09-21 at 11 44 13@2x" src="https://github.com/user-attachments/assets/41ad4784-02ec-4b29-b860-32af9fa79aa8" /> | | <img width="924" height="214" alt="CleanShot 2026-09-02 at 11 34 44@2x" src="https://github.com/user-attachments/assets/1de661fe-c7b6-499b-a94f-e4737436ec79" /> | <img width="752" height="162" alt="CleanShot 2026-09-21 at 11 44 56@2x" src="https://github.com/user-attachments/assets/1811890f-0660-4445-84e9-447720954fa1" /> | ## To test Test each callsite **in light mode** (dark mode is largely unchanged). ### WWW - [Homepage](https://zone-www-dot-com-git-dnywh-depr-316-brand-text-tokens-supabase.vercel.app/): “Scale to millions” uses readable brand text (display token is gone) - [Careers](https://zone-www-dot-com-git-dnywh-depr-316-brand-text-tokens-supabase.vercel.app/careers): small “Careers” eyebrow readable; green dividers stay bright `brand-default` - [Contact](https://zone-www-dot-com-git-dnywh-depr-316-brand-text-tokens-supabase.vercel.app/contact-us): email / policy links use readable brand text - [Regions](https://zone-www-dot-com-git-dnywh-depr-316-brand-text-tokens-supabase.vercel.app/regions): “Ask about early access to BYOC” readable ### Docs - [Docs homepage](https://docs-git-dnywh-depr-316-brand-text-tokens-supabase.vercel.app/docs): “DOCS” wordmark and resource links readable - [Database overview](https://docs-git-dnywh-depr-316-brand-text-tokens-supabase.vercel.app/docs/guides/database/overview): nav / footer brand links readable - [JavaScript reference](https://docs-git-dnywh-depr-316-brand-text-tokens-supabase.vercel.app/docs/reference/javascript/introduction): active sidebar treatment readable ### Design system - [Typography](https://design-system-git-dnywh-depr-316-brand-text-tokens-supabase.vercel.app/docs/typography): documents `text-brand` only (no display) - [Colour usage](https://design-system-git-dnywh-depr-316-brand-text-tokens-supabase.vercel.app/docs/color-usage): `text-brand` vs `bg-brand-default` - [Design-system homepage](https://design-system-git-dnywh-depr-316-brand-text-tokens-supabase.vercel.app/): brand text examples across themes ### Studio - [Auth providers](https://studio-staging-git-dnywh-depr-316-brand-text-tokens-supabase.vercel.app/dashboard/project/_/auth/providers): enabled provider badge text readable; status dot stays bright - [Database policies](https://studio-staging-git-dnywh-depr-316-brand-text-tokens-supabase.vercel.app/dashboard/project/_/database/policies?new=true): template hover text more legible - [Database connections](https://studio-staging-git-dnywh-depr-316-brand-text-tokens-supabase.vercel.app/dashboard/project/_/observability/connections): “Live” status readable; animated dot stays bright green --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
153 lines
9.2 KiB
YAML
153 lines
9.2 KiB
YAML
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
|
|
|
|
# Don't inherit organization-level settings (they're tuned for other repos);
|
|
# this config is self-contained and unset values use CodeRabbit defaults.
|
|
inheritance: false
|
|
|
|
# Enrich linked issues with related code and potential solutions during review.
|
|
issue_enrichment:
|
|
auto_enrich:
|
|
enabled: true
|
|
|
|
reviews:
|
|
# Skip machine-generated / vendored files (mirrors .prettierignore). Keeps
|
|
# reviews focused on hand-written code and preserves rate-limit budget on
|
|
# large codegen diffs.
|
|
path_filters:
|
|
- '!pnpm-lock.yaml'
|
|
- '!packages/api-types/types/**' # generated API types (api.d.ts, platform.d.ts)
|
|
- '!supabase/functions/common/database-types.ts' # generated by `pnpm generate:types`
|
|
- '!**/routeTree.gen.ts' # TanStack Router generated
|
|
- '!**/__generated__/**'
|
|
- '!apps/docs/features/docs/generated/**'
|
|
- '!apps/www/.generated/**'
|
|
- '!apps/design-system/__registry__/**'
|
|
- '!apps/ui-library/__registry__/**'
|
|
- '!apps/ui-library/public/r/**' # registry output
|
|
- '!packages/icons/__registry__/**'
|
|
- '!packages/icons/src/icons/**' # generated icon components
|
|
|
|
# Targeted, path-scoped review guidance, version-controlled alongside the code.
|
|
path_instructions:
|
|
- path: 'packages/common/telemetry-constants.ts'
|
|
instructions: |
|
|
Strictly enforce event naming: [object]_[verb] in snake_case. Only approved
|
|
verbs: opened, clicked, submitted, created, removed, updated, retrieved,
|
|
intended, evaluated, added, enabled, disabled, copied, exposed, failed,
|
|
converted. Properties must be camelCase for new events (match existing
|
|
convention when adding to existing events). Flag any usage of
|
|
useSendEventMutation. Verify @group Events and @source JSDoc tags are
|
|
accurate. Check that new interfaces are added to the TelemetryEvent union type.
|
|
- path: 'apps/studio/components/**/!(*.test).tsx' # production components only, not tests
|
|
instructions: |
|
|
Only suggest adding PostHog event tracking (via useTrack from
|
|
lib/telemetry/track, [object]_[verb] snake_case) when a new user-facing
|
|
interaction is growth-relevant: e.g. first-use of a feature, onboarding steps,
|
|
project/org creation, upgrade/billing actions, enabling or disabling a product
|
|
feature, or any action that signals activation or retention. Do not suggest
|
|
tracking for: passive views, page loads, UI-only state changes (e.g. expanding
|
|
a panel, switching tabs in a settings page), developer/internal tooling
|
|
interactions, or interactions clearly unrelated to product adoption.
|
|
- path: 'apps/studio/pages/**'
|
|
instructions: |
|
|
Studio is mid-migration from the Next.js pages router (apps/studio/pages/**)
|
|
to TanStack Start (apps/studio/routes/**). Both runtimes ship side-by-side, so
|
|
every URL served from pages/** has a mirror in routes/**. See
|
|
apps/studio/TANSTACK_MIGRATION.md for the full route map and strategy.
|
|
Leave a comment reminding the author to check whether this change needs to be
|
|
mirrored into the corresponding apps/studio/routes/** file so the two builds
|
|
don't silently drift:
|
|
- Most route files re-export the page's default export (Path A), so pure
|
|
page-body edits propagate automatically — no mirror needed.
|
|
- A mirror IS needed when the change touches something the route file
|
|
duplicates rather than imports: getLayout / layout wrapping, page title or
|
|
other props the route encodes as staticData, withAuth / auth gating, or the
|
|
route/redirect path itself.
|
|
- A brand-new page under pages/** needs a matching new route under routes/**
|
|
(and a checklist entry in apps/studio/TANSTACK_MIGRATION.md).
|
|
- Do NOT suggest deleting the pages/** file — the Next file stays load-bearing
|
|
for both runtimes until the final cleanup pass (tracked in FE-3106).
|
|
Keep this a reminder to verify, not a hard blocker: if no mirror is required,
|
|
say so briefly rather than forcing a change.
|
|
- path: 'apps/docs/content/**/*.mdx'
|
|
instructions: |
|
|
Flag style, terminology, and structure issues as usual. When a page has two or
|
|
more of them, add one comment pointing the author at the `/write-the-docs` skill
|
|
for new content or `/edit-the-docs` for an existing page (canonical files in
|
|
`.agents/skills/`); both apply apps/docs/CONTRIBUTING.md and
|
|
apps/docs/WORD_LIST.md. Skip that pointer on a single issue, so it stays a
|
|
signal that the author isn't using the skills rather than boilerplate.
|
|
- path: '{apps,packages}/**/*.{tsx,jsx,css,mdx}'
|
|
instructions: |
|
|
When reviewing UI changes, flag these accessibility gaps. Comments are
|
|
advisory. One comment per gap. Skip test files (*.test.*, *.spec.*) and
|
|
generated files. Skip Radix/shadcn primitives imported from ui for all
|
|
checks below. Do not flag issues axe-core already catches mechanically,
|
|
such as a missing alt attribute, an empty button or link name, or
|
|
invalid ARIA.
|
|
- State changes: if sighted users can see a status change (toast,
|
|
loading/empty swap, copy confirmation, async result) and nothing
|
|
announces it, suggest aria-live="polite" or role="status". Reserve
|
|
role="alert" for urgent errors or warnings. Skip if a live region,
|
|
Radix Toast, or Sonner is already there, or if the change is
|
|
decoration only. If a live region is created in the same conditional
|
|
as its message, flag that: the region must already exist in the DOM,
|
|
then receive the update, or screen readers often announce nothing.
|
|
- Mouse interaction: flag pointer-only handlers on a non-interactive
|
|
element (div, span, or similar) with no keyboard equivalent. The
|
|
listed handlers are illustrative: onClick, onMouseEnter,
|
|
onDoubleClick, onContextMenu, onPointerDown, onPointerUp,
|
|
onTouchStart, onTouchEnd, and equivalents. Also flag hover-only UI
|
|
(content revealed with onMouseEnter or CSS :hover) that has no focus
|
|
or keyboard path.
|
|
- Animation: flag animate-*, keyframes, or JS motion with no
|
|
reduced-motion treatment. Prefer Tailwind motion-reduce: /
|
|
motion-safe:, or matchMedia('(prefers-reduced-motion: reduce)').
|
|
packages/config/css/utilities.css only zeroes out .shimmer under
|
|
reduced motion, not all animation.
|
|
- Alt text: flag generic values such as Image, Icon, Photo, Picture, or
|
|
the filename. Flag alt that starts with "image of" or "picture of".
|
|
If adjacent visible text already names the image (blog thumbnail next
|
|
to its title, icon next to its label), flag it as redundant and
|
|
recommend alt="" plus aria-hidden on the image. For a decorative SVG
|
|
next to visible text, recommend aria-hidden on the SVG. If alt is
|
|
longer than about two sentences, suggest moving the extra into a
|
|
caption, adjacent text, or aria-describedby. Do not treat a character
|
|
count as a hard fail.
|
|
- Focus visibility: flag outline-none, outline-hidden, outline: none,
|
|
outline: 0, or equivalent :focus resets that are not paired with a
|
|
focus-visible ring or outline, or with the focus-ring or focus-inset
|
|
utility.
|
|
- Color-only state: flag status, validation, or selection that is
|
|
conveyed only by color. Suggest a text label, icon, or sr-only text
|
|
in addition.
|
|
- Link purpose: flag an accessible name that is only "click here",
|
|
"read more", or "learn more" when it does not describe the
|
|
destination. Skip if aria-label or wrapping context already names
|
|
where the link goes.
|
|
- Color contrast: flag non-large informative text below 4.5:1 and large informative
|
|
text (at least 24px regular or 18.5px bold) below 3:1. Skip logotypes and
|
|
decorative text. Treat expressive text at 40px or larger as advisory rather
|
|
than blocking.
|
|
|
|
# Applies our internal engineering skills (.agents/skills/) as CodeRabbit review
|
|
# guidelines. The skills are the single source of truth — they are consumed
|
|
# directly, with no copy of their content elsewhere.
|
|
#
|
|
# `applyTo` decouples where a guideline file lives from the code it governs.
|
|
# Without it, CodeRabbit scopes a guideline file to its own directory and below;
|
|
# our skills live in .agents/skills/, which contains no code, so they would never
|
|
# reach apps/studio. `applyTo` points them at the right paths instead.
|
|
knowledge_base:
|
|
code_guidelines:
|
|
filePatterns:
|
|
# Studio code conventions — React/TS, UI patterns, composition, data fetching, errors
|
|
- files: '.agents/skills/{studio-ui-patterns,vercel-composition-patterns,studio-queries,studio-error-handling,react-hook-form}/SKILL.md'
|
|
applyTo: 'apps/studio/**/*.{ts,tsx}'
|
|
# Studio unit / component test conventions
|
|
- files: '.agents/skills/{studio-testing,studio-mock-api-tests}/SKILL.md'
|
|
applyTo: 'apps/studio/**/*.test.{ts,tsx}'
|
|
# Studio end-to-end (Playwright) test conventions
|
|
- files: '.agents/skills/studio-e2e-tests/SKILL.md'
|
|
applyTo: 'e2e/studio/**/*.spec.ts'
|