Commit Graph

18 Commits

Author SHA1 Message Date
Jordi Enric
d00a939729 new logs & analytics sidebar (#29411)
* ui redesign

* when on a saved query and clicking save, it updates existing query

* fix styles in create dropdown, sticky search

* fix update type err

* fix payload type in logs content update

* fix bug with navigation when clicking dropdown items

* use same dialog ui patterns

* cleanup unused stuff

* rm unused component

* truncate sidebar element labels

* align end in dropdowns, fix zindex issue w expandable sidebar

* add empty state to queries section

* top left of the screen
2024-09-30 16:00:39 +02: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
Jordi Enric
51f45a1b33 fix sql editor charts (#28915)
* fix

* fix type issues

* fix type err

* fix type error 2 the return of the type

* fix type error 3 tokyo drift
2024-08-27 19:32:51 +02:00
Joshen Lim
a3ecf36c65 Show correct number of private snippets for SQL folders (#28411)
* Show correct number of private snippets for SQL folders

* Ensure that private snippet count is updated when sharing / unsharing queries

* Fix snippets caching issuie

* Fix move query modal showing more than just the project's folders
2024-08-07 17:38:17 +08:00
Joshen Lim
037a96b917 Fix perms checking in ReportsMenu (#28166)
Fix perms chekcing in ReportsMenu
2024-07-24 09:26:55 -04:00
Joshen Lim
17e0c5dbcf Improve snippet organization in SQL Editor (#27881)
* Init changes for sql fodlers

* Added upsert logic in sql-editor-v2 valtio, hooked up with templates and quickstarts

* Do up logic for creating new snippets by typing in /new or by clicking new query button

* Do up logic for updating and deleting snippets

* Do up logic for favourites and shared snippets

* Do up logic for favourites and shared snippets

* Fix

* Fix saving indicator, add empty states for favorites and shared snippets

* Implement sorting

* Some minor QOL improvements

* Minor fix on empty state for private snippets

* Add delete folder mutation

* Implement create and update folder

* Fix reinstate with AI renaming for new snippets under folder

* Support controlled multi select behaviour in private snippets

* Undo changes to tree-view-multi-select

* Support bulk deletes

* Support moving queries + rendering queries in folders

* Support deleting folders and creating a new folder when moving a query

* Fix bug where renaming query removes content

* Add initial loading state in sql editor nav + handle fallback if cannot retrieve content by id

* Fix some spelling

* Fix TS issue in sql folders mutation keys

* Fix toggling favorite

* Lint

* Revert fallback behaviour in ]id] for now

* Fix favorites and shared snippets not showing

* Fix moving currently opened snippet leads to loading

* Support bulk moving

* Improve multi select logic a little

* Nit lint

* Reinstate AI retitling for untitled snippets when running query

* Remove hardcode in useAFlag

* Support creating new snippet in a folder directly

* Fix sharing snippets that are within a folder

* Fix sharing snippets within a folder

* Fix favorite

* Add loading state when fetching folder contents

* Fix favoriting snippets in folders
2024-07-17 12:23:19 +08:00
Joshen Lim
163263c3c5 First round of wrapping RQ errors with handleError (#26384)
* First round of wrapping RQ errors with handleError

* Remove the throw before the handleError usage.

* Make the handling of an API error more versatile. Add logging in Sentry if the error is of unknown type.

* Remove throwing of the handleError function.

* Add return type to the handleError function to be never so that we're sure it always throws.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2024-05-17 16:30:55 +08:00
Kamil Ogórek
b18be7e4d2 feat: Allow for configuring target envs for Vercel integration (#25782) 2024-05-07 21:19:07 +10: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
Jordi Enric
aa01f780ea feat: store sql editor charts (#21990)
* save chart config when the user changes it

* add optimistic update on change

* fix wrong snippet being updated when changing fast or internet slow

* fix ui state resetting between changes 2

* fix chart config not changing state when working on a new query that only exists locally
2024-03-26 16:37:25 +07:00
Kevin Grüneberg
f9a55935f5 chore: use type imports for types/interfaces (#21738) 2024-03-04 20:48:22 +08:00
Joshen Lim
53c5500be4 feat/sql editor support bulk deletes (#21004)
* Revert "Revert "Feat/sql editor support bulk deletes" (#21003)"

This reverts commit 30245c9490.

* ci: Autofix updates from GitHub workflow

* Lint

---------

Co-authored-by: github-tidy-bot <github-tidy-bot@supabase.com>
2024-02-07 18:03:15 +08:00
Alaister Young
a4f86bce8f chore: increase react-query stale time (#19465)
* chore: increase react-query stale time

* keep staleTime: 0 for table rows

* use staleTime: 0 for all user sql queries

* use staleTime: 0 for all pg-meta queries

* Some fixes

* fix updating tables

* fix bug while editing column names

* Fix deleting column in database/tables column list not revalidating UI

* Fix updating column in database/tables column list throwing ane rror

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-02-06 13:47:05 +08:00
Joshen Lim
30245c9490 Revert "Feat/sql editor support bulk deletes" (#21003)
* Revert "Feat/sql editor support bulk deletes (#20927)"

This reverts commit 27c2cff395.

* ci: Autofix updates from GitHub workflow

* Lint

---------

Co-authored-by: github-tidy-bot <github-tidy-bot@supabase.com>
2024-02-05 14:01:24 +11:00
Joshen Lim
27c2cff395 Feat/sql editor support bulk deletes (#20927)
* Switch over existing delete content to version 2 on API for bulk deletes

* Streamline search behaviour for SQL editor

* Fix SQL query tooltips showing up when dorpdown menu is open or  modal is open for non active query

* Shift project snippets up above favourite snippets

* Basic bulk delete query support

* Support shift select in SQL editor for queries

* Fix lint
2024-02-05 10:31:03 +08:00
Joshen Lim
34a2ccdae3 feat/notifications v2 (#19162)
* Midway implementation notifications v2

* Some updates to Tab component

* Midway implementation notifications v2 again

* implement infinite scrolling and loading for notification sv2

* Add button actions

* Implement archive notifications

* Add filter dropdown for notifications

* Update date format

* Small style fix

* Update

* Update API codegen

* Add empt state

* Add empty state for archived notifications

* Fix type

* Final changes to notifications v2

* Small style fix

* Small fix

* Only mark notifications that come into view as read

* Update package lock
2024-01-08 12:52:48 +08:00
Joshen Lim
da792ba0ba Chore/show rr UI only if project is enabled (#19642)
* Only show RR UI if project is enabled

* Only show RR UI if project has read replicas enabled, shift DatabaseSelector state to valtio, add Database Selector to API URl

* Update usage of Project interface from types to Project from project-details-query

* Fix ts errors

* Another one

* Another one...

* God one more

* Fingers crossed

* jesus

* Add deprecate mark on ProjectBase

* Resolve conflicts

* Rename ProjectState from valtio to DatabaseSelectorState

* Rename file

* fix imports

* tiny code changes

* Fixes

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
2023-12-20 16:49:53 +07: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