Commit Graph

382 Commits

Author SHA1 Message Date
Joshen Lim
180c052d4d Support updating column is unique when editing table in side panel (#22121) 2024-03-22 09:24:53 +07:00
Joshen Lim
8925d1f72e Add validation when creating enumerated types to ensure that name doesnt conflict with a native PG data type (#22120) 2024-03-21 16:02:37 +07:00
Joshen Lim
8a8110a3a8 Fix toast handling extremely long messages (#22122) 2024-03-21 14:47:46 +07:00
Joshen Lim
f3708451a6 Fix consistency for RLS in table editor (#22119)
fix consistency for RLS in table editor
2024-03-20 13:41:47 +07:00
Stojan Dimitrovski
cc9ed7174f feat: limit sign-in password length to 72 (#20571)
* feat: limit sign-in password length to 72

* limit password length on signup

* Update apps/studio/lib/schemas.ts

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

* Update apps/studio/components/interfaces/SignIn/SignInForm.tsx

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

* don't limit password length on sign in

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-03-19 16:45:25 +07:00
Jordi Enric
fbe6d15b53 chore: rm feature flag in sql editor charts (#22093)
rm feature flag in sql editor charts
2024-03-19 09:36:12 +00: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
hallidayo
fe1313c329 feat: archive badge added for examples (#21577)
* archive badge added for examples

* deleted out archived repo examples
2024-03-19 09:10:13 +00:00
Joshen Lim
9f2c7c8571 Chore/fix connect UI pooler mode link (#22105)
* Fix connect ui pooler mode link

* Fix apdding
2024-03-19 16:23:04 +08:00
Joshen Lim
a6a7e8d327 Chore/fix database tables add foreign key not working (#22104)
* Shift database tables to id route and fix add foreign key CTA not working

* Clean up unused imports

* Fix

* Update apps/studio/components/interfaces/TableGridEditor/DeleteConfirmationDialogs.tsx

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

---------

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2024-03-19 13:59:09 +08:00
Alaister Young
138adb2e11 fix: auth provider callback url for staging (#22082) 2024-03-18 13:03:06 +07:00
Joshen Lim
e4f25c4694 Remove using statement for one of the RLS policy templates that's an INSERT command (#22080)
* Remove using statement for one of the RLS policy templates that's an INSERT command

* Fix
2024-03-18 12:48:11 +07:00
Ivan Vasilov
221ee13f79 feat: Expandable code editor in the Create Function panel (#22000)
* Refactor and remove the CreateFunctionStore.

* Fix a duplicate key in the functions table.

* More fixes for the create-function form.

* Add excluded schemas to schema selector.

* Cleanup the createFunction code after the merge.

* Remove unneeded wrapper fragments.

* Minor fixes for the FormItemLayout stories.

* Refactor the CreateFunction panel using the new FormItemLayout.

* Revert the migration to use FormItemLayout. Will revisit later.

* Add a CSS class for popover content width to match its trigger width. Use it on the schema selector.

* Replace all listboxes with selects.

* Fix the comments.

* Switch to FormItemLayout wherever possible.

* Move the createFunction file to its own folder.

* Refactor the panel to use shadcn components: Sheet, SheetContent and SheetHeader.

* Add showClose prop to the Sheet component.

* Add function editor and a feature to maximize/minimize the code editor.

* Some fixes

* Add sameWidthAsTrigger to the popover component.

* Fix the icon size.

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-03-15 10:36:48 +01:00
Austin Tran
2f4cb194ed fix: Cannot access list projects on self-host (#21748)
* fix: cannot access list projects on self-host

* chore: direct to default project
2024-03-14 14:48:43 +01:00
divit
dba7399145 feat: use empty allow list for restrict all access (#22023) 2024-03-14 18:46:15 +05:30
Ivan Vasilov
a775e3ba69 chore: Migrate create-function store from mobx to react-hook-form (#21888)
* Refactor and remove the CreateFunctionStore.

* Fix a duplicate key in the functions table.

* More fixes for the create-function form.

* Add excluded schemas to schema selector.

* Cleanup the createFunction code after the merge.

* Remove unneeded wrapper fragments.

* Minor fixes for the FormItemLayout stories.

* Refactor the CreateFunction panel using the new FormItemLayout.

* Revert the migration to use FormItemLayout. Will revisit later.

* Add a CSS class for popover content width to match its trigger width. Use it on the schema selector.

* Replace all listboxes with selects.

* Fix the comments.

* Switch to FormItemLayout wherever possible.

* Some fixes

* minor lint

* One more lint

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-03-14 14:38:52 +08:00
Jonathan Summers-Muir
e79e04bafd Update Button height size and icon auto sizing (#21992)
* Update Button.tsx

* fixes
2024-03-14 12:49:55 +08:00
Kamil Ogórek
45421ed917 ref: Add GitHub configuration/revoke links for better UX (#22005) 2024-03-14 12:38:57 +11:00
Kamil Ogórek
324f941813 fix: Add spacing between branch name and text (#21997) 2024-03-13 22:48:21 +11:00
Jonathan Summers-Muir
204b4e04a3 fix: FormItemLayout width fix, <Sheet/> renamed with prop name reverted, started new form story (#21989)
* init

* Fix some TS errors. Comment out a unspecified form field.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2024-03-13 11:00:21 +01:00
Joshen Lim
1ea12bfed0 Chore/sql editor fix deleting project snippet (#21973)
* Fix deleting project snippet not triggering onDeleteSnippet

* Reinstate missing saving indicator

* Update apps/studio/components/layouts/SQLEditorLayout/QueryItem.tsx

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

---------

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2024-03-13 17:25:58 +08:00
Joshen Lim
c6ccd74fac SQl editor wrap errors instead of overflow scroll (#21987) 2024-03-13 16:32:29 +08:00
Joshen Lim
b74e84d05f Chore/misc fixes 120324 (#21961)
* Connect UI Prisma DATABASE_URL param to be transaction mode - port 6543

* Connect UI Prisma DIRECT_URL param to be pooler string with session mode - port 5432

* Change checking if read replicas can deployed from if PITR addon is available, to if walg is enabled

* Fix RLS assistant not surfacing error

* Update]

* fix
2024-03-12 23:03:56 +08:00
Terry Sutton
226ac184ab Chore/add gh discussion link (#21968)
Add discussion link
2024-03-12 13:03:07 +00:00
Jonathan Summers-Muir
748635aa9b Chore/update component imports (#21959)
* init

* fix build issues

* move deps over

* Update CommandMenuWrapper.tsx

* build fixes

* Update sitemap_www.xml

* reset

* Update sitemap_www.xml

* Update tsconfig.json

* Update package.json

* Update package.json

* Update package-lock.json

* Update package.json

* update max w

* fix

* chore: rename imports for Dialog
2024-03-12 04:59:42 +00:00
Joshen Lim
948a2390fe Final replacements of ui setNotification with toast (#21885)
* Final replacements of ui setNotification with toast

* Rip out UiStore

* Rip out UiStore

* Shift files under authConfigSchema to components/Auth

* Rip out use of observers
2024-03-12 12:56:56 +08:00
Terry Sutton
aad8521b22 chore: conversational naming changes (#21950) 2024-03-12 11:01:04 +08:00
Jordi Enric
fc8a4b5fd9 fix(sql editor): add padding to see last results when scrolling (#21946)
adding some padding so you can see the last results when you scroll to the bottom
2024-03-11 17:23:27 +01:00
Joshen Lim
ff20ebf974 Fix toast error -> success (#21942)
Fix toast
2024-03-11 14:30:01 +00:00
Alaister Young
0ea52ac220 chore: remove github pull requests query (#21941) 2024-03-11 12:43:06 +01:00
Jonathan Summers-Muir
07a6c5ab4e Chore/move cmdk (#21936)
* init

* fix build issues

* move deps over

* Update CommandMenuWrapper.tsx

* build fixes

* Update sitemap_www.xml

* reset

* Update sitemap_www.xml

* Update tsconfig.json

* Update package.json

* Update package.json

* Update package-lock.json

* Update package.json
2024-03-11 18:31:23 +08:00
MiryangJung
19d6501378 fix: RLS Policy template for insert based on user_id (#21805) 2024-03-08 17:07:57 +00:00
Joshen Lim
3906f1cfb0 Replace ui setnotification with toast part 3 (#21877)
* Replace ui setnotification with toast part 3

* Convert ui setNotification loading to toast for those that dont require progress bar

* Fix

* lint
2024-03-08 21:43:41 +08:00
Terry Sutton
b6d548ef9d Add new rls assistant discussion (#21883) 2024-03-08 13:37:49 +00:00
hallidayo
a6d16182d1 feat/table name whitespace (#21861)
added .trim to table names
2024-03-08 12:45:18 +00:00
Joshen Lim
540049992d Replace ui setnotification with toast part 2 (#21872)
* Replace ui setnotification with toast part 2

* Prettier lint
2024-03-08 18:28:21 +08:00
Joshen Lim
6b741bc964 Replace ui setnotification with toast midway (#21867)
Replace ui setnotification with toast
2024-03-08 15:46:52 +08: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
1c5fd8b07c Fix upgrade query ui (#21865) 2024-03-08 13:55:59 +08:00
Alaister Young
c5afd2e7f8 chore: add branching feature flag (#21840)
* chore: add branching feature flag

* rename BranchingWaitListPopover component

* remove preview branch opt in tag
2024-03-07 11:05:55 +00:00
Joshen Lim
cff9cc3522 fix missing warning for changing prod branch (#21839) 2024-03-07 20:41:02 +11:00
Jonathan Summers-Muir
f609a7d08c move multi select (#21810)
* move multi select

* update imports
2024-03-07 06:43:12 +00:00
Alaister Young
643611fe37 feat: branch migration statuses (#21809) 2024-03-07 06:27:28 +00:00
Alaister Young
8772a1a9cf fix: <ProjectLinker /> wrongfully showing add github repo always (#21812)
* fix: <ProjectLinker /> wrongfully showing add github repo always

* remove span
2024-03-07 14:06:40 +08:00
Han Qiao
6d36debed2 fix: typo in description of pooler connection mode (#21802) 2024-03-06 20:54:33 +11:00
Alaister Young
384b6c4f58 Braching fixes 06/03 (#21800)
* branching fixes 06/03

* fix width in project linker

* add space

* Fix

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-03-06 20:49:10 +11:00
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
Jordi Enric
381d936c4d fix: dates and 14 day selector (#21783) 2024-03-05 18:24:14 +01:00
Ivan Vasilov
7548fd1850 feat: Conversational AI for the SQL Editor (#21388)
* Add a API endpoint for generating queries for the SQL editor.

* Merge all multiline props.

* Add a new component for diff actions.

* Copy components for the AI panel.

* Add useChat hook.

* Add a feature preview for the this feature. The preview is dependent on the feature flag.

* Reorder the nesting in the SQL editor to accomodate the AI assistant.

* Try to fit both AI assistants in the SQL editor, available via a feature preview.

* Refactor the SQL editor to make the diff work correctly in all cases.

* Minor fixes for the old AI feature.

* Fix the debug functionality to work with both assistants.

* Fix some copy-paste leftovers.

* Remove unneeded code.

* Make the icons softer.

* Fix the name of the panel component.

* Fix console.logs.

* Add overflow to the AI assistant.

* surface opt in config in ai settings button

* Skip diffing if editor is empty

* Add selected state when selecting a message to insert/replace code

* Add sample prompts

* Add SQL ai dislaimer when replacing code

* Light mode action bar nudges

* Add text for the feature preview.

* lang nudges

* Hide the command suggestions for now.

* Set the discussion url to undefined.

* Don't add the disclaimer twice.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Terry Sutton <saltcod@gmail.com>
2024-03-05 17:26:11 +01:00
Jordi Enric
010aa4bf90 fix: add payment method fix - revert hcaptcha changes (#21781)
* revert

* Fix missing hcaptchastore import in _app

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-03-05 23:51:16 +08:00