Commit Graph

71 Commits

Author SHA1 Message Date
Ivan Vasilov 56de26fe22 chore: Migrate the monorepo to use Tailwind v4 (#45318)
This PR migrates the whole monorepo to use Tailwind v4:
- Removed `@tailwindcss/container-queries` plugin since it's included by
default in v4,
- Bump all instances of Tailwind to v4. Made minimal changes to the
shared config to remove non-supported features (`alpha` mentions),
- Migrate all apps to be compatible with v4 configs,
- Fix the `typography.css` import in 3 apps,
- Add missing rules which were included by default in v3,
- Run `pnpm dlx @tailwindcss/upgrade` on all apps, which renames a lot
of classes
- Rename all misnamed classes according to
https://tailwindcss.com/docs/upgrade-guide#renamed-utilities in all
apps.

---------

Co-authored-by: Jordi Enric <jordi.err@gmail.com>
2026-04-30 10:53:24 +00:00
Ivan Vasilov 308cd791a2 chore: Prep work for migrating to Tailwind v4 (#45285)
This PR preps the monorepo for a migration to Tailwind v4:
- Bump all Tailwind dependencies and libraries to the latest possible
version, while still compatible with Tailwind 3.
- Cleans up obsolete Tailwind 3 specific options and configs.
- Cleans up unused CSS files and fixes the CSS imports.
- Migrates all `important` uses in `@apply` lines to using the `!`
prefix.
- Move `typography.css` to the `config` package and import it from the
apps.
- Migrated all occurrences of `flex-grow`, `flex-shrink`,
`overflow-clip` and `overflow-ellipsis` since they're deprecated and
will be removed in Tailwind 4.
- Make the default theme object typesafe in the `ui` package.
- Migrate all `bg-opacity`, `border-opacity`, `ring-opacity` and
`divider-opacity` to the new format where they're declared as part of
the property color.
- Bump and unify all imports of `postcss` dependency.
2026-04-28 11:33:53 +02:00
Gildas Garcia 0facd341a6 chore: remove UI form components _Shadcn_ suffix (#45212)
## Problem

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

## Solution

- Remove the suffix
- Update all usages
2026-04-24 12:14:15 +02:00
Vaibhav bd04a59dec fix: phone provider (#44974)
fixes phone provider saves that showed success but did not persist the
enabled state
(smol regression from the refactor)


## ref:
- closes https://github.com/supabase/supabase/issues/44966

ig was introduced by 6b35cc8034


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

* **Bug Fixes**
* Automatically clears certain conditional fields when their visibility
condition becomes false to avoid stale values.
* Preserves input values and registration state for fields removed from
the UI (they no longer unregister on hide), improving form continuity
during toggles.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-17 07:22:24 -06:00
Gildas Garcia 16fd60134d chore: migrate auth providers form to zod (#44865)
## Problem

We currently have 2 libraries for schema validation: `yup` that was used
with `formik` and `zod` which is now the preferred one.

## Solution

- Migrate the auth providers form to `zod`
- Remove `yup`

No visual changes.

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

* **Bug Fixes**
* Preserve empty numeric inputs in auth provider forms to avoid
unintended conversion.

* **Refactor**
* Migrated auth provider form validation to a new validation system for
more consistent rules.
* Strengthened provider-specific validation (email, phone/SMS, OAuth,
SAML, Web3), added improved SMS test-OTP/date checks, and adjusted
initial handling for password-required-characters.

* **Chores**
  * Removed an unused validation dependency from project packages.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-16 15:27:29 +02:00
Gildas Garcia 0395fd969f chore: upgrade react-markdown (#44913)
## Problem

We'd like to update react to `19` but many of our dependencies don't
support it.

## Solution

Update those dependencies. This PR focuses on `react-markdown`

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

* **Chores**
* Upgraded react-markdown to 10.1.0 (and remark-gfm to 4.0.0) across
projects for improved Markdown support.
* **Style**
* Adjusted Markdown rendering so typography and spacing are applied via
surrounding containers, improving consistent styling across docs and UI.
* **New Content**
  * Added a new RSS feed item for a recent blog post.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-16 09:12:43 +02:00
Gildas Garcia 73f678c730 fix: auth provider form for sms is invalid when using sms hook (#44820)
## Problem

When users have enabled a SMS hook, they can't update the TOPT test
values anymore.
This is because `formik` sent disabled inputs values in the form payload
while `react-hook-form` correctly does not.

## Solution

Make the inputs read only instead of disabled

## How to test

- Enable SMS auth
- Add a SMS hook
- Update the SMS auth settings

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

* **Improvements**
* Authentication provider form fields now use read-only mode instead of
being disabled, preserving focus and interaction while preventing edits
across text, secret, multiline, numeric, select, boolean, and datetime
inputs.
* A new optional read-only prop was added to form fields for consistent
behavior.

* **Fixes**
* Initial form values recalculation was corrected so they update
reliably when the selected provider changes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-15 12:08:23 +02:00
Francesco Sansalvadore 31794b83f2 feat: passkeys config page (#44718)
## Summary by CodeRabbit

* **New Features**
* Added Passkeys configuration page to manage WebAuthn relying-party
settings and enable/disable passkey auth.
  * Added a Beta "Passkeys" item to the Auth settings menu.
  * Enabled saving passkey-related authentication parameters.

* **Tests**
* Added test coverage to ensure the Passkeys menu appears or is omitted
based on feature flags.

* **Chores**
  * Removed an unused import to tidy the code.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: fadymak <dev@fadymak.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-04-13 16:37:57 +02:00
Gildas Garcia d95fdfd566 fix: input-group don't have the proper validation attributes (#44703)
## Problem

The input groups components introduced in #44282 don't have the
validation attributes when invalid. This hurts accessibility and also
break the design:
<img width="1730" height="324" alt="image"
src="https://github.com/user-attachments/assets/a3fb8d86-f3a8-46bb-aa53-d0599c11f056"
/>

## Solution

This is because the wrapper `<FormControl_Shadcn_>` passes the
validation props to its direct child.
The solution is to avoid applying them on the `<InputGroup>` and to
apply them manually on the inputs.

I also fixed a small accessibility issue by moving the addon texts after
the input so that screen readers announce them in the correct order. No
visual change for this

<img width="587" height="158" alt="image"
src="https://github.com/user-attachments/assets/1f8858ea-6659-45f9-964e-8c43a7fe14ba"
/>


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

* **Style**
* Unified numeric input layout by moving unit labels/suffixes (e.g.,
"seconds", "GB", "%", "connections", "digits", "IOPS", "MB/s", "rows")
to appear after their inputs for a consistent, predictable form
appearance.

* **Accessibility**
* Form controls now expose IDs and ARIA attributes from form context
when available, improving screen-reader descriptions and error
association.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-04-10 11:45:30 +10:00
Charis 4a0bb36ca8 style: require sorted imports in studio/components (#44408)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-04-01 10:22:37 +02:00
Gildas Garcia 18e4ad227e chore: add shadcn input-group components (#44282)
## Screenshots

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

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

On a textarea:
<img width="989" height="294" alt="image"
src="https://github.com/user-attachments/assets/cc696cb9-3671-4719-bdd8-daa1aea4f041"
/>
2026-03-31 09:14:56 +02:00
Gildas Garcia 580a1f972b fix auth providers string fields are all considered sensitive (#44345)
## Problem

All Auth Providers string fields are considered sensitive

## Solution

Restore check of the `sensitive` property that was mistakenly removed in
#44095

## Screenshots

<img width="815" height="949" alt="image"
src="https://github.com/user-attachments/assets/5eab2db9-7023-4351-ab64-f09f5b54d1b8"
/>
2026-03-30 15:08:30 +00:00
Gildas Garcia 6b35cc8034 chore: refactor auth provider form to use react-hook-form (#44095)
## Problem

- The auth providers forms still use `formik` and we want to remove it
in favour of `react-hook-form` to keep only one form library
- The auth providers forms do not follow the design system guidelines

## Solution

- Migrate to `react-hook-form`
- Apply the design system guidelines

## Screenshots

<img width="1530" height="1920" alt="image"
src="https://github.com/user-attachments/assets/04627e93-2aa5-4a7f-a24e-0ae41d6e6b10"
/>

---------

Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>
2026-03-25 09:29:28 +01:00
Ignacio Dobronich ebec20f542 chore: prevention of used leaked passwords entitlement (#43410)
### Changes
- Replaces the isPaid plan-based check on the "Prevent use of leaked
passwords" (PASSWORD_HIBP_ENABLED) setting with a proper entitlement
check using the `password_hibp` entitlement key
- Adds a new `useHasEntitlementAccess` hook that returns a reusable
checker function for any entitlement key, backed by the same cached
entitlements query


### Testing
- Head to `/project/_/auth/providers?provider=Email` with an Org on the
Free Plan
- Assert that the "Prevent use of leaked passwords" toggle is disabled.
- Head to `/project/_/auth/providers?provider=Email` with an Org on the
Pro Plan
- Assert that the "Prevent use of leaked passwords" toggle is enabled
and can be toggled and saved.

<img width="612" height="496" alt="image"
src="https://github.com/user-attachments/assets/fc1ccc79-016c-4265-96ac-bdb458d2a8de"
/>
2026-03-06 11:17:57 -03:00
Joshen Lim 90d3b56db0 Joshen/fe 2621 show custom domain on dashboard and connect modal (#43233)
## Context

Main fix is to adjust the new home page + connect dialog (and connect
sheet) to render the project's custom domain if available

<img width="471" height="255" alt="image"
src="https://github.com/user-attachments/assets/3a208b2e-bdeb-43f5-a2e7-3495881dbaaa"
/>
<img width="1065" height="233" alt="image"
src="https://github.com/user-attachments/assets/2a7b8f81-8c0b-4803-bf0a-fc16a2f1e0e1"
/>

## Changes involved

- Created a `useProjectApiUrl` hook that will return the API URL
depending if custom domains is available, otherwise default to default
project API URL
- Refactored all the other places that were manually deriving the
project's endpoint
  - Storage Explorer -> copy URL
  - Edge Functions
  - Integrations -> Data API + API Docs
  - Auth Providers -> Callback URL
- Also updated the copy CTA for the addons page
  - Instead of just "Change xxx", make it a bit more actionable
  - For add ons with binary states (Custom domains, IPv4)
    - If not enabled yet, "Enable xxx", otherwise "Toggle xxx"
  - For PITR
- If not enabled yet, "Enable PITR", otherwise "Change recovery
duration"
  - Also added "Edit custom domain" CTA if enabled
<img width="1144" height="518" alt="image"
src="https://github.com/user-attachments/assets/4f152ea5-0cc7-412c-95e8-ad5bb37c19c3"
/>


## To test
- [ ] Verify that for a project with custom domain set up, all the
affected UI mentioned in the above section look correct
2026-03-03 11:37:08 +08:00
Ali Waseem c57c341244 chore: add ratchet rules to stop nesting components (#42962)
## 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?

The changes required for this React Doctor need more thought that I can
hammer with AI. Just need to stop this from happening in the future with
Ratchet rules
2026-02-18 10:09:08 -07:00
Joshen Lim eb81b2a340 Fix toggling of prevent use of leaked passwords in auth config (#41912)
* Allow disabling of prevent use leaked passwords config if enabled but downgraded to free plan

* Simplify logic
2026-01-15 10:49:30 +07:00
Alaister Young ebfc40f4ea fix(studio): Twitter (Deprecated) oauth provider enabled status (#41844)
fix(studio): twitter (deprecated) oauth provider enabled status
2026-01-12 05:05:36 +00:00
issuedat 1ee61059ef feat(auth): Add X v2 provider (#41276)
* feat(auth): Add X v2 provider

* chore: reuse the existing twitter docs which will include instructions for both versions
2025-12-23 12:33:29 +01:00
Ivan Vasilov 0d5be306ef chore: Bump React Query to v5 (#40174)
* Bump the deps, refactor deprecated code.

* Migrate keepPreviousData usage.

* Migrate all uses of InfiniteQuery.

* Fix refetchInterval in queries.

* Migrate all use of isLoading to isPending in mutations.

* Fix accessing location in claim-project.

* Fix a bug in duplicate query keys.

* Migrate all queries to use isPending.

* Revert "Fix accessing location in claim-project."

This reverts commit 2a07df64b5.

* Revert the rss.xml file to master.
2025-12-10 10:10:29 +01:00
Saxon Fletcher adf760ebf4 Auth interface components new page components (#40670)
* pages first

* auth interface components new page components

* fixes

* update components

* fix
2025-11-28 15:22:02 +10:00
Danny White 46ac132051 chore(studio): empty state improvements (#40807)
* migrations

* clearer value prop

* consistent verb

* migration input

* triggers

* extract trigger buttons

* database backups

* schema title

* unrelated nit

* fix

* shared component

* ui-patterns

* rename

* improve docs

* remove redundant overrides

* remove old file

* prettier fix

* fix type error

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-11-27 17:26:20 +08:00
Ivan Vasilov 43cc61818c chore: Migrate all isPending uses in react-query (#40642)
* Bump react-query. Minor type and logic fixes.

* Migrate all use of isLoading to isPending in mutations.

* Fix type errors.
2025-11-20 16:44:53 +01:00
Illia Basalaiev ad48771238 Fix attack protection and rate limit links in the web3 wallet configs (#40429)
* fix attack projection and rate limit links in the web3 wallet configs view

* fix link rendering in provider form

---------

Co-authored-by: Illia Basalaiev <illiab@IMB3.local>
2025-11-17 09:11:59 +01:00
Joshen Lim cac225b24a Clean up barrel files part 4 (#40015)
* Clean up barrel files part 4

* nit
2025-10-31 00:30:42 +08:00
Joshen Lim 75e1717a02 Remove barrel files part 02 (#39956)
* Remove barrel files part 02

* Clean up
2025-10-30 23:50:14 +08:00
issuedat cc6645a43b fix: providers sheet should have a minimum width (#39229) 2025-10-07 17:34:12 +02:00
Joshen Lim a2f695547b Fix auth pages error state consistency and missing loading states (#39092) 2025-10-01 17:26:47 +08:00
Stojan Dimitrovski f4c8ab62da fix: enabled/disabled indicator for web3 (#38709) 2025-10-01 10:44:25 +02:00
Joshen Lim 149963f168 Add callout for leaked password that its on the pro plan and above (#39102) 2025-09-30 21:25:25 +08:00
Alaister Young 5f533247e1 Update docs url to env var (#38772)
* Update Supabase docs URLs to use env variable

Co-authored-by: a <a@alaisteryoung.com>

* Refactor: Use DOCS_URL constant for documentation links

This change centralizes documentation links using a new DOCS_URL constant, improving maintainability and consistency.

Co-authored-by: a <a@alaisteryoung.com>

* Refactor: Use DOCS_URL constant for all documentation links

This change replaces hardcoded documentation URLs with a centralized constant, improving maintainability and consistency.

Co-authored-by: a <a@alaisteryoung.com>

* replace more instances

* ci: Autofix updates from GitHub workflow

* remaining instances

* fix duplicate useRouter

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: alaister <10985857+alaister@users.noreply.github.com>
2025-09-26 10:16:33 +00:00
Joshen Lim d46525eac1 Chore/swap use check permissions with use async check project permissions part 8 (Season Finale) (#38619)
* Update perms checking in audit logs

* Deprecate useCheckPermissions, useIsPermissionsLoaded and useCheckProjectPermissions as they're no longer used

* Rename useAsyncCheckProjectPermissions to useAsyncCheckPermissions

* Fix TS
2025-09-16 17:05:57 +08:00
Joshen Lim a897cc27f0 Part 1 of swapping useCheckPermissions with useAsyncCheckProjectPermissions (#37751)
* Part 1 of swapping useCheckPermissions with useAsyncCheckProjectPermissions

* Update apps/studio/hooks/misc/useCheckPermissions.ts

Co-authored-by: Drake Costa <drake@saeris.io>

* Address feedback

---------

Co-authored-by: Drake Costa <drake@saeris.io>
2025-08-11 11:53:15 +07:00
Ivan Vasilov eb95e36e50 fix: The mail confirm setting should be negated (#37615)
* The mail confirm setting should be negated.

* Fix the comments.
2025-08-01 10:22:13 +02:00
Stojan Dimitrovski 49c677dff4 feat: add sign in with solana (web3) configuration UI (#34909)
* feat: add sign in with solana (web3) configuration UI

* Regenerate the api types.

* fix tiny things

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-05-22 10:53:25 +02:00
Joshen Lim 530988bc90 Set URL provider value to null on auth providers on cancel and save (#34788) 2025-04-07 19:00:55 +08:00
Saxon Fletcher 73644db62d Link to auth provider (#33951)
* link to provider

* Simplify implementation

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-03-03 17:03:10 +08:00
Joshen Lim 32a042379e Auth Settings IA Update - Sign In / Up (#33579)
* page components

* page component changes

* settings but broken saving

* rvert

* use sheet for provider

* styling

* remove things

* Some refactoring and fixing, added JSDocs to layouts

* Smol refactor

* Fix

* Update JSDocs

* updated scaffolding

* Clean up

* Spelling

* Clean up FormFieldWrappers

* One last clean up

* Smol CSS tweak

---------

Co-authored-by: Saxon Fletcher <saxonafletcher@gmail.com>
2025-02-21 16:09:50 +08:00
Gulshan 0d9be5cfac Fix/auth config update (#33459)
* fix auth config update

* add comment

* Consolidate variables

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-02-11 19:36:28 +08:00
Francesco Sansalvadore ecd181bcd9 studio mobile v2 (#32630)
* improve some studio mobile layouts

* improve some studio mobile layouts

* improve settings

* assistant mobile

* assistant mobile

* assistant mobile

* responsive formlayout and new project layout

* improve dashboard pages headers

* improve dashboard auth pages

* mobile org settings

* mobile billing fixes

* adjust paused project container height

* remove comments

* triggers

* leftovers

* ai assistant

* fix errors

* remove 16px input size

* fix test

* merge access tokens settings page conflicsts

* smol integrations here and there
2025-01-17 19:07:35 +01:00
hallidayo 9c31325d0f deprecated: alert - provider form (#30532)
* provider form alert switch

* changed to admonition
2024-12-23 13:27:25 -03:30
Monica Khoury 3369164f96 Fix: unify Client ID handling for Google provider (#29950)
* Fix: unify Client ID handling for Google provider

* Ensure no spaces in Client IDs

* Update apps/studio/components/interfaces/Auth/AuthProvidersFormValidation.tsx

Co-authored-by: Kang Ming <kang.ming1996@gmail.com>

* Fix Apple provider client IDs

* Update apps/studio/components/interfaces/Auth/AuthProvidersFormValidation.tsx

Co-authored-by: Kang Ming <kang.ming1996@gmail.com>

* Update apps/studio/components/interfaces/Auth/AuthProvidersFormValidation.tsx

Co-authored-by: Kang Ming <kang.ming1996@gmail.com>

* Remove Secret key requirement

* Fix markdown component usage + apple client id

---------

Co-authored-by: Kang Ming <kang.ming1996@gmail.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-11-11 15:24:46 +08:00
Ivan Vasilov f29003e0e7 fix: Use protocol property when building API url (#30332)
* Fix the types for API settings to include protocol.

* Use the protocol property in all usages of endpoints.

* Update

* Lint

* Revert changes to retrieving protocol

* Remove console.logs

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-11-06 22:22:24 +01:00
Joshen Lim 585477752a Update all documentation buttons (#30163) 2024-10-31 13:58:17 +08:00
Joshen Lim e6c249d9b5 Shift all uses of project api query to project settings v2 query, and deprecate project api query (#30029)
* Add perms check in projects API query

* Start deprecating use of projects-api-query, move to projects-settings-v2-query

* PRETTY

* Shift all uses of project api query to project settings v2 query, and deprecate project api query

* Fix

* Fix

* Small unrelated styling fix on join page

* Fix

* Update apps/studio/components/interfaces/Auth/Users/UserOverview.tsx

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>

---------

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2024-10-23 20:02:20 +08:00
Andrew Valleteau 83c5cb87ed fix(studio): datetime formfield components field update (#29823)
* fix(studio): datetime formfield components field update
2024-10-10 21:05:10 +02:00
Joshen Lim bc203b9078 Chore/user management fixes (#29635)
* Fix waiting for verification column as cell was not re-rendering after users are loaded

* Fix waiting for verification column as cell was not re-rendering after users are loaded

* Fix grid, overview panel and linking to providers for SAML users
2024-10-02 14:22:46 +08:00
Joshen Lim 6af9ff6061 Chore/user management v2 panel (#29468)
* Midway implementing user management v2 panel

* Do up overview panel less provider information

* Midway provider info

* Wrap up provider information

* Add banned until banner

* Slight adjustment to search input

* Fix

* Fix provider icons in data grid

* Fix

* Moar fixes

* Add loading line

* Address some feedback

* Reorder some elements in the user overview panel

* Fix icons going over cell headers
2024-09-25 12:40:18 +08:00
Monica Khoury 63f2c8916f Chore: Add links to documentation to the Auth Providers page (#29259)
* Chore: Add links to documentation to the  Auth Providers page

* Update position of documentation button in provider form

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-09-13 15:02:51 +08:00
Ivan Vasilov 05a542ccea chore: Migrate all feather icons to lucide icons (#29038)
* Add lucide-react to docs (to make the autocomplete work).

* Migrate the docs app icons.

* Migrate the ui-patterns.

* Remove the old icons from ui package.

* Migrate the www app from react-feather icons.

* Migrate all of studio icons.

* Migrate the only component in design-system.

* Fix an old import in ui package. Revert an import in docs app.

* Fix some pages in www.

* Remove unneeded files used in generation of icons.

* Fix a prettier error.

* Fix more issues in www.

* Fix an issue in Log Date picker.

* Replace all string sizes with number sizes because the icons grew in some cases.

* Fix more imports in security page.

* Fix an extra import.

* Remove the size prop from all icons if they're in a button and they match the button size.

* Minor fixes for docs and www.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-09-04 19:46:21 +08:00