Commit Graph
1197 Commits
Author SHA1 Message Date
Charis 3abd39365c fix: fix color of ai code blocks in light mode (#21795) 2024-03-06 14:32:46 +08:00
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-MuirandJoshen Lim 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-MuirandJoshen Lim 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
CharisandHan Qiao 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-MuirandIvan Vasilov 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 SuttonandJoshen Lim 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 SuttonandIvan Vasilov 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 LimandJonathan Summers-Muir 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-MuirandIvan Vasilov 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-MuirandIvan Vasilov 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 SansalvadoreandJonathan Summers-Muir 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 VasilovandJoshen Lim 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
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
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
Ivan VasilovandTerry Sutton 5754c23abb feat: Move some components into ui-patterns (#20774)
* Change all imports in the ui package which import via the @ui shortcut.

* Add a new ui-patterns package. Add it to all apps.

* Migrate PrivacySettings from ui to ui-patterns.

* Migrate ConsentToast from ui to ui-patterns.

* Remove providers folder from ui package.

* Move GlassPanel.

* Migrate IconPanel.

* Migrate TweetCard.

* Migrate ThemeImage.

* Remove LWXCountdownBanner.

* Migrate CountdownWidget.

* Migrate SchemaTableNode.

* Migrate ExpandableVideo.

* Migrate ThemeToggle.

* Fix bunch of imports in the docs app.

* Revert some unnecessary changes.

* Expand the README.md.

* Fix the tailwind configs, they were using old folder structure.

* Fix leftover merge conflicts.

* Remove a deleted page in master.

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>
2024-02-12 12:44:00 +01:00
Ivan Vasilov 4dac01e378 chore: Migrate Clippy to Nextjs API docs (#20903)
* Add a new function to ai-commands package.

* Add a new API route to all three apps.

* Refactor the Command component to use the new URL.

* Resort the imports.
2024-02-12 10:10:52 +01:00
Francesco Sansalvadore f2dd84a995 Mobile banner padding (#21103)
improve www mobile banner padding
2024-02-12 13:21:01 +08:00
Greg Richardson 17a982f24d Update AI models to gpt-3.5-turbo-0125 (#21090)
* chore: update ai models to gpt-3.5-turbo-0125

* fix(ai): prompt to use semicolons in sql gen

* fix: parse multiline policy expressions
2024-02-09 12:29:12 -07:00
Jonathan Summers-MuirandJoshen Lim 59d64b9375 chore: update a11y and styles of notifications v2 (#21124)
* chore: update a11y and styles of notifications v2

* background update

* Remove unused import

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-02-09 14:48:42 +08:00
Charis eff1e0a55b fix: error with quotes in search results (#20957)
* fix: error with quotes in search results

Search results with double quotes in the title need to be escaped or
cmdk's
`document.querySelector` will throw an error for invalid selector (since
the selector is wrapped in double quotes).

Also add and error boundary so errors in command menu don't crash the
entire site.

* format
2024-02-08 17:56:50 -05:00
Jordi Enric dab78a1db8 rm unused line-clamp tailwind plugin (#21057)
* rm unused thing

* rm unnecessary dependency
2024-02-08 12:51:13 +01:00
Charis e502514a42 fix: force mount docs search (#20959)
Force mount docs search across all command menus. There's probably a
good question here about whether www/dashboard want docs search to be
stuck at the top all the time, but that's out of scope. For now, just
make sure users can search long strings of text without the search
option disappearing on them.

Also refactor force mounting to use cmdk's native option, which is now
released.
2024-02-08 11:39:54 +01:00
Kevin Grüneberg bbda1aaee7 chore: adjust copy around SLAs (#21102) 2024-02-08 02:10:49 +00:00
Charis e20038e2f2 refactor: move auth guides into content directory (#20777)
Begin the process of moving our MDX files into their own content directory.

Fixed a few minor bugs re: ToC and tabs not rerendering consistently on page navigation. (The ToC thing wasn't a problem before the refactor, the tabs thing is a problem on prod.)

Moved MDX files can't import their own components, so everything they require needs to be back in the component prop for mdx-remote's serializer. Cleaned this up a bit and lazy-loaded heavy/rare stuff. Also, the component prop doesn't take arbitrary objects (only actual components), so imported data has to be wrapped in a component.
2024-02-07 17:25:08 +00:00
Francesco Sansalvadore 70b9a6bcc5 Pricing page update (#20744) 2024-02-07 12:59:25 +08:00
hallidayo 5111de0560 fix: mobile search width (#20978) 2024-02-06 15:59:47 -05:00
Jordi Enric 44b9ce3e5f feat: query performance improvements (#20907)
* very wip

* add expandable rows

* fix table layout, collapsible row, spacing issues

* use new query with filters everywhere

* rm unused queries

* rm unused fn

* improve loading state

* fix text overflowing in role

* rm padding so that table doesn't always need scroll

* fix icon in search input

* add latency to table row heading to clarify what col youre sorting with

* rm unused imports

* run prettier

* align sql with row content

* add syntax highlighting and sort icons

* rm copy btn

* move tailwind dep to correct package, rm unused syntax highlighting, rm unused component
2024-02-06 15:47:22 +01:00
Jonathan Summers-Muir 778a3b21bb Chore/add feedback links branching (#20926)
* chore: update cmdk

* add link to branch dropdown

* chore: add button

* update

* Update BranchDropdown.tsx
2024-02-01 17:22:46 +08:00
Ivan Vasilov a506587a71 fix: Change all imports in the ui package which import via the @ui shortcut. (#20745)
* Change all imports in the ui package which import via the @ui shortcut.

* Fix also all shadcn stories.
2024-01-31 11:29:20 +01:00
Kevin Grüneberg f7e60bf324 chore: upgrade prettier/eslint + autofix (#20785) 2024-01-30 10:54:02 +08:00
CharisandGreg Richardson d6234f823a fix: include integrations in our search indexes (#20709)
Co-authored-by: Greg Richardson <greg.nmr@gmail.com>
2024-01-26 15:20:54 -05:00
Kevin Grüneberg 7c52592670 fix: SSR warning for aria-selected prop (#20754) 2024-01-26 03:44:56 +00:00
Charis 5e05260d31 fix some styling in command menu (#20752) 2024-01-25 21:56:40 -05:00
Jordi Enric 3f057b12f4 feat: add reports navigation items to cmdk menu (#20733)
add reports navigation items to cmdk menu
2024-01-25 10:16:40 +00:00