* Add a generateDeterministicUuid function and tests for it.
* Use the new function and generate an id automatically when creating a snippet.
* Clean up extra code.
* Don't pass in id when creating a snippet.
* Add generateSnippetTitle function and use it instead of fixed string.
* When SQL editor is open, generate an id form a generated snippet title.
* Add id override for SQL editor to avoid flash when saving the snippet.
* Merge the two generate functions to happen in the same useMemo block.
* Save the snippet to the API when adding it.
* Minor fixes from CodeRabbit review.
* Hide new folder CTA in sql editor for self-hosted
* Don't add the snippet for saving, just set the value.
* UpsertContentPayload always has an id.
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* Update perms checking in audit logs
* Deprecate useCheckPermissions, useIsPermissionsLoaded and useCheckProjectPermissions as they're no longer used
* Rename useAsyncCheckProjectPermissions to useAsyncCheckPermissions
* Fix TS
* 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>
* init
* Update inner-side-menu.mdx
* chore: update SQL sidebar to use ui pattern components
* mor
* Update
* Update index.tsx
* init: merge table editor and sql editor and schema visualization together
* more
* move to valtio
* fix issue with Command+B shortcut
* now shows in treeviews if item is opened in tab
* Update ProjectLayout.tsx
* fix sidebar
* fix schema selector for non explorer version
* show schema name in tabs
* added schema names to tabs
* tabs have been updated to support preview tabs
* fix URL issue
* add empty state stuff
* Update SQLEditorNav.tsx
* preview tab works now
* more tabs stuff. 'new' tab also added
* new tab concept
* updates
* fix type errors
* remove unused files
* update test
* move back button, fix width issues on sidebar
* update sidebar logic
* Update ProjectLayout.tsx
* lots of updates. layouts now streamlined. localstorage for tabs in use
* moar
* bunch of new tab logic
* fix empty tab issue
* Update tabs.ts
* layouts switched
* new pages now have fixed layouts
* fix tabs
* fix code bg
* add tabs support for multiple project refs
* intialization issue
* update ID handling
* fixed isOpened state for SQL snippets
* remove old assistant because its bugging up panels
* preview style works in sql editor
* fix border
* removes preview tab if there is one
* fix background of loading skeleton
* lots of issues with types/icons/redirect
* new tab cards
* snippets in empty state now work
* moar stuff
* tabs now in feature flags
* Update tabs.ts
* Update tabs.ts
* moar
* add feature previews
* remove code not needed
* Update next-env.d.ts
* Delete FeaturePreviewModal.tsx
* fix typescript errors. remove more explorer stuff
* remove explorer files
* fixed issues with templates and quickstarts tab
* fixed active state when tabs are not opted in
* logic error
* fix open/highlight issue when opted out of tabs
* templates/quickstarts now displayed with new cards
* Update recent-items.tsx
* Update new-tab.tsx
* add icon back in
* add old empty state back in
* recent items updated to respect project ref
* localstorage cleanup on deletion
* moar
* overflow tabs now working
* correct tab names used for new sql templates/quickstarts
* ongoing queries fix
* cleanup
* update images
* Update RouteValidationWrapper.tsx
* Update AppLayout.tsx
* Update NavigationBar.tsx
* add headers back into side panels
* improve writing
* tabs now drag and drop a billion times better
* Update tabs.tsx
* Update tabs.tsx
* init issues on stores, which caused a race condition.
* fix hydration error
* fix new tab issue in sql
* Update ProjectLayout.tsx
* Update pnpm-lock.yaml
* Update new-tab.tsx
* move EditorMenuListSkeleton
* Fix type issues
* fixes: DESIGN-87
fixes: DESIGN-87
* refactor sort/filter components
* Update rules-set-button-text.tsx
* remove discussions for now
* small styling fixes
* Update FeaturePreviewModal.tsx
* Update FeaturePreviewModal.tsx
* Update RouteValidationWrapper.tsx
* revert
* revert
* revert
* revert
* revert
* more revert
* Update collapse-button.tsx
* Update SQLEditorTreeViewItem.tsx
* revert
* Update SchemaGraph.tsx
* Delete new-upcoming.tsx
* revert
* Update ProjectLayout.tsx
* fix home link
* Update table-editor.spec.ts
* test update
* Update table-editor.spec.ts
* Fix the playwright tests.
* layout fixes
* layout fix
* revert sort/filter
* Update LastSignInWrapper.tsx
* revert
* revert
* remove
* update file names
* revert
* revert
* revert
* Fix TreeView console error props
* Add guards in SQL Editor to ensure that feature preview tabs changes do not affect existing UI when flag is off
* Fix missing DefaultLayout in SQL editor templates + fix New tab
* Remove console log
* Remove DatabaseSelector for SQL editor on local
* Fix SQL editor shared favorites for local
* Fix test
* Ensure NewTab doesn't show up if flag is not toggled for SQL editor
* Decouple UI state changes from content-query and entity-types-infinite-query
* Fix tab closing unnecessary rerouting
* Beef up feature previews
* Fix create new table from table editor new tab
* Fix tabs getting incorrectly reset when going between table and SQL editors
* Fix last visited SQL snippet for both tabs and not tabs
* Fix last visited table for table editor tabs
* Clear dashboard history when closing last tab
* Fix loading dashboard history
* Add comment to refactor stores
* Ensure we only save up to 8 items for recent items for each type
* Remove unneccesary logic in tabs
* Smol style fix for DeleteAccountButton
* Smol fix
* Fix inability to close New tab
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Alaister Young <a@alaisteryoung.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
* SheetProvider in studio
* mobile global nav
* view sub navigation
* fix ProjectLayout conditional
* Account mobile layout
* width
* hide
* layout
* overflow
* responsive button
* overflow
* fix mobile nav if IS_PLATFORM
* refactor
* hide if no content
* show command menu item on mobile
* ui-patterns sheet provider
* use client
* show if productMenu
* show if productMenu
* drag to close
* drag to close
* 16px input fontsize on inputs to avoid zoom on mobile
* offscreen test element
* offscreen test element
* offscreen test element
* update test
* update test
* update test
* pb
* test?
* test
* test
* test
* spec-click-target
* remove console
* remove unused import
* add dependency to sheet content
* close sheet on router.asPath change
* remove provider and use simple Sheet
* update sidebar mobile
* align labels
* avoid input zoom on mobile
* remove yo
* 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
* Deprecate use of sqlFolderOrganizationFlag
* Deprecate SQLEditorNavV1
* Deprecate use of useSqlEditorStateSnapshot
* Deprecate old sql-editor valtio state
* 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>
* Init changes for sql fodlers
* Added upsert logic in sql-editor-v2 valtio, hooked up with templates and quickstarts
* Do up logic for creating new snippets by typing in /new or by clicking new query button
* Do up logic for updating and deleting snippets
* Do up logic for favourites and shared snippets
* Do up logic for favourites and shared snippets
* Fix
* Fix saving indicator, add empty states for favorites and shared snippets
* Implement sorting
* Some minor QOL improvements
* Minor fix on empty state for private snippets
* Add delete folder mutation
* Implement create and update folder
* Fix reinstate with AI renaming for new snippets under folder
* Support controlled multi select behaviour in private snippets
* Undo changes to tree-view-multi-select
* Support bulk deletes
* Support moving queries + rendering queries in folders
* Support deleting folders and creating a new folder when moving a query
* Fix bug where renaming query removes content
* Add initial loading state in sql editor nav + handle fallback if cannot retrieve content by id
* Fix some spelling
* Fix TS issue in sql folders mutation keys
* Fix toggling favorite
* Lint
* Revert fallback behaviour in ]id] for now
* Fix favorites and shared snippets not showing
* Fix moving currently opened snippet leads to loading
* Support bulk moving
* Improve multi select logic a little
* Nit lint
* Reinstate AI retitling for untitled snippets when running query
* Remove hardcode in useAFlag
* Support creating new snippet in a folder directly
* Fix sharing snippets that are within a folder
* Fix sharing snippets within a folder
* Fix favorite
* Add loading state when fetching folder contents
* Fix favoriting snippets in folders
* 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
* 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.