From 4ee877aaec7794a805f25958d9410bc8343caef4 Mon Sep 17 00:00:00 2001 From: Kacper Wojciechowski <39823706+jog1t@users.noreply.github.com> Date: Sat, 14 Dec 2024 23:38:31 +0100 Subject: [PATCH] feat: new onboarding --- apps/hub/src/components/command-panel.tsx | 10 ++++ .../command-panel-navigation-provider.tsx | 11 +++- .../environment-command-panel-page.tsx | 2 +- apps/hub/src/components/error-component.tsx | 2 + apps/hub/src/components/get-started.tsx | 51 ++----------------- .../components/header/header-route-loader.tsx | 7 +-- apps/hub/src/components/intro.tsx | 35 ++++++++++--- apps/hub/src/components/shimmer-line.tsx | 17 +++++++ .../forms/group-create-project-form.tsx | 4 +- .../domains/project/queries/backend/types.ts | 2 +- .../routes/_authenticated/_layout/index.tsx | 8 ++- .../$environmentNameId/actors.tsx | 18 ++++--- .../components/src/lib/create-schema-form.tsx | 5 +- 13 files changed, 97 insertions(+), 75 deletions(-) create mode 100644 apps/hub/src/components/shimmer-line.tsx diff --git a/apps/hub/src/components/command-panel.tsx b/apps/hub/src/components/command-panel.tsx index 56da85e8..0bbdad5f 100644 --- a/apps/hub/src/components/command-panel.tsx +++ b/apps/hub/src/components/command-panel.tsx @@ -7,6 +7,7 @@ import { CommandLoading, cn, } from "@rivet-gg/components"; +import { useIsFetching } from "@tanstack/react-query"; import { useMatchRoute } from "@tanstack/react-router"; import { type KeyboardEventHandler, @@ -25,6 +26,7 @@ import { EnvironmentCommandPanelPage } from "./command-panel/command-panel-page/ import { GroupCommandPanelPage } from "./command-panel/command-panel-page/group-command-panel-page"; import { IndexCommandPanelPage } from "./command-panel/command-panel-page/index-command-panel-page"; import { ProjectCommandPanelPage } from "./command-panel/command-panel-page/project-command-panel-page"; +import { ShimmerLine } from "./shimmer-line"; export function CommandPanel() { const [isOpen, setOpen] = useState(false); @@ -125,6 +127,11 @@ export function CommandPanel() { [pages.length, search], ); + const isLoading = + useIsFetching({ + predicate: (query) => !query.queryKey.includes("watch"), + }) > 0; + return ( <>