From fa9ea14e394b32e9702550e0e19346a886bf117d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Tron=C3=AD=C4=8Dek?= Date: Thu, 12 Dec 2024 13:42:37 +0000 Subject: [PATCH] Replace YouTube with Mux for Gitpod demo video --- components/dashboard/package.json | 1 + .../components/podkit/loading/Skeleton.tsx | 39 ++++++++ .../dashboard/src/onboarding/VideoSection.tsx | 51 +++++++++++ .../src/workspaces/EmptyWorkspacesContent.tsx | 32 ++----- yarn.lock | 91 ++++++++++++++++++- 5 files changed, 186 insertions(+), 28 deletions(-) create mode 100644 components/dashboard/src/components/podkit/loading/Skeleton.tsx create mode 100644 components/dashboard/src/onboarding/VideoSection.tsx diff --git a/components/dashboard/package.json b/components/dashboard/package.json index 274a91d2cc6158..a8d9e551570363 100644 --- a/components/dashboard/package.json +++ b/components/dashboard/package.json @@ -10,6 +10,7 @@ "@gitpod/gitpod-protocol": "0.1.5", "@gitpod/public-api": "0.1.5", "@gitpod/public-api-common": "0.1.5", + "@mux/mux-player-react": "^3.1.0", "@radix-ui/react-dropdown-menu": "^2.0.6", "@radix-ui/react-label": "^2.0.2", "@radix-ui/react-popover": "^1.0.7", diff --git a/components/dashboard/src/components/podkit/loading/Skeleton.tsx b/components/dashboard/src/components/podkit/loading/Skeleton.tsx new file mode 100644 index 00000000000000..967e68734c38bf --- /dev/null +++ b/components/dashboard/src/components/podkit/loading/Skeleton.tsx @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2024 Gitpod GmbH. All rights reserved. + * Licensed under the GNU Affero General Public License (AGPL). + * See License.AGPL.txt in the project root for license information. + */ + +import { cn, PropsWithClassName } from "@podkit/lib/cn"; +import { PropsWithChildren } from "react"; + +type SkeletonProps = { + ready: boolean; + failed?: boolean; + hideOnFailed?: boolean; + animate?: boolean; +}; +export const SkeletonBlock = ({ + failed, + ready, + animate, + children, + className, + hideOnFailed, +}: PropsWithChildren): JSX.Element => { + if (ready && children) { + return <>{children}; + } + + return ( +