Commit Graph

20 Commits

Author SHA1 Message Date
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
kemal.earth
604be766a8 feat(studio): query performance metric cards (#38634)
* feat: remove tabs and unify columns

This removes the tabs from Query Performance with unified columns in the table.

* chore: remove unused imports

* chore: small adjustment to min max and mean time col size

* feat: original experiment with metric cards

* fix: height of table container on load

* feat: add percentage background for time consumed col

Adds a percentage based background colour for time consumed column and reshuffles some columns.

* feat: working metrics above rows

* feat: simplify stats + go back full width

* style: bring up percentage bar opacity

* chore: remove reportType again

* feat: add metric queries to reset function

* fix: type error for passing query metrics

* fix: query queries plural thing

* chore: remove next-env weirdness
2025-09-15 12:45:23 +01:00
kemal.earth
5fe3383c39 feat(studio): remove query performance tabs (#38606)
* feat: remove tabs and unify columns

This removes the tabs from Query Performance with unified columns in the table.

* chore: remove unused imports

* chore: small adjustment to min max and mean time col size

* chore: remove unused prop
2025-09-11 15:20:52 +01: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
Jonathan Summers-Muir
2815dac7e0 Feat/index suggestions inline (#35107)
* init

* hovercard

* adds button to install index advisor

* hover card now now insert indexes

* update

* moved hook

* align alert dialog to design syste,

* Update index-advisor.utils.ts

* shows all index statements now

* Update query-performance.tsx

* Some refactors

* Clean up

* Fix

* One last nit refactor

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-05-07 19:09:58 +08:00
Francesco Sansalvadore
a4cfcd9b2e global user dropdown in docs and www (#35063)
* docs: user nav dropdown

* www: user dropdown nav

* update menus

* chore: add complete local storage allowlist

* move all local-storage to common

* reload after logOut

* add local storage key changes from #35175

* fix errors

* add more keys

* fix merge bugs

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
2025-05-05 11:48:06 +02:00
Joshen Lim
ce6a432504 Remove 2dp for ms values in query performance advisor (#33472) 2025-02-10 15:36:14 +08:00
Joshen Lim
898fd44eca Support resetting query performance report on read replica (#33346) 2025-02-06 14:26:48 +08:00
Joshen Lim
794529eddf Chore/add export functionality to advisors (#33030)
* Add export functionality to security and performance advisors

* Add download results button to query performance advisor

* Add refresh buttons to security and performance advisors

* Add LoadingLine to Query performance to make UI consistent with the other advisors

* Minor change
2025-01-23 17:06:28 +08:00
Ivan Vasilov
52735e38bf chore: Rename all uses of Tooltip_Shadcn_ to just Tooltip (#32860)
* Rename all uses of Tooltip_Shadcn_ to just Tooltip.

* Fix a leftover change.
2025-01-20 22:23:45 +01:00
Joshen Lim
559236dbd0 Chore/query performance fixes and improvements (#32747)
* Show tab max value in seconds if > 1000ms

* Fix incorrect sort option in initial state with no URL state

* Fix trim of undefined in Query Performance when retrieving index
2025-01-13 23:29:28 +08:00
Ivan Vasilov
df52ea7ee0 feat: Replace all toasts with sonner (#28250)
* Update the design of the sonner toasts. Add the close button by default.

* Migrate studio and www apps to use the SonnerToaster.

* Migrate all toasts from studio.

* Migrate all leftover toasts in studio.

* Add a new toast component with progress. Use it in studio.

* Migrate the design-system app.

* Refactor the consent toast to use sonner.

* Switch docs to use the new sonner toasts.

* Remove toast examples from the design-system app.

* Remove all toast-related components and old code.

* Fix the progress bar in the toast progress component. Also make the bottom components vertically centered.

* Fix the width of the toast progress.

* Use text-foreground-lighter instead of muted for ToastProgress text

* Rename ToastProgress to SonnerProgress.

* Shorten the text in sonner progress.

* Use the correct classes for the close button. Add a const var for the default toast duration. Remove the custom width class from sonner.

* Set the position for all progress toasts to bottom right. Set the duration for all toasts to the default (when reusing a toast id from loading/progress toast, the duration is set to infinity).

* Fix the playwright tests.

* Refactor imports to use ui instead of @ui.

* Change all imports of react-hot-toast with sonner. These components were merged since the last commit to this branch.

* Remove react-hot-toast lib.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
2024-08-31 07:50:51 +08:00
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
Joshen Lim
1afaae6447 Chore/reports read replicas filter (#23711)
* Scaffold for API reports

* Add support for filtering database reports by replicas

* midway adding read replica support for custom reports

* Refactor reports page to use react query and deprecate project content mobxstore

* Reports add chart labels if metric is read replica specific

* Give an easier way to remove charts from reports

* make reports layout non-blocking

* Update apps/studio/components/interfaces/Reports/Reports.tsx

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

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2024-05-07 16:44:23 +08:00
Joshen Lim
755d75e55d Chore/add replica filter for query performance (#23409)
* Add replica filter for query performance

* Small fix

* Add ref in dep array

* Hide database selector if read replicas is not enabled for project
2024-05-03 16:24:49 +08:00
Joshen Lim
c304ce537f Add db inspect docs link (#23268)
* Add db inspect docs link

* Update
2024-04-26 12:52:44 +07:00
Ivan Vasilov
5cf8f30e23 chore: Remove obsolete flags (#22915)
* Remove showS3Connection flag.

* Remove showAnonUserFilter flag.

* Remove   enableVercelConnectionsConfig flag.

* Remove indexAdvisor flag.

* Remove queryPerformanceV2 flag.

* Remove unused files.

* Remove unneeded packages.

* Remove the v2 suffix from the query performance folder.
2024-04-22 09:38:41 +02:00
Joshen Lim
3f957bc2a1 Fix query perf v1 (#22648) 2024-04-11 22:26:47 +08:00
Joshen Lim
ec59752bc0 Query Performance Facelift (#22568)
* Update

* Clean up + fix UI

* Add data values to tab

* Add comment

* Format sql query in query details

* Clean uo

* Deprecate old files

* Address comments

* chore: update styles (#22591)

* Add feature flag, reinstate old UI for feature flag

* Update apps/studio/components/interfaces/QueryPerformanceV2/QueryPerformance.tsx

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

* Update apps/studio/components/interfaces/QueryPerformance/QueryPerformance.tsx

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

* Address feedback

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2024-04-11 12:57:46 +08:00
Joshen Lim
65d572e1d2 Chore/update query performance page (#22467)
* Standardize to use FormHeader for all database pages

* Tidy up query performance page

* Add filter for roles

* Make search in query performance consistent with other pages and shift FilterPopover to ui
2024-04-05 15:03:28 +08:00