Commit Graph

28 Commits

Author SHA1 Message Date
Jonathan Summers-Muir
fb24d91305 Feat/ Org layout (#33150)
* update test

* move back button, fix width issues on sidebar

* update sidebar logic

* Update ProjectLayout.tsx

* lots of updates. layouts now streamlined. localstorage for tabs in use

* moar

* bunch of new tab logic

* fix empty tab issue

* Update tabs.ts

* layouts switched

* new pages now have fixed layouts

* fix tabs

* fix code bg

* add tabs support for multiple project refs

* intialization issue

* update ID handling

* fixed isOpened state for SQL snippets

* remove old assistant because its bugging up panels

* preview style works in sql editor

* fix border

* removes preview tab if there is one

* fix background of loading skeleton

* lots of issues with types/icons/redirect

* new tab cards

* snippets in empty state now work

* moar stuff

* tabs now in feature flags

* Update tabs.ts

* Update tabs.ts

* moar

* add feature previews

* remove code not needed

* Update next-env.d.ts

* Delete FeaturePreviewModal.tsx

* fix typescript errors. remove more explorer stuff

* remove explorer files

* fixed issues with templates and quickstarts tab

* fixed active state when tabs are not opted in

* logic error

* fix open/highlight issue when opted out of tabs

* templates/quickstarts now displayed with new cards

* Update recent-items.tsx

* Update new-tab.tsx

* add icon back in

* add old empty state back in

* recent items updated to respect project ref

* localstorage cleanup on deletion

* moar

* overflow tabs now working

* correct tab names used for new sql templates/quickstarts

* ongoing queries fix

* cleanup

* update images

* Update RouteValidationWrapper.tsx

* Update AppLayout.tsx

* Update NavigationBar.tsx

* add headers back into side panels

* improve writing

* tabs now drag and drop a billion times better

* Update tabs.tsx

* Update tabs.tsx

* init issues on stores, which caused a race condition.

* fix hydration error

* init

* init sidebars

* init

* Update app-default-navigation.tsx

* user dropdown updates

* moar layouts

* init

* moar

* moar

* updat

* reverse top bar

* some banners

* moar

* start adding account page

* change styling of dropdowns

* Update sidebar.tsx

* fix new tab issue in sql

* Update ProjectLayout.tsx

* Update pnpm-lock.yaml

* latest

* Update pnpm-lock.yaml

* moar layouts on account

* getLayout updates

* more fixes

* force a cache build

* moar

* Update app-default-navigation.tsx

* fix AI button animation

* moar layout

* account pages refactored

* Update user-dropdown.tsx

* Update new-tab.tsx

* move EditorMenuListSkeleton

* Fix type issues

* fixes: DESIGN-87

fixes: DESIGN-87

* refactor sort/filter components

* Update rules-set-button-text.tsx

* remove discussions for now

* small styling fixes

* Update FeaturePreviewModal.tsx

* Update FeaturePreviewModal.tsx

* Update RouteValidationWrapper.tsx

* revert

* revert

* revert

* revert

* revert

* more revert

* Update collapse-button.tsx

* Update SQLEditorTreeViewItem.tsx

* revert

* Update SchemaGraph.tsx

* Delete new-upcoming.tsx

* revert

* Update ProjectLayout.tsx

* fix home link

* Update table-editor.spec.ts

* test update

* Update projects.tsx

* remove

* Delete sidebar-open-top-banner.tsx

* add organizations page

* Update table-editor.spec.ts

* Fix the playwright tests.

* layout fixes

* layout fix

* revert sort/filter

* Update LastSignInWrapper.tsx

* revert

* revert

* remove

* update file names

* revert

* revert

* revert

* advisor lint page tabs revert

* revert

* revert

* revert

* revert

* revert

* revert tabs

* remove packages

* add sidebar

* sidebar docs added

* add sidebar

* fixed issues

* fix mobile

* fixes

* add org side bar in

* redirect updated

* fix more layouts

* move settings icon back down

* remove old stuff

* Delete SideBar.tsx

* use ProfileImage component

* spelling

* Update ThemeSettings.tsx

* Update ThemeSettings.tsx

* Update Sidebar.tsx

* layout udpate

* Update Sidebar.tsx

* fixes

* Minor lints

* Update Sidebar.tsx

* create a alt user dropdown for self hosting and local

* add fragment back in

* Adds Theme Selector for local/self hosting

* Update UserDropdown.tsx

* fix theme selector for local self host

* Update index.ts

* Update DefaultLayout.tsx

* now supports feature preview

* remove old files

* rename files

* revert

* Update LayoutHeader.tsx

* clean

* revert

* revert

* Update resource-banner.tsx

* remove redundant side bar stuff

* organizations action bar updated. removed hardcoded value

* fix type errors

* fix tests

* Undo test changes

* Fix account pages for when feature preview is off

* Bug fixes 1

* Missing key in map of EmailTemplates

* Fix missing border in StorageExplorer

* fix missing header in performance advisor

* Final clean up

* Fix DefaultLayout re-rendering issue on auth pages

* A couple of fixes

* Redirect to /organizations if land on /projects with feature preview on

* Route back to /projects if toggling preview off on /organizations

* Add HomePageActions to /org/slug

* make re-routing nicer

* Moar fixes

* Fix logging in redirect to /organizations irregardless of feature preview

* Fix missing withAuth in OrganizationLayout

* Minor clean upo

* Fix branch dropdown not aligned

* Add feature preview for update layout

* update dropdowns to only be chevron triggered in new layout

* Update content-query.ts

* Update entity-types-infinite-query.ts

* add IS_PLATFORM for org dropdown

* Add IS_PLATFORM check for EnableBranchingDropdown in LayoutHeader

* Midway fixing mobile nav

* Mobile nav fixes

* Address feedbacks

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Alaister Young <a@alaisteryoung.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
Co-authored-by: Jordi Enric <jordi.err@gmail.com>
2025-04-08 11:32:29 +08:00
Joshen Lim
4425e05f04 Update SQL editor search to return a flat list (#33064)
* Update SQL editor search to return a flat list

* Open folder when clicking on a snippet from searching and snippet belongs to a folder

* Update snipet page limit

* Set keep previous data true for count

* Add hover card for SQL search list

* Fix issues from feedback

* Make count loader less jarring
2025-01-27 15:40:51 +08:00
Joshen Lim
cedcc5315f Swap PATCH content to PUT (#32950)
* Swap PATCH content to PUT

* Fix tests

* Swap create Logs Explorer query to use upsert content
2025-01-22 14:14:34 +08:00
Joshen Lim
0129c94cf1 ReportsV2 P2: Support adding SQL snippets to Reports (#32851)
* midway

* Render, save, and save configuration of SQL blocks

* Fix re ordering of blocks not showing save UI

* Remove console log

* Smol fix

* Add queryHeight param to queryBlock

* Reinstate telemetry for run query clicked from assistant

* Add

* Add resizing

* Change compactType

* Fix switching reports doesnt update

* ONly show date picker if theres a chart thats using daily stats or infra monitoring

* Fix client crash

* Smol update
2025-01-20 15:49:32 +08:00
Alaister Young
c7ebd91740 Revert "Temp disable count query" (#32788)
* Revert "Temp disable count query (#31256)"

This reverts commit 05e06673b4.

* update to use new api

* only include params if they're not undefined
2025-01-15 16:42:50 +08:00
Alaister Young
4577389177 chore: send feature flags for page events (#32590) 2025-01-13 13:08:50 +08:00
Alaister Young
a6776a0fbe fix: use v2 endpoints for snippets (#32521)
* fix: use v2 endpoints for snippets

* restore v2 header for content delete
2025-01-02 13:54:55 +08:00
Alaister Young
3cc3f1b5d8 fix: increase snippet limit within folders (#31259) 2024-12-20 02:57:01 +00:00
Terry Sutton
05e06673b4 Temp disable count query (#31256)
* Temp disable count query

* Add additional check for number of snippets.

* Another try at a fix.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2024-12-19 23:12:55 +01:00
Alaister Young
f6d9617413 chore: paginate user content (#30675)
* chore: paginate user content

* progress

* loading states

* add load more buttons to private snippets

* working pagination

* fix some types

* always show snippet counts

* support new api parameters

* favorite snippets

* progress

* searching

* paginate root folder

* fix renaming snippets

* fix ts

* removed unused prop

* Shift sharing/unsharing query logic outside of valtio to leverage on RQ only

* Fix invalidation on an unsaved snippet

* Clean up

* Fix

* Clean up

* Update API type

* Update API

* fix duplicate snippets error after moving a snippet

* add currently selected snippet

* Fix unsharing a snippet that has yet to be opened

* i'm dumb

* fix sharing a snippet

* fix sharing and unsharing

* show favorite or shared snippet in list even if it's in another page

* Fix wrong import for debounce

* Fix false positive toast error when creating custom report

* Update API type

* Change create new snippet CTA to link back to /new with skip flag

* Fix saving logs explorer query

* Bump page number

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-12-19 16:08:14 +08:00
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