Commit Graph

21 Commits

Author SHA1 Message Date
Gildas Garcia
243e079a2c chore: remove _Shadcn_ suffix from Command components (#46153)
## Problem

The `_Shadcn_` suffix isn't needed anymore on `Command` components

## Solution

- Remove the `_Shadcn_` suffix
- Simplify UI package exports
- Apply prettier

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

## Summary by CodeRabbit

* **Refactor**
* Simplified command component imports and exports across the UI library
by removing internal naming aliases and adopting direct component
references. Updated the public UI package barrel export to use wildcard
re-exports for cleaner API surface.

<!-- 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/46153?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 -->
2026-05-20 15:45:32 +02:00
Gildas Garcia
d0fd4478c0 chore: migrate Popover usages to Shadcn components (#45980)
## Problem

We have multiple Popover components

## Solution

- [x] migrate Popover usages to Shadcn components
- Migrated JSON and text editor in the `TableEditor` (inline row
edition)
  - Migrated the template popover in the logs explorer templates page
- [x] remove `_Shadcn_` suffix from Popover components (renaming +
prettier)

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

* **Refactor**
* Unified popover implementation across the app and design system;
dropdowns, calendars, menus and tooltips now use a consistent popover
API with no visual or interaction changes.

* **Chores**
* Minor prop typing update for the logs date-picker to align with the
consolidated popover content type.

<!-- 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/45980)

<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-15 15:20:28 +02: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
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
Ivan Vasilov
9fa96977be chore: Minor prettier fixes (#43849)
This PR fixes some prettier issues:
- Bump and unify all prettier versions to 3.7.3 across teh whole repo
- Bump the SQL prettier plugin
- When running `test:prettier`, check `mdx` files also
- Run the new prettier format on all files

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-03-17 11:17:42 +01:00
Francesco Sansalvadore
b997b7fb13 feat(studio): org project branch mobile selector (#43238)
- add new
[OrgSelector](https://github.com/supabase/supabase/pull/43238/changes#diff-214b339101a9c06864ea2755ac7246eb4c971ce74c5d3169b1385a28ee1d4227)
and
[ProjectBranchSelector](https://github.com/supabase/supabase/pull/43238/changes#diff-82d25c128c306b61bea7481026f58f670a229874f23ca3a1a1d78ddeabde21e0)
components to the mobile navigation, replacing the previous which took
up a lot of horizontal space
- org/project/branch dropdowns now open up in the bottom MobileSheetNav
for a better mobile ux
- desktop nav remains unchanged
2026-03-11 16:25:22 +01:00
Ali Waseem
2dd75cbfdd chore: Update aria-controls and aria-expanded for components (#42961)
## 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?

- React Doctor fixes for aria controls and aria expanded
- Updated eslint to include the role
2026-02-18 16:41:10 +00:00
Joshen Lim
6d6510c337 Fix new home page recent branch stat (#42497)
## Context

Small fix for the new home page "Recent branch" stat to add some
truncate

Before:
<img width="500" height="198" alt="image"
src="https://github.com/user-attachments/assets/f6a73934-52ea-4ed2-853d-3e4b0da054ab"
/>


After:
<img width="500" height="343" alt="image"
src="https://github.com/user-attachments/assets/9ede0378-b410-41f5-9f9d-e4273e76fcdd"
/>

Unrelated but I also set a max width to the project and branch dropdowns
in the layout header
<img width="950" height="69" alt="image"
src="https://github.com/user-attachments/assets/d9fc52f6-50c8-4adb-9a79-da3b64eb7a7f"
/>


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

* **Style**
* Enhanced display of branch and project names with improved truncation
and wider max-widths.
* Added hover tooltips (title attributes) for branch and project names
to improve accessibility.
* Refined text overflow handling and styling across dropdowns and stat
components.
* **Tests**
* Adjusted clipboard test timing to await the resolved promise before
asserting write() was called.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-02-05 19:10:08 +08:00
Joshen Lim
c6b2fe6fee Popover ui component to use portal by default, remove all manual declaration of portal for PopoverContent in dashboard (#41818)
* Popover ui component to use portal by default, remove all manual declaration of portal for PopoverContent in dashboard

* Forgot to add ui changes lol

* Clean uop
2026-01-20 11:58:31 +08:00
kemal.earth
06e523136c fix(studio): access projects dropdown (#41856)
* feat: improve panel width

* feat: tidy list and fix panel sizing

* chore: remove unnecessary cn

* fix: add prop enables scroll within a sheet

* chore: match header background

* chore: small styling brush up

* fix: remove non tailwind class

* Nit

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-01-13 09:11:27 +00:00
Ivan Vasilov
cc47bcfa6d chore: Migrate studio to use ui-patterns/shimmeringLoader (#41405)
* Add shimmering-loader CSS to ui-patterns.

* Import the shimmering-loader classes from the ui-patterns component.

* Remove ShimmeringLoader from studio.

* Migrate studio to use ui-patterns/ShimmeringLoader.

* Migrate away from using default import for ShimmeringLoader.

* Fix the css imports in docs and studio.
2025-12-17 14:54:07 +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
Joshen Lim
9efe2643e3 Joshen/fe 2141 swap organization settings page to use paginated projects (#40513)
* Use version 2 organization roles endpoint and fix all affected files + unit tests

* Update API codegen

* Replace all usage of old useProjectsQuery with useOrgProjectsInfiniteQuery

* Swap access callout for project roles to use collapsible instead

* Deprecate useProjectsQuery and clean up

* Update apps/studio/components/interfaces/Organization/TeamSettings/UpdateRolesPanel/UpdateRolesPanel.tsx

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

---------

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2025-11-18 13:26:09 +08:00
Ali Waseem
fc72a78eec Fix: dropdown positioning for OrganizationProjectSelector (#40439)
* fix: dropdown positioning for OrganizationProjectSelector

Fixes FE-2114

The 'All Projects' dropdown was appearing at the top of the page instead of below the trigger button. This was caused by the dropdown being rendered without a portal while inside a sticky positioned container.

Solution: Added portal={true} to PopoverContent_Shadcn_ to render the dropdown in a portal at the document root, ensuring correct positioning regardless of parent container CSS.

* Nit

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-11-14 07:31:20 -07:00
Kevin Grüneberg
c26231a755 fix: usage page project filtering via URL param (#39919)
When opening the usage page with a projectRef param (filter by project), it lead to some odd behaviour where the project is not preselected and then after picking a project, it would end up showing the initially filtered project from the URL.

PR removes the odd all-projects logic and uses nuqs for URL state mgmt
2025-10-28 13:37:35 +08:00
Charis
92a79d5156 fix(support form): project selector, test timeout (#39529)
* fix(support form): fetch projects on mount

The OrganizationProjectSelector was updated to only fetch when opened to
save on API requests. This causes a problem for the Support Form, which
expects the projects to be fetched immediately so it can fall back to
the first project if no project was paused in the URL.

Added a fetchOnMount prop to OrganizationProjectSelector, which defaults
to false, so we can override this behaviour for the Support Form.

* fix(tests): increase timeout on support form tests
2025-10-14 10:52:05 -04:00
Joshen Lim
63b4f1d838 OrganizationProjectSelector to only fetch projects when its opened (#39516)
* OrganizationProjectSelector to only fetch projects when its opened

* Nit
2025-10-14 16:04:49 +08:00
Charis
f5ff10e195 refactor,tests(support form) (#39410)
* refactor: refactor support form

Refactor support form to make it easier to maintain:
- Split up large components into smaller components and hooks
- Lift state up so we don't have to do complex child/parent
state-syncing via useEffect
- Use nuqs parsing for consistent serialization/deserialization of
support form prefilled fields

* test: support form

Add comprehensive tests for support form

* fix(support form): project and org empty state

* Nit clean up

* More clean up

* cleannnn

* fix(support form): allow case-insensitive category in url

* clean(support form tests): remove unused param

* fix(support form): incorrect logic for sending affected services in payload

* clean(support form): use NO_ORG_MARKER and NO_PROJECT_MARKER instead of strings

* fix(support form): don't show upgrade cta if already on enterprise

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-10-14 11:04:33 +08:00
Joshen Lim
fae1dd8b5e Chore/projects pagination part 01 (#39310)
* Midway

* Add projects-infinite-query and remove use projects query in account audit logs

* Remove useProjectsQuery from RouteValidationWrapper

* Remove useProjectsQuery from OrganizationCard

* Remove useProjectsQuery in new project page

* Remove useProjectsQuery from Organization Audit logs

* Fix check
2025-10-07 17:11:49 +08:00
Ivan Vasilov
d6a2b32996 fix: Bug with Project Selector in support form resets on windows focus (#39241)
* Only set the first project on initial load.

* When an org is changed, change the key of the project selector so the query is retriggered.
2025-10-03 18:08:27 +02:00
Joshen Lim
11b6f77db4 Support for projects pagination (Part 2) (#38654)
* Create OrganizationProjectSelector which handles infinite scrolling in Popover

* Use OrganizationProjectSelector in InviteMemberButton

* Refactor OrganizationProjectSelector to optimize UX

* Use OrganizationProjectSelector in SupportFormV2

* Update apps/studio/data/projects/projects-infinite-query.ts

* Nit

---------

Co-authored-by: Jordi Enric <37541088+jordienr@users.noreply.github.com>
2025-09-17 16:51:14 +08:00