Commit Graph

39 Commits

Author SHA1 Message Date
Alaister Young
e3dae9ec36 chore: only load data in modals when they're visible (#34617)
* chore: only load data in modals when they're visible

* SidePanelGitHubRepoLinker

* scrolling is not my strong suit

* simple loading state for add new secret

* fix button width

* update to use shadcn

* fix ts
2025-04-02 16:41:47 +08:00
Alaister Young
3d766bc1c1 [FE-1426] feat(studio): clerk fdw (#33803)
* feat(studio): clerk fdw

* prettier

* docs: add Clerk FDW docs

* Smol update

---------

Co-authored-by: Bo Lu <lv.patrick@gmail.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-03-03 15:50:09 +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
Ivan Vasilov
84311e7d09 chore: Fix the env vars for turbo (#31104)
* Check all env vars for studio and list them properly in turbo.json.

* Check all env vars for design-system.

* Fix all env vars for www.

* Fix all env vars for docs.

* Add the rest of the env vars from the packages folder.

* Revert the changes in the sign-in pages.

* Remove useless files. Fix a comment.

* Fix the links in extensions page to always point to supabase.com/docs.

* Change the feature flag rewrite in studio to point to supabase.com/.flags endpoint.

* Replace NEXT_PUBLIC_VERCEL_URL with NEXT_PUBLIC_VERCEL_BRANCH_URL because it's more stable on vercel.com. Remove it from apps where it's not needed.

* Add env vars from packages. Move all passthrough env vars to env vars since they're stable (don't change between pushes).

* Revert changes of studio files.

* Minor fixes for the merge commit.

* Replace all uses of SITE_URL with LW_URL (they're the same). SITE_ORIGIN is not constructed from env vars. LW_URL is constructed from SITE_ORIGIN and launch_week string.

* Use SITE_ORIGIN when fetching the ticket-og.
2025-01-17 11:08:14 +01:00
Joshen Lim
7c1a435b04 Prevent disabling orioledb extension if project is orioledb (#30787)
* Prevent disabling orioledb extension if project is orioledb

* Smol update
2024-12-02 18:45:36 +08:00
Joshen Lim
a4243f438f Add restrictions for orioledb technical preview (#30410)
* Add restrictions for orioledb technical preview

* Add callouts to pgvector and postgis if orioledb

* Restrict restore to new project for orioledb

* Scaffold client side validation for preventing org upgrade if org has oriole db present

* Hook up proper logic for oriole

* Fix

* Remove console log

* Fix type

* Disable version selector if only one version is available

* chore: oriole badges

* UI updates based on requests

* Update copy

* Fix

* Dont open assistant if opt is selected

* Fix

* Fix

* Update badge

* Add feature flag for orioleDB

* Feature flag oriole check in plan update

---------

Co-authored-by: Paul Cioanca <paul.cioanca@supabase.io>
2024-11-30 17:36:15 +08:00
Joshen Lim
12d92aed99 Assistant V2 (#30523)
* start

* added panels

* remove stuff

* fixes and refinements

* clean up

* remove old assistant panel

* resizable assistant kinda

* use icon

* Add missing package

* remove canvas

* add suggestions

* updated empty state if no tables exist

* fix table condition

* Implement diffing if using assistant in sql editor

* Reinstate old assistant in SQL editor if feature preview is off

* pane size adjustment

* assistant button corners

* Add SQL snippet content to assistant if opening assistant in sql editor

* Add the necessary checks for opt in and hipaa

* revert adding snippet to assistant when opening assistant in sql editor

* Add cmd i shortcut

* Add admonitions for when disablePrompt is toggled on, and if no api key is set. Add footer note RE rate limitation

* Bump ai package in packages

* some fixes for backwards compability depending on feature preview toggled

* Rename feature preview property for new assistant

* Smol fix

* Prevent SQL snippet from running until message is finished

* only loading last message

* fix z-index

* save chat state to global state

* add debug to failed ai queries

* Add basic contextual invalidation

* Add explain code action to SQL editor

* Add link to abort ongoing queries from SqlSnippet

* Update feature preview content

* Fix

* Fix

* Fix

* Te4st

* Fix tests

* ONly show ai button within a project

* Fix PH tracking

* Beef up a bit more event tracking

* Rough fix to padding when assistant is open

* A bit more telemetry stuff

* Update prompts

* fix rls editing via assistant

* Update generate-v3.ts

prompt to get auth schema too

* Add policy satement to assistant when editing

* Address all comments

* fixc

* Fix SqlSnippet not taking full width on larger viewports

* Adjust max width

---------

Co-authored-by: Saxon Fletcher <saxonafletcher@gmail.com>
2024-11-25 18:50:56 +08:00
Terry Sutton
95219d3e2a Chore/cron nl (#30345)
* Add NL input

* Add chart to sidebar

* Better loading animation

* Redo api route to not use edge

* Remove edge stuff

* Allow sheet to close

* Cleanup

* Adjust loading state

* Add timezone

* CR comments

* Replace query with useCompletion

* Set the form value

* Tiny clean up

* Tinyyyyy tweaks

* Fix missing syntax

* Smol refactor

* Fixy

* Remove console log

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-11-12 11:55:01 -03:30
Terry Sutton
2e6809a340 Chore/extension disable warning (#30338)
Add warning in extension disable confirm modal
2024-11-08 09:29:33 -03:30
Joshen Lim
585477752a Update all documentation buttons (#30163) 2024-10-31 13:58:17 +08:00
Ivan Vasilov
fd3309c886 feat: UI for pg-cron (#29291)
* Add crons option in the database menu.

* Add react-hook-form to the studio package.json.

* Refactor the functionSelector to be used by other features.

* Add the bulk of the functionality for the cron UI. Some of the code is copy-pasted from functions feature, needs to be cleaned before merging.

* Tons of changes, the Create Cron sheet works now.

* Added some more functionality for the cronjob feature.

* Convert the Cron table to a listing with cards.

* Add click-to-copy in the Auth Hooks feature.

* Remove extra prop.

* Fix type errors.

* Fix some random issues. Fix the tests.

* Fix the tests.

* Add a style for disabled radio button item.

* Make the default SQL snippet. Handle the case pg_net is not installed.

* Fix the heading and save button when creating a new cron job.

* Change the name of the custom label in the schedule dropdown.

* Minor fixes.

* Rename all mentions of cronjobs to cron jobs.

* Always show the cron jobs link.

* Rename the link from crons to cron-jobs.

* Fix the disabled state for the stacked radio group.

* More minor fixes.

* More small fixes.

* Fix the tests.

* Minor UI tweaks

* More minor tweaks

* Add padding bottom

* Add feature flag for the cron ui.

* Fix the SQL function option.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-10-03 15:11:17 -02:30
Joshen Lim
4dfadb6c03 Fix extensions docs button for exts with no docs url (#29203) 2024-09-10 14:18:23 -02:30
Ivan Vasilov
05a542ccea chore: Migrate all feather icons to lucide icons (#29038)
* Add lucide-react to docs (to make the autocomplete work).

* Migrate the docs app icons.

* Migrate the ui-patterns.

* Remove the old icons from ui package.

* Migrate the www app from react-feather icons.

* Migrate all of studio icons.

* Migrate the only component in design-system.

* Fix an old import in ui package. Revert an import in docs app.

* Fix some pages in www.

* Remove unneeded files used in generation of icons.

* Fix a prettier error.

* Fix more issues in www.

* Fix an issue in Log Date picker.

* Replace all string sizes with number sizes because the icons grew in some cases.

* Fix more imports in security page.

* Fix an extra import.

* Remove the size prop from all icons if they're in a button and they match the button size.

* Minor fixes for docs and www.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-09-04 19:46:21 +08:00
Jordi Enric
3fa447d57d fix layouts and make sure buttons are visible in smol screens (#28939)
* improve table editor headers

* sql editor horizontal scroll auto in headers

* fix headers in tablelist

* fix headers in db roles

* fix database functions in smol screens

* fix table list headers

* fix trigger lists table

* fix enum types headers

* Update Extensions component styling with flex-wrap

* Update Indexes component UI layout and styling

* fix publications table

* move sql editor pagination tobottom

* rm unused imports, add correct label to db selector

* fix layout shift in run button

* add tooltip to results limitter

* make header in sql editor results scrollable

* Fix Button tooltip and table header formatting for database/tables/[id] ColumnList

* Fix SQL editor footer disappearing with resizable panel

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-09-02 16:46:19 +07: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
Joshen Lim
d8003ab0b4 Small UI fixes to extension card (#28470)
* Small UI fixes to extension card

* Revert  padding change to ScaffoldContainer

* Revert change in LayoutHeader

* Pretty
2024-08-08 15:46:30 +08:00
Jonathan Summers-Muir
f912536db8 [Design system] Feat/sonner (#27382)
* fix toast examples

* add sonner stuff

* new sonner examples added

* updated

* add upload POC

* add

* Update sonner-upload.tsx

* move statusicons

* Minor fix.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2024-07-19 12:38:42 +02:00
Joshen Lim
d99c9ea13c Improvement to database extensions UI (#28037)
* Improvement to database extensions UI

* Prettier
2024-07-18 13:58:55 +08:00
Bobbie Soedirgo
6955ccb0c8 fix(studio): reenable pg_prewarm and pgstattuple (#27669)
We've since reenabled it on the platform: https://github.com/supabase/postgres/pull/893/files
2024-07-04 15:58:33 +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
Jonathan Summers-Muir
972773ca87 [Dashboard] Chore: update Modal component to use new components (#26844)
* init

* add more examples

* update modal

* update modals

* more modals updated

* update modal

* Update NewAccessTokenButton.tsx

* Update NewAccessTokenButton.tsx

* fix: issue with scale on dialog opening. chore: added bg-dialog color

* fix modals

* add deprecation notices

* revert bg

* revert

* Update Modal.tsx

* Update PITRSelection.tsx

* update dialog docs

* fix: issue with payment method modal

* update terminal instructions

* update padding defaults
2024-06-05 10:06:55 +00:00
Wen Bo Xie
db24eb2e90 fix: revert renaming vector to pgvector on the client (#25911)
* Revert "docs: rename vector to pgvector (#23308)"

This reverts commit c30d5f0b1f.

* Revert "docs: update vector reference to pgvector (#23305)"

This reverts commit b2bae1351c.

* Revert "Fix vector extension (#23386)"

This reverts commit 7341b30c27.

* Revert "Rename vector to pgvector on client side (#23286)"

This reverts commit b48b6e201b.

* docs: add note to pgvector docs that ext name is vector

* fix: add link to vector ext card
2024-05-09 21:19:02 -07:00
Joshen Lim
7341b30c27 Fix vector extension (#23386) 2024-04-29 04:03:09 +00:00
Joshen Lim
b48b6e201b Rename vector to pgvector on client side (#23286) 2024-04-26 13:00:30 +07:00
Joshen Lim
cd72524f7b Update extensions search behaviour (#23215)
* Update extensions search behaviour

* Minor type simplification.

* Fix leftover type issue.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2024-04-24 20:35:56 +07:00
Ivan Vasilov
9ec2bcce9d fix: Ignore pg when searching through extensions (#22597)
Ignore pg prefix when searching in extensions.
2024-04-11 11:33:48 +02:00
Jonathan Summers-Muir
645273cb45 Chore/update confirmation modal (#22328)
* Update confirmation modal

* update all props

* Update ExtensionCard.tsx

* clen up
2024-04-02 13:39:27 +08:00
Joshen Lim
4327d58df5 Hybrid RLS Assistant (#21806)
* Midway checking on hybrid rls assistant

* Demo

* Midway

* Polish + hook up everything for policy creation

* Temp fix for open in sql editor

* Resolve conflicts

* Support updating policies with new hybrid ui

* Fix generateQuery for altering policies

* Update to support feature preview

* Fix spelling lint

* Addressing small bugs

* Fix

* Clean upo

* Add new MultiSelectV2 in ui-patterns, use in RLS editor

* More clean uo

* Fix RadioGroupLargeItem label cursor state when disabled

* Lint lowercase sql
2024-03-25 16:02:50 +07:00
Chris Gwilliams
2b6c17acbd Hide supautils extension and remove from docs (#20820)
* hide supautils extension and remove from docs page

* newline

---------

Co-authored-by: Bobbie Soedirgo <bobbie@soedirgo.dev>
2024-03-25 15:56:48 +07:00
Jonathan Summers-Muir
a4a4a7e26d Deprecate old Badge component (#22037)
* Update Badge.tsx

* refactor apps with new props

* Update APIKeys.tsx

* format

* remove old code
2024-03-19 10:33:12 +01:00
Ivan Vasilov
845167ca14 chore: Delete MetaStore and RootStore (#20034)
* Replace all methods of MetaStore with react queries.

* Remove unneeded usages of MetaStore.

* Remove RootStore completely. The only thing left from these stores is uiStore.

* Remove unnecessary comments.

* Delete MetaStore.

* Fix the usage of the wrong toaster.

* Remove unused variables

* Remove onSqlQuery

* Convert some ui setNotification calls to direct toast calls

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-03-08 14:56:28 +08:00
Joshen Lim
fb9dfac075 Remove observer and ui.setNotification calls (#21725)
* Remove observer and ui.setNotification calls

* lint

* Fix missing export
2024-03-04 11:12:22 +00:00
Jonathan Summers-Muir
c4a492002b Chore/move confirmation dialogs (#21651)
* move confirmation dialogs

* Update index.tsx

* Update ExtensionCard.tsx
2024-03-01 18:16:25 +08:00
Kevin Grüneberg
f7e60bf324 chore: upgrade prettier/eslint + autofix (#20785) 2024-01-30 10:54:02 +08:00
Alaister Young
5b70f74eb5 chore: warn about using pg_cron on fly (#19588)
* chore: warn about using pg_cron on fly

* order imports & adjust icon size

* Update style

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2023-12-18 05:35:34 +00:00
Joshen Lim
04c19a0d62 Chore/refactor db extensions to rq (#19622)
* Init db extensions to RQ

* Shift all extensions to RQ

* Deprecate extensions meta store

* Address comments

* Address comment

* Address comment

* Update apps/studio/components/interfaces/Database/Extensions/EnableExtensionModal.tsx

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

* Remove connection string check for entity-types-query and database-triggers-query

* Remove connection string checks

---------

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2023-12-13 12:02:20 +07:00
Alaister Young
920621d1e1 chore: improve database pages loading (#19525)
* chore: improve database pages loading first few pages

* improves database roles loading

* improve loading on replications page

* improve backups, hooks and wrappers loading
2023-12-12 15:40:43 +11:00
Francesco Sansalvadore
be9590c890 Multiple themes management (#18871)
* set up multiple themes in studio

* set up multiple themes in studio

* set up multiple themes in docs and www

* update all resolvedTheme to also include deep-dark

* update all resolvedTheme checks to also include deep-dark

* update tailwind.config.js tokens

* update tailwind.config.js tokens

* update leftover scale12 token

* update if resolvedTheme _doesn't_ include 'dark'

* update more styling tokens

* add dynamic themes to CmdK

* fix nav and footer for multi theme

* add data-theme selector output to transformTokens.js

* update code-hike.css to target data-theme css

* update tailwindcss to ^3.3.5

* ThemeImage with light and dark src for www and docs

* add brand-button styling token

* update old dark theme boolean

* update old dark theme boolean

* make homepage product visuals themeable

* update product page themed images

* update badge green with brand

* fix roles list appearance

* fix auth widget in auth page

* update more dark logic

* update more dark logic

* add button default bg and border

* update pricing page theme styling

* clean up Themeimage

* remove forceDark in homepage

* update dark:border-dark occurrences

* update dark:border-dark occurrences

* fix dark mode base colors

* remove foreground-strong

* fix notification badge bg

* remove some dark: selectors

* update dark: selectors

* update code-hike deep dark bg color

* fix comment typo

* update border-button-hover token

* fix customer story logo

* remove some more dark: selectors

* restore forceDark in www homepage

* fix auth react icon

* fix homepage product visuals

* remove theme

* add brand-link token

* fix checkbox bg

* npm install

* more visible EntityListItem active bg

* fix --background-alternative-default css vars

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
2023-11-16 16:41:53 +00: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