Commit Graph

20 Commits

Author SHA1 Message Date
Joshen Lim
cea8e45166 Chore/read replicas fixes 040324 (#21731)
* Remove size selection and add info on rr billing

* Add prompt in SQL editor if trying to run mutation query in read replica

* Fix

* Fix dropping replica not optimistically updating, and support new replica statuses

* Invalidate load balancers after read replicas are spun up

* fix
2024-03-06 15:31:09 +08:00
Kevin Grüneberg
f9a55935f5 chore: use type imports for types/interfaces (#21738) 2024-03-04 20:48:22 +08:00
Alaister Young
74563fbeba chore(branching): GitHub integration 2.0 (#21008)
* start new github integration

* query/mutation updates

* progress

* branch management

* update codegen

* progress

* progress

* Refactor GitHub integration URLs

* Refactor GitHubIntegrationAuthorize component

* Updates

* Do not remove GitHub connection when creating new one

* Deleting a GH connection when branching is enabled for the project, will also disable branching for that project

* Add link to configure connection from org integration settings page

* Slight refactor

* Support updating CWD path

* Change cwd_path to workdir and disallow empty values

* Allow for triggering branches on supabase directory changes only

* Pass missing supabaseChangesOnly value

* Small style fix

* Add Authorization GitHub step

* Small change

* Fix supabase integrations form in project settings

* Revert URLa nd client ID

* Fix UI issues

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Kamil Ogórek <kamil.ogorek@gmail.com>
2024-03-04 18:17:26 +11:00
Joshen Lim
5c9ab30902 Close nav bar on click link (#21686)
* Close nav bar on click link

* Remove onClick for navigationiconbutton

* If user clicked on nav icon thats within the nav bar, dont reopen until mouse left side bar once

* Fix
2024-03-04 15:05:20 +08:00
Jonathan Summers-Muir
eb5039c5e6 Feat/collapsible nav bar (#21550)
* Update IconButtons to expose all props and pass ref. Use UI lib tooltip instead.

* start making it collapsible

* Update app-state.ts

* more transition stuff

* add new icons in. add icon size control with constants

* rename component

* wordmark added

* fix up bottom options

* Update NavigationBar.tsx

* Update NavigationBar.tsx

* Update NavigationIconLink.tsx

* Update NavigationBar.tsx

* add button component

* Update NavigationBar.tsx

* Update NavigationIconButton.tsx

* Update NavigationBar.tsx

* Delete supabase-wordmark.svg

* Add key prop

* Lint classname

* Lint

* Small fixes

* Refactor some handleErrors in EQ

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-02-28 15:34:16 +08:00
Joshen Lim
d1ab275bea Chore/read replica final touches (#21420)
* Add validation for max replicas check

* Small UI fixes

* Add useMemo for edges

* Fix nodes not shwoing up when switching between map and flow view

* Fix logs explorer copy button

* Add edge changes to useEffect

* Bump wait duration when creating replica

* Sync database selector and use pooler checkbox states across panels on settings database

* Fix InstanceConfiguration not showing any nodes

* Sort databases in DatabaseSelector to have primary first

* Logs explorer border fotter

* Add database selector for edge logs

* Make buttons more concise in logs

* Clean up

* Fix

* Fix home page empty empty state

* Attempt to support pooler logs

* minor qol fix for database selector

* Update shared-data pgbouncer to supavisor

* small fix
2024-02-23 18:08:06 +08:00
Terry Sutton
8b035c827d Feat/highlight new rls assistant (#20851)
* Add highlight for new rls assistant

* Optional close function

* Update UI

* Update button text

* Small style fixes on rls assistant ui

* Small style fixes

* Add cta to revert feature preview in rls assistant

* Fixes and ensure RLS assistant CTAs do not overlap into storage policies

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-01-30 15:30:50 +07:00
Joshen Lim
fca9b3bff8 Feat/support expanding text cells into a sidepanel editor (#20727)
* Do up logic for callback for opening side panel

* Add TextEditor side panel and fix some quirky bugs with JSONEditor too

* Add Markdown Preview in TextEditor

* Fix bad cs

* Fix border css
2024-01-25 17:47:36 +07:00
Joshen Lim
401d6ad6e8 Chore/update connection string settings kaizen (#20658)
* Add pooling mode dropdown to toggle between ports

* Fix

* Default pooling mode to the one thats configured

* Update based on feedback

* Fix

* Update pooling modes modal copy

* Small update

* Small copy update

* Small copy update

* Another one

* One final one
2024-01-23 20:12:20 +07:00
Kevin Grüneberg
4152d21478 feat: configure ipv4 addon (#20433) 2024-01-16 16:08:50 +08:00
Joshen Lim
9d9cb374e6 Chore/update notification v2 filter popover (#20375)
* Update notification v2 popover

* Update notifications empty state language based on  filters

* Fix typo

* Update apps/studio/state/notifications.ts

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

---------

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2024-01-12 17:02:26 +08:00
Alaister Young
36476cee5d chore: disable truncation on delete button only (#20368)
* chore: disable truncation on delete button only

* Remove SqlRowService

* deselect rows on role impersonation change

* switch to react-hot-toast

* Update apps/studio/components/grid/components/header/Header.tsx

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-01-12 17:55:03 +11:00
Kevin Grüneberg
542d984b3e chore: reduce main bundle size (#19918) 2023-12-20 17:49:15 +01: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
Alaister Young
9d8e8b068f chore: move role impersonation state into a context (#19510)
* chore: move role impersonation state into a context

* clean up ProjectContext.tsx imports

* move isRoleImpersonationEnabled to only relevant queries
2023-12-11 16:32:11 +11:00
Joshen Lim
539c2bbace feat/rr-functionality (#19466)
* Implement read, create, delete replicas

* Long poll replica statuses if any one of them is coming up

* Support querying replicas in SQL editor

* Add optimistic rendering for setting up and removing replicas

* Small style fix for database selector in SQL editor

* Small fix

* Add Alerts around PITR and PG upgrades RE read replicas

* Small fixes after testing flag off

* Add UI guards to check that project has PITR before deploying replica

* Fix

* Address feedback

* Fix

* Update replicas RQ to enable based on flag
2023-12-08 13:41:35 +08:00
Alaister Young
e6006b9653 feat: user impersonation (#18945)
* feat: user impersonation

* refactor

* add anon impersonation

* add user impersonation to graphiql

* thanks Ivan for this one

* add radio buttons

* progress

* working user selector

* adds loading and error states to user selector

* nicer popover button

* default graphiql to use service role key

* styling updates

* fix padding in graphiql

* add service role warning to graphiql

* add user impersonation to realtime inspector

* add feature flag

* use Alert_Shadcn_ instead of old Alert

* Update apps/studio/lib/role-impersonation.ts

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>

* update title

* Update apps/studio/components/interfaces/RoleImpersonationSelector/UserImpersonationSelector.tsx

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>

* Update apps/studio/components/interfaces/RoleImpersonationSelector/Icons.tsx

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>

* Update apps/studio/components/interfaces/RoleImpersonationSelector/Icons.tsx

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>

* Update apps/studio/components/interfaces/RoleImpersonationSelector/Icons.tsx

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>

* Update apps/studio/components/interfaces/RoleImpersonationSelector/Icons.tsx

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>

* Update apps/studio/components/interfaces/RoleImpersonationSelector/Icons.tsx

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>

* Update apps/studio/components/interfaces/RoleImpersonationSelector/UserImpersonationSelector.tsx

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>

* add constant padding at the bottom of user selector

* update graphiql buttons font size

* make rls warning dismissable

* use text-foreground on rls warning title

* fix no results while impersonating a role

* fix error line number when impersonating a role

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2023-12-04 04:45:11 +00:00
Joshen Lim
f65c847b54 Chore/rls ai assistant updates (#19325)
* Have rls ai assistant sit in feature preview + shown via feature flag

* Support editing existing policy in new AI assistant panel

* Beef up feature preview

* Shift AI settings modal to components/ui and add AI settings to RLS AI assistant panel

* Update apps/studio/components/interfaces/App/FeaturePreview/RLSAIAssistantPreview.tsx

Co-authored-by: Copple <10214025+kiwicopple@users.noreply.github.com>

* Update apps/studio/components/interfaces/App/FeaturePreview/RLSAIAssistantPreview.tsx

Co-authored-by: Copple <10214025+kiwicopple@users.noreply.github.com>

---------

Co-authored-by: Copple <10214025+kiwicopple@users.noreply.github.com>
2023-12-01 11:24:12 +01:00
Joshen Lim
f47a7385ab Assign keys to each side panel editor on the table editor to ensure that input fields have the latest data (#19264)
* Assign keys to each side panel editor on the table editor to ensure that input fields have the latest data

* move rowsPerPage to valtio + more cleanup

* remove sidepanel row optimistic updates

* Change prop for listbox in input field from default value to value

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
2023-11-28 21:24:37 +11: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