* Replace all usage of useProjectContext with useSelectedProjectQuery
* Replace all usage of useSelectedProject with useSelectedProjectQuery
* Replace all usage of useProjectByRef with useProjectByRefQuery
* Replace all usage of useSelectedOrganization with useSelectedOrganizationQuery
* Deprecate useSelectedProject, useSelectedOrganization, and useProjectByRef hooks
* Deprecate ProjecContext
* basic typography classes
* Clean up classes for where we use h1 tags
* Clean up classes for where we use h2, h3, h4
* Clean up classes for where we use h6
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* Refactor restore to new project by breaking into smaller components
* Shift generateStrongPassword into a utils
* Update each notice component in restore to new project to be more consistent
* Add long polling in restore to new project
* Call refetch
* Refactor telemetry event into RQ hook, and update to support PH
* Refactor telemetry identify into RQ hook, and update to support PH
* Refactor telemetry page into RQ hook, and update to support PH
* Clean up and deprecate lib/telemetry
* Pretty
* Add ts-ignore in docs for telemetry calls temporarily
* Add credentials include for send event, page and identify mutation hooks
* Add consent check for event and page telemetry, allow RQ mutations for those to fail silently without a toast
* 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>
* fix: update Permission params
* fix: upgrade check permission hook to support project level role
* fix: usePermissionsLoaded
* fix: Permission params can be undefined
* Scaffold new access management UI
* Add validation
* Update roles view
* Add tooltip
* Add button to apply role to all projects
* Update UI to select projects first instead of roles
* Merge master update UI
* Midway trying to implementation project level perms API
* First pass implementating updating project level permissions
* Add client side validation for assigning/removing roles
* Midway implementing new invites
* Integrate most of the project level permissions functionality
* fix: filter out org-level permissions before checking
* Add relevant UI guards in org level pages for project role POV
* Minor refactors
* Small refactors
* More fixes
* Moar refactors
* More fixes
* More fixes
* Refactor update role logic and smack some test cases on it
* Fixes
* Fix type issue
* Fix type
* more fixes, refactors, adding checks...
* MORE fixes
* Add perms checking for replicas
* Add ButtonTooltip component and use them to prevent repetition of pointer events auto for buttons with tooltips
* Convert all buttons with tooltips to use ButtonTooltip
* refactor
* PRettier
* Small fix
* Remove commented out code in organization-invitation-accept-mutation
* fix: switch to use the platform oauth authorizations routes
* Add perms checking for org audit logs and org oauth apps
* PRettier
* Fix incorrect URL for oauth app flow
* Fix incorrect URL for oauth app flow
* Fix
* Add perms checking for warehouse related UI
* Update roles helper icon
* remove unused lib
* Update package lock... again
* Update package lock... again
* Smalllll update
* Update some checks
* Add gate for project level permissions
* Last fix
* update codegen
* Update warehouse endpoint routes
* Fix
---------
Co-authored-by: phamhieu <phamhieu1998@gmail.com>
Co-authored-by: Alaister Young <a@alaisteryoung.com>
* Init replication lag chart in database reports
* Navigate to replication lag chart via query params
* Add view replication lag CTA in map view
* Add replication lag metric to instance node view
* Prettier
* fix: open connection string docs link in new tab
* ci: Autofix updates from GitHub workflow
---------
Co-authored-by: github-tidy-bot <github-tidy-bot@supabase.com>
* 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>
* 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
* Midway
* Show respective pooler parameters based on selected database
* Add optional params to DatabaseSelector to de-async state between connection string and connection params on database settings page
* remove badge
* 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>
* Midway shifting some stuffs
* Add alert when setting to session mode, and default to session mode in usePoolerConnection
* Update copy
* Update copy
* Update pooling mode dropdown in usePoolerConnection
* 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
* Slight refactor to DatabaseConnectionString
* Add IPv4 deprecation warning to database connection strings + link to pooler settings
* Add description in connection pool url to show the format
* Add badges to connection settings and connection pooling settings RE resolving to ipv4 or ipv6
* Add default pooler size as placeholder in connection pooling depending on compute instance size
* Fix badge
* Add note to use session pool mode in pooler settings if using prepared statements in db
* Shift connection pooling settings up top and change titles of panels
* Fix
* Update pooling size default value based on compute size
* Show max client conns for supavisor pooling settings
* Adjust copywriting
* Combine database settings and connection strings sections
* Address comments
* Update description to use 5432 as alternative for pooling when using prepared statements
* Fix
* 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>
* 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