Commit Graph

1217 Commits

Author SHA1 Message Date
Joshen Lim
e05fed45aa Storage delete bucket modal fix styling (#22109)
* Storage delete bucket modal fix styling

* Fix TextConfirmModal
2024-03-21 14:57:05 +07:00
Joshen Lim
8a8110a3a8 Fix toast handling extremely long messages (#22122) 2024-03-21 14:47:46 +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
e93316657c fix: Unset the width on the popover to be the same as the trigger (#22053)
* Don't make the width same as the trigger on all popovers.

* The schemaSelector should have the same width.
2024-03-15 22:04:48 +00: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
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
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
Charis
5e878098f2 feat: add transition-safe-* tailwind utilities (#21958)
* feat: add transition-safe-* tailwind utilities

Add Tailwind utilities for transitions that respect
`prefers-reduced-motion`.

* docs: add usage examples
2024-03-12 13:55:20 +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
Jonathan Summers-Muir
f22e229729 Chore/move cmdk (#21957)
* 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

* Update Command.utils.tsx
2024-03-12 04:44:29 +00:00
Jonathan Summers-Muir
8bf07150b8 add deprecate notice to icons (#21937)
* add deprecate notice

* support old icons still

* Remove unused icons.

* Fix the icons in stories.

* Remove console.log

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2024-03-12 12:14:59 +08: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
Francesco Sansalvadore
827b01c37a improve hp perf on safari (#21845)
optimize www homepage performance
2024-03-08 11:00:45 +01:00
Jonathan Summers-Muir
05e810e52a Chore/update light mode overlay bg (#21866)
* Delete concept-one.css

* chore: update overlay bg

* left overs
2024-03-08 15:50:36 +08:00
Jonathan Summers-Muir
d5765e7127 Feat/form item layout (#21835)
* init FormInput

* fix imports

* more clean up

* Update FormLayout.tsx

* Update FormLayout.tsx

* adding size prop

* more updates

* moved things. added checkbox

* check in

* Update FormLayout.tsx

* Select now has a SelectItem

* layouts moved

* fix type errors

* add layout stories

* update story

* refactored layout to be easier to maintain. dropped the defaultTheme support

* update Form

* update Badge

* remove old code

* remove more

* more

* Update index.tsx

* clean up

* Update preview.css

* fix type errors

* Update index.tsx

* Update InfoTooltip.tsx

* fix issues

* add seperator

* Update FormLayout.tsx

* match styles to old component
2024-03-08 06:27:16 +00:00
Jonathan Summers-Muir
831aefd725 Update Listbox2.tsx (#21811)
* Update Listbox2.tsx

* Add a deprecated note to Alert.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2024-03-07 13:25:54 +00: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
Charis
3abd39365c fix: fix color of ai code blocks in light mode (#21795) 2024-03-06 14:32:46 +08: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
Jonathan Summers-Muir
9104cbc359 Chore/add first pattern docs (#21741)
* remove un-needed stuff

* Update preview.js

* Update preview.js

* upgrade sb

* Update preview.js

* chore: main init of the confirmTextModal

* update modals

* dialog positioned fixed

* fix backdrop

* chore: overlay now wrapping DialogContent !!

* more modal updates

* fix props

* update size

* padding fixed

* Update Dialog.stories.tsx

* add padding to more Dialog stuff

* update text

* start using subcomponents in storybook

* make thinner because it's too wiiiiide

* Tiny fix

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-03-05 18:08:28 +08:00
Jonathan Summers-Muir
8c68a09fc4 Chore/improve search input sql editor (#21546)
* init input and button changes

* clean up

* button now active state when dropdown or popover active

* Update TableEditorMenu.tsx

* Update TableEditorMenu.tsx

* fix hover issues

* Update SchemaSelector.tsx

* Add new patterns for inner side panel. expose HoverCard. Update Tooltip

* update SQL editor patterns

* Fix general bugs found, just not 100% on the UX

* Revert default open

* row back changes

* improve empty state

* update snippet headers

* Small fixes

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-03-05 17:47:49 +08:00
Kevin Grüneberg
0073518136 perf: improve prism-react-renderer setup (#21752) 2024-03-05 12:51:11 +08:00
Kevin Grüneberg
136728f6ab perf: reorganize a few imports to improve bundle size (#21743) 2024-03-05 12:49:58 +08:00
Charis
538fb7ee0c docs: add federated terraform docs (#21307)
Co-authored-by: Han Qiao <sweatybridge@gmail.com>
2024-03-02 03:17:50 +00:00
Jonathan Summers-Muir
d8e7ecbfe5 Chore/move dialog to patterns (#21688)
* update exampleps

* move text confirm modal
2024-03-01 10:47:36 +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
Jonathan Summers-Muir
ee10e04027 Feat/add storybook app (#21682)
* init

* bump storybook package

* add new imports

* Update main.js

* add stories and tailwind

* chore: format

* Update main.js

* Fix the Button story.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2024-03-01 09:46:26 +00:00
Terry Sutton
377cb2dc7c Add a toggle for intellisense to the sql editor (#21643)
* Add a toggle for intellisense to the sql editor

* Cleanup

* Ensure that we dont load suggestions in browser unless intellisense is enabled

* Small fix

* Lol spelling

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-02-29 08:49:33 -03:30
Terry Sutton
53fa2a8997 Chore/schema visualizer styles (#21614)
* Nudge schema visualizer

* Remove old file

* Fix a forgotten import.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2024-02-28 11:19:07 +01:00
Joshen Lim
8deb0865c5 Chore/rls assistant iteration templates (#21447)
* Add templates to RLS assistant

* Update button

* lint

* Chore/rls assistant iteration templates styling (#21459)

* Update index.tsx

* update icon pack

* add new classes

* expose hover card

* add slight shadow to scroll area

* monaco editor updated

* tabs border-b updated

* message styling updated to use circle AI icon

* templates side panel updated to use new tailwind classes and ScrollArea

* Updated tab label to "Assistant" and adjusted background colors

* header updated to use simpler open/close button

* divide-y styling added to chat

* fix tabs bg state

* shadcn tooltip updated to use correct bg color and added default delay duration

* updated styling of codeblocks in chat

* updated open / close button. also added a tooltip

* divide border styling

* add 'slide in' animation option for Hover Card

* update code block

* switch to Card Button

* Update CardButton to expose props and allow any props to be applied

* init

* Apply suggestions from code review

* Add entry step when clicking on create new policy for rls ai

* templates code replacement state highlight selected template

* Ai message code replacement state highlight selected message

* Opt to leave templates panel open

* Fix templates to use template name in policy sql

* Fixes

* fix

* Remove unused imports

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
2024-02-28 14:44:17 +08:00
Charis
e444d337f1 chore: remove ipv4 deprecation banners (#21589) 2024-02-27 14:38:41 +08:00
Jonathan Summers-Muir
84f092ac43 chore: update table editor input and schema selector styling (#21486)
* init input and button changes

* clean up

* button now active state when dropdown or popover active

* Update TableEditorMenu.tsx

* Update TableEditorMenu.tsx

* fix hover issues

* Update SchemaSelector.tsx
2024-02-26 13:24:29 +00:00
Jonathan Summers-Muir
e1bbdd0ca7 feat: add resizable inner sidebar (#21548)
* init

* update import names

* Update resizable.tsx

* resizable bg now goes lighter on drag

* only resizable for table editor and sql editor

* Update ProjectLayout.tsx

* Update index.tsx

* Remove unneeded console.log.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2024-02-26 18:50:44 +08:00
Joshen Lim
72d00070f3 Expose Shadcnui toast components from UI and partially implement in storage explorer (#21308)
* Expose Shadcnui toast components from UI and partially implement in storage explorer

* Fix
2024-02-26 16:59:49 +08:00
Jonathan Summers-Muir
d8ae6de7a8 feat: add new Icons package for custom made icons (#21477)
* feat: add new Icons package

* Create README.md

* add more icons

* add "Home" icon and "Postgres" icon

* reduce helpers

* remove old files

* make dev deps

* Delete package-lock.json

* Update README.md

* add to packages for other apps

* remove from db.design

* Update README.md

* Move the build-icons package in the packages folder.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2024-02-26 09:40:56 +01:00
Ivan Vasilov
b4e768b74f fix: Migrate SQL editor and Log explrorer to use ShadCN Resizable (#21454)
* Add resizable component to ui package.

* Migrate the LogExplorer to use the new resizable component.

* Migrate the SQL editor to use the new component.

* Remove react-split.
2024-02-26 09:39:23 +01: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
Francesco Sansalvadore
b8ffc4faf8 Links styling (#20199)
update link styling in blog and docs
2024-02-20 14:56:23 +01:00
Francesco Sansalvadore
9cf0708aa5 Product pages improvements (#21322)
* remove default border from ThemeImage

* fix empty links in product pages

* fix database product page errors

* smol product page fixes

* Update apps/www/components/AuthWidget/AuthWidgetSection.tsx

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>

* Update apps/www/styles/index.css

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>

* Update packages/ui-patterns/ThemeImage/index.tsx

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>

* fix prettier

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
2024-02-20 11:58:00 +00:00
Ivan Vasilov
d07a820440 feat: Pro+ users can choose compute size during project creation (#21292) 2024-02-20 16:19:26 +08:00
Jonathan Summers-Muir
41fe4a993b fix: moved useeffect for theme provider (#21378) 2024-02-20 14:56:46 +08:00
Ivan Vasilov
630eeefa93 fix: Minor papercut fixes in the studio (#21319)
* Fix small issues with the tables and keys.

* Refactor the TimezoneSelection with shadcn components.

* Dont pass active to the NavMenuItem.

* Fix the double hash in the _ page.

* Fix an error where an input received an undefined as value.

* Fix increase retention period in PITR disabled incorrectly

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-02-19 13:34:24 +08:00
Fabrizio
1f1d1ad3bf chore(storage): allow 50GB upgrade self-serve (#21220) 2024-02-16 22:50:32 +08:00
Francesco Sansalvadore
1c0f677eff Blog update (#21289)
blog layout update
2024-02-16 14:16:42 +00:00
Jonathan Summers-Muir
754ee55cd0 chore: update themes and add dark-new theme set (#20865)
* chore: update themes and add dark-new theme set

* chore: update

* add deep dark css theme

* fix issue with wrong class

* chore: add `bg-studio` as a custom remapped color for studio background

* updated surface classes to use a surface-75.

* update backgrounds and borders

* Update CardButton.tsx

* Update NavigationIconButton.tsx

* chore: add theme selection

* Update package.json

* Update index.ts

* Update package.json

* update alias

* Update ThemeSettings.tsx

* chore: split up theme support

* remove old code

* Update index.ts

* add back in

* Update ThemeSettingsOld.tsx

* fix issue with system theme leaking through

* reset themes

* update imports

* packagelock updated

* Update ThemeSettingsWithPreferredTheme.tsx

* Update system.svg

* Update NavigationIconButton.tsx

* Update NavigationBar.tsx

* update

* Update light.css

* updated some colors

* light mode updated

* hacked

* prettier

---------

Co-authored-by: Francesco Sansalvadore <f.sansalvadore@gmail.com>
Co-authored-by: Kevin Grüneberg <k.grueneberg1994@gmail.com>
2024-02-15 16:56:18 +01:00
Terry Sutton
cc008ef983 Feat/homepage connect modal combined (#20328)
* First

* Update

* Move connection string panel to its own component

* Add connection strings

* Format button

* Add dummy files to get logic working

* Add mdx packages

* add file handling and change logic

* Support connections

* Fix icons, add direct and graphql

* Remove mdx stuff

* Add pooler toggle

* Fix child logic

* Fix grandchild logic

* Refactor data object

* Move back to dialog ui

* Refactor to shadcn tabs

* Find the files

* Wire up icons

* Loop over connection types

* Reformat file paths

* Remove from project home

* fix tab rendering issue

* Check for unique keys

* Add new libs

* comment

* Add direct connection ui

* Get project connection strings

* Cleanup

* Add project keys

* Add types file

* Undo update

* Add next app files

* Add files

* Add next pages files

* Add nuxt

* Fix env vars

* Add rest of frameworks, graphql and orms

* Add orms

* Fix types

* Add guide links

* Run prettier

* Separate graphql

* Move ui

* Move direct connection to first position

* Move to single files

* Update styling

* Fix locations

* Fix next content

* Fix dialog close button, add proper light mode theme

* Fix dialog style issues

* CleanupA

* Pin to top

* Feat/homepage connect modal combined  styling update (#21079)

* chore: update styling. also moved useStates as it was sort of duplicated

* Cleanup

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>

* Close pooler modal

* Make the db connection panel blend in

* Allow for DatabaseSelector

* Dont open by default

* Some fixes

* Set min height to loader

* Fix

* Small styling fixes for table editor sort filter popover

* Make connect button stand out

---------

Co-authored-by: Jordi Enric <jordi.err@gmail.com>
Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-02-15 09:25:17 -03:30
Inian
9042afeeed clarify realtime pricing (#21197)
users werent sure of pricing of broadcast and presence. confirming the pricing is the same across all three
2024-02-12 15:18:03 +00:00