Commit Graph

27 Commits

Author SHA1 Message Date
Gildas Garcia
4e86c39ea1 chore: remove <ContextMenu> _Shadcn_ suffix (#45971)
## Problem

The `_Shadcn_` suffix isn't needed anymore on `<ContextMenu_Shadcn_>`
and related components

## Solution

Remove it. No other changes

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

* **Refactor**
* Replaced legacy context-menu component variants with the unified UI
context-menu components across the app for consistent rendering and
imports; behavior and menu content remain unchanged.
* **Tests**
* Updated a test mock to track the unified context-menu component mount
count.
* **Chores**
* Simplified UI package re-exports to expose the canonical context-menu
symbols.

<!-- review_stack_entry_start -->

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

<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-15 15:09:25 +02:00
Joshen Lim
87e8c59405 Add view data as user in auth users + refactor UI for role impersonation (#45358)
## Context

As part of RLS testing, adding @awaseem's idea for having "View data as
user" CTAs in the Auth Users's table
<img width="348" height="190" alt="image"
src="https://github.com/user-attachments/assets/855c8f54-0aba-478c-982b-1d9d29e419bd"
/>

## Other changes

Similar from @awaseem's suggestions, am also refactoring the Role
Impersonation UI a little, mainly from a copy writing POV to improve the
clarity of the UI.
- More action-oriented and contextual header for the role impersonation
popover
- e.g Table Editor -> "View data as a role", or SQL Editor -> "Run SQL
query as a role"
- Updated labels to be bit more intuitive from a builder's POV
- The actual database role is still mentioned in the option's
description (so we aren't obfuscating the actual postgres logic)
- Add label descriptors to elaborate what each role implies
  - e.g Anon -> "Not logged in"
- Add docs button which points to
[here](https://supabase.com/docs/guides/database/postgres/row-level-security#authenticated-and-unauthenticated-roles)
that explains which roles Supabase uses
- (Nit) Refactor to use Card component

### Before
<img width="647" height="277" alt="image"
src="https://github.com/user-attachments/assets/9ebae084-38b7-4e21-886b-f609bd71976e"
/>

### After
<img width="604" height="309" alt="image"
src="https://github.com/user-attachments/assets/4d797309-1b6b-4fd0-aab3-63d5e144c53c"
/>

<img width="630" height="297" alt="image"
src="https://github.com/user-attachments/assets/ca748635-c5da-4426-a9c3-8cb5aeef47a6"
/>



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

* **New Features**
* Added "View data as user" and "Run SQL as user" actions to user rows
to impersonate a user and jump to table or SQL views.
* Impersonation now surfaces an identity card in new tabs showing the
impersonated identity and a Stop button.

* **UI/UX Improvements**
* Impersonation panels accept customizable headers, show clearer role
labels (Postgres), richer role descriptions, condensed RLS copy,
in-panel docs link, simplified "Stop" labels, and adjusted
typography/padding for consistent styling.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-01 00:43:15 +08:00
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
Gildas Garcia
416210d666 chore: remove _Shadcn_ suffix for Checkbox and Radio components (#45263)
## Problem

With #45211 and #45218 merged, we don't need the `_Shadcn_` suffix
anymore

## Solution

- [x] Remove the `_Shadcn_` suffix 
- [x] Update exports and imports 

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

## Summary by CodeRabbit

* **Refactor**
* Standardized UI component exports by removing legacy naming
conventions and providing direct imports for checkbox and radio group
components throughout the design system.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-27 11:07:06 +02:00
Ivan Vasilov
75644f8396 chore: Bump react-data-grid to fix a Sentry issue (#42934)
This pull request updates the `react-data-grid` dependency and refactors
code throughout the codebase to use the new import structure and updated
APIs. The changes improve compatibility with the latest version of
`react-data-grid`, simplify imports, and update row selection logic to
match new hook signatures. Additionally, some code is reorganized to use
absolute imports for internal components.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-02-20 14:10:13 +01:00
Ali Waseem
1890624a1a fix: add missing keys to studio (#42957)
## 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?

Cleanup from React Doctor! Components missing keys
2026-02-18 09:05:22 -07:00
fadymak
50e4f298d0 fix: X/Twitter logo for users authenticated via the X provider (#41723) 2026-01-05 11:37:18 -07:00
issuedat
115ca3a2e3 feat(auth): improved user search (#41199)
* feat(auth): improved user search

* chore: fix types for columns

* feat: cursor-based pagination

* chore: remove trigram indexes in favour of b-tree
2025-12-24 12:24:43 +01:00
Stojan Dimitrovski
0a3f4184a7 feat: optimized users page (#39349)
* feat: optimized users page

* Update UI

* Reinstate footer with count if mode is freeform

* Simplify disabled sort in performance mode

* Clean

* Small fix

* Final fixes

* Shift users SQL query to packages/pg-meta

* Nit unrelated: Clear query params from useLogsUrlState when going to logs tab of a selected user

* Shift user count SQL and get count estimate SQL into packages/pg-meta

* Fix

* Nit

* Nit

* Minor nits

* Refactor UX for searching

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-10-14 15:02:00 +08:00
Joshen Lim
085bddafc5 Chore/consolidate copy icons (#39386)
* Replace all clipboard icons with copy icons

* Fix Menu.Item active styling for light mode

* Update

* Use bg side bar accent
2025-10-10 11:06:42 +08:00
Joshen Lim
843234e153 Add flag to hide email and phone columns in auth users (#39151)
* add flag to hide email and phone columns in auth users

* fix: add authentication:show_email_phone_columns to required schema

---------

Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
2025-10-02 01:26:14 +08:00
Joshen Lim
9a8bd0fae4 Chore/convert cron jobs to data grid (#37601)
* Use DataGrid for cron jobs interface instead of cards

* Deprecate CronJobCard and database-cron-jobs-run-query.ts

* Add tooltip for editing unnamed job

* Implement infinite scrolling to cron jobs + server side searching

* Deprecate database-cron-jobs-query, and add a singular database-cron-job-query

* Add hover card for cron job table cell command
2025-08-01 15:20:31 +08:00
Joshen Lim
27d9b44526 Consolidate copy to clipboard (#36353)
* Consolidate copy to clipboard

* Fix

* Fix some extra clipboard events.

* Fix the tests. Fix a small issue with the copy button.

* Fix

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-06-13 13:08:08 +02:00
Alaister Young
d75cb8b45c fix: studio circular imports (#36026)
* fix: studio circular imports

* Fix the import cycle on Wrappers tabs components.

* Remove duplicate declarations of the feature previews array.

* fix feature previews circular import

* Minor nit

* update all project contexts to use useSelectedProject

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-06-06 16:38:25 +08:00
Joshen Lim
6d0a742ab7 Chore/fix linkedin OIDC checking in user overview (#34690)
* Fix linkedin oidc checking in UserOverview

* Improve refactor

* Update

* Last fix
2025-04-03 13:56:30 +02:00
Kamil Ogórek
861fe9ec88 fix: Update TS checks according to latest API changes (#34372) 2025-03-25 14:24:52 +01:00
Joshen Lim
25a4424869 Add context menu to auth users (#33524)
* Add context menu to auth users

* Smol lint
2025-02-12 11:24:02 +08:00
Joshen Lim
7c9e450c0f Optimize auth users GH avatar img fetching (#33343)
* Optimize auth users GH avatar img fetching

* update

* Add try catch
2025-02-05 17:03:08 +08:00
Joshen Lim
5024df75c0 Refactor auth users the way we retrieve providers (#33258)
* Refactor auth users the way we retrieve providers

* Fix

* Fix
2025-02-04 10:38:12 +08:00
Joshen Lim
771ff70891 Support bulk deletes in auth users (#31271)
* Support bulk deletes in auth users

* Close overview panel if user was deleted

* Add max select up to 20 users limit, and add cancel selection button
2024-12-23 14:29:18 +08:00
Joshen Lim
8f4f7e3e57 Chore/deprecate old users management UI components (#30224)
* Remove usage of userManagementV2 flag and deprecate old user management UI component

* Remove usage of API users endpoint, to use the same SQL query as users-infinite-query

* Use user-infinite-query in UserImpersonationSelector and deprecate users-query

* Fix import statements
2024-11-05 09:10:10 +08:00
Alaister Young
a19d33dcc9 fix: users displayName error when not strings (#30133)
* fix: users displayName error when not strings

* toPrettyJsonString

* handle undefined

* fallback to just last or first names

* join without a comma
2024-10-28 13:30:23 +08:00
Alaister Young
b5a515aca6 fix: avatar url startsWith error (#30053) 2024-10-23 21:26:09 +08:00
Joshen Lim
d586346e27 Chore/sentry fixes 211024 (#30003)
* Resolve https://supabase.sentry.io/issues/5808689343

* Fix SecurityStatus map key prop issue

* Fix FileExplorerHeader to use ButtonTooltip

* Fix https://supabase.sentry.io/issues/5998687405

* Fix https://supabase.sentry.io/issues/5414129652

* Fix https://supabase.sentry.io/issues/5414129652

* Fix map key issue in QueryPerformanceGrid

* Add whitelist error for sign up mutation

* Fix map key in DiskUsage

* Fix prop name in info-tooltip
2024-10-22 15:21:06 +08:00
Joshen Lim
17bd786cb4 Chore/user management v2 part 3b (#29656)
* Init log panel

* Set up auth logs panel for user management

* small fix

* Add comment

* Small adjustment to padding

* Remove unused key

* Remove unused imports

* Fix disabled buttons if 0 logs

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

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

* Address feedback

---------

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2024-10-03 14:19:43 +08: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
536dc37d58 Chore/user management v2 panel part 2 (#29515)
* Set up banning and unbanning user, although untested due to API CORs issue

* Update search filter UI for users management V2

* Update API types

* Minoir

* Small fix

* Update UI

* Add support for resizing and re-ordering columns

* Add google profile image url to csp

* Revert test button

* Implement toggling of columns

* Fix loading

* Fully implement banning/unbanning user

* Fix

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

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

* Fallback non CSP supported avatar urls to user icon

* Fix some bugs

* Remove prism-react-renderer from studio, add to ui patterns

* Migrate users query from API to studio

* Address some feedback

---------

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2024-10-01 14:32:46 +08:00