Commit Graph

32 Commits

Author SHA1 Message Date
Gildas Garcia
96d43099bb chore: refactor Button API so that it can be used a standard button (#46880)
## Problem

Our `<Button>` component breaks the default `button` contract by
redefining the `type` prop to set its variant (`primary`, `default`,
etc) instead of the button type (`submit`, `button`, etc).
This is confusing and forces to write more code when using it with
shadcn components that expect/inject the standard button props.

## Solution

- rename the `type` prop to `variant`
- rename the `htmlType` prop to `type`
- propagate the changes where necessary
- format code

## How to test

As this is just prop renaming, if it builds it's ok

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-06-16 23:59:58 +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
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
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
Ivan Vasilov
01c6b56a7c feat: Add disabled state for PostgREST (#39625)
* Fix the type for the project service status query.

* Fix the statuses math in ServiceStatus for services health.

* Minor fixes.

* Fix minor type issues.
2025-12-18 16:00:20 +00: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
ff38efd38f Update service status checks text note when some services are unhealthy (#40767)
* Update service status checks

* Nit

* Update apps/studio/components/interfaces/HomeNew/ServiceStatus.tsx

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

---------

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2025-11-26 13:27:55 +08:00
Ivan Vasilov
a40ccc4b45 chore: Clean onSuccess and onError props on useQuery (#40641)
* Remove all onSuccess and onErrors from useQuery.

* Minor fixes to all refetchInterval.

* Fix smaller type issues.
2025-11-20 14:08:56 +01: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
cab0585533 Fe 1799/consolidate to useselectedprojectquery and (#37684)
* Replace all usage of useProjectContext with useSelectedProjectQuery

* Replace all usage of useSelectedProject with useSelectedProjectQuery

* Replace all usage of useProjectByRef with useProjectByRefQuery

* Replace all usage of useSelectedOrganization with useSelectedOrganizationQuery

* Deprecate useSelectedProject, useSelectedOrganization, and useProjectByRef hooks

* Deprecate ProjecContext
2025-08-06 10:53:10 +07:00
Saxon Fletcher
625af107bd Branch refinements (#37192)
* branch refinements

* branch price copy

* change alignment of badges

* remove console.log

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
2025-07-16 16:06:54 +10:00
Saxon Fletcher
5662f196a8 Add migration status to branch (#37010)
add migration status to branch
2025-07-10 16:10:18 +10:00
Joshen Lim
363b976e94 Fix service checks coming up state (#35705)
* Fix service checks coming up state

* Fix delete project redirect

* Smol fix

* Remove unnecessary padding in Delete Project Panel

* Address feedback

* Rename confusing isSuccess param to isHealthy
2025-06-02 16:28:23 +08:00
Saxon Fletcher
9d36654fbe add advisor and stats to home (#35580)
* add advisor and stats to home

* public tables

* table count

* small fixes

* loading state

* Clean up + Add links to each advisor

* Last few fixes

* Tinnnnnnyy fix

* Nits to make the layout shift less

* Update LoadingState to minimize layout shift

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-05-13 21:14:07 +08:00
Kevin Grüneberg
8d48d5bfae refactor: use database status from general health check endpoint (#34629) 2025-04-02 13:27:04 +08:00
Jordi Enric
216df9b1eb fix: rename "No issues" to Healthy (#33311)
rename no issues to healthy
2025-02-04 13:03:47 +01:00
Jordi Enric
e59f2794f2 Service Status: fix status checks (#33125) 2025-01-28 18:15:15 +01:00
Jordi Enric
ee9931afd3 service status: hide info footer if all services OK (#32966)
hide if all services are operational
2025-01-21 18:01:16 +01:00
Jordi Enric
0a3df2296e keep polling til all services are healthy (#32794)
* keep polling til all services are healthy

* fix type errs

* use loader in coming up icon

* consistent icons
2025-01-20 16:26:22 +08:00
Jordi Enric
462c3c8cfc status check (#30204) 2025-01-15 11:42:06 +01:00
Jordi Enric
e92cb573db Check if the project is coming up (#29721)
* check if the project is coming up

* add info msg
2024-10-08 10:51:00 +08:00
Jordi Enric
6e1e5db7f7 Project Status improvements (#29669)
* add logs links, set status as coming up when project is less than 10 minutes old

* make whole dorpdown item clickable

* Small tweak to UI

* Switch to 5 mins

* Small tweak

* Add useeffect to automatically refresh service status

* Add useeffect to automatically refresh service status

* Address feedback

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-10-07 16:41:51 +08:00
Terry Sutton
fee07c5d36 Chore/show lints on project homepage (#23424)
* Move auth lints to query

* Add exmaple components

* Cleanup

* Add sidebar badge

* type issue

* Remove home warning

* Add loader state

* Small style changes

* Small lint

* Only show navbar dot if we have lints

* Revalidate the lint query when sql editor snippets run

* Fix imports

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-08-05 10:49:19 -02:30
Alaister Young
70da0f1d1d chore: cleanup packages (#27770)
* chore: cleanup packages

- Avoid circular imports
- Export API-types as types
- pg-format without depending on Node internal Buffer (not browser-compatible)
- Avoid importing from barrel files in ui dir

* chore: avoid barrel file imports in studio (#27771)

* chore: avoid barrel file imports

- Removes some unused imports
- Avoids barrel file import for faster builds + less memory

* add eslint rule

* type fixes

* delete layouts barrel

* delete components/grid barrel file

* delete components/grid/utils barrel file

* delete components/grid/components/common barrel file

* delete components/grid/components/editor barrel file

* delete components/grid/components/formatter barrel file

* delete components/grid/components/grid barrel file

* delete components/grid/components/header/filter barrel file

* remote components/grid/store barrel file

* remove components/interfaces/Auth/Policies barrel file

* delete components/interfaces/Settings/Logs barrel file

* delete components/ui/CodeEditor barrel file

* delete components/ui/Forms barrel file

* delete components/ui/Shimmers barrel file

* delete data/analytics barrel file

* delete hooks barrel file

* cleanup lib/common/fetch barrel file

* final * barral files cleanup

* global react-data-grid styles

* remove console.log

---------

Co-authored-by: Kevin Grüneberg <k.grueneberg1994@gmail.com>

* fix build

---------

Co-authored-by: Kevin Grüneberg <k.grueneberg1994@gmail.com>
2024-07-04 14:48:10 +08:00
Jonathan Summers-Muir
423397e858 remove old misc tailwind (#26788)
Update ServiceStatus.tsx
2024-05-27 14:49:30 +02:00
Joshen Lim
a72220efde Custom error boundary (#25946)
* Test custom error boundary

* Test

* Test

* Add error boundary to catch full page crashes

* Update apps/studio/components/ui/ErrorBoundaryState.tsx

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

---------

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2024-05-13 13:24:08 +08:00
Terry Sutton
cc008ef983 Feat/homepage connect modal combined (#20328)
* First

* Update

* Move connection string panel to its own component

* Add connection strings

* Format button

* Add dummy files to get logic working

* Add mdx packages

* add file handling and change logic

* Support connections

* Fix icons, add direct and graphql

* Remove mdx stuff

* Add pooler toggle

* Fix child logic

* Fix grandchild logic

* Refactor data object

* Move back to dialog ui

* Refactor to shadcn tabs

* Find the files

* Wire up icons

* Loop over connection types

* Reformat file paths

* Remove from project home

* fix tab rendering issue

* Check for unique keys

* Add new libs

* comment

* Add direct connection ui

* Get project connection strings

* Cleanup

* Add project keys

* Add types file

* Undo update

* Add next app files

* Add files

* Add next pages files

* Add nuxt

* Fix env vars

* Add rest of frameworks, graphql and orms

* Add orms

* Fix types

* Add guide links

* Run prettier

* Separate graphql

* Move ui

* Move direct connection to first position

* Move to single files

* Update styling

* Fix locations

* Fix next content

* Fix dialog close button, add proper light mode theme

* Fix dialog style issues

* CleanupA

* Pin to top

* Feat/homepage connect modal combined  styling update (#21079)

* chore: update styling. also moved useStates as it was sort of duplicated

* Cleanup

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>

* Close pooler modal

* Make the db connection panel blend in

* Allow for DatabaseSelector

* Dont open by default

* Some fixes

* Set min height to loader

* Fix

* Small styling fixes for table editor sort filter popover

* Make connect button stand out

---------

Co-authored-by: Jordi Enric <jordi.err@gmail.com>
Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-02-15 09:25:17 -03:30
Kevin Grüneberg
f7e60bf324 chore: upgrade prettier/eslint + autofix (#20785) 2024-01-30 10:54:02 +08:00
Kevin Grüneberg
d12332ea5a chore: xmas cleanup (#19938) 2024-01-04 17:27:49 +01:00
Joshen Lim
93256239df Add storage to service status (#19004)
* Add storage to service status

* Fix

* Add flag for storage enabled in ServiceStatus

---------

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2023-11-16 13:59:01 +08:00
Ivan Vasilov
436bdb10ae chore: Move the studio app to apps/studio (#18915)
* Move all studio files from /studio to /apps/studio.

* Move studio specific prettier ignores.

* Fix the ui references from studio.

* Fix the css imports.

* Fix all package.json issues.

* Fix the prettier setup for the studio app.

* Add .turbo folder to prettierignore.

* Fix the github workflows.
2023-11-15 12:38:55 +01:00