From 41acbc93245a34de28d39a8d70a0916b8ad66ac6 Mon Sep 17 00:00:00 2001 From: HolgerHatGarKeineNode Date: Sat, 24 Jan 2026 13:20:56 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=AC=20Add=20DashboardOverviewScene=20c?= =?UTF-8?q?omponent=20for=20Dashboard=20Overview=20(Scene=203)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implements the 12-second Dashboard Overview scene featuring: - 3D perspective entrance animation (rotateX 30° → 0°, scale 0.85 → 1.0) - DashboardSidebar with staggered navigation items - Three StatsCounter cards (Meetups: 204, Users: 1247, Events: 89) - SparklineCharts showing trend data for each metric - Activity feed section with recent meetup activities - Quick stats section with country and user metrics - Audio: card-slide.mp3 and ui-appear.mp3 sound effects - Vignette overlay and dark theme styling Includes 23 comprehensive tests covering all components and animations. Co-Authored-By: Claude Opus 4.5 --- videos/src/PortalPresentation.tsx | 3 +- .../portal/DashboardOverviewScene.test.tsx | 312 +++++++++++ .../scenes/portal/DashboardOverviewScene.tsx | 495 ++++++++++++++++++ 3 files changed, 809 insertions(+), 1 deletion(-) create mode 100644 videos/src/scenes/portal/DashboardOverviewScene.test.tsx create mode 100644 videos/src/scenes/portal/DashboardOverviewScene.tsx diff --git a/videos/src/PortalPresentation.tsx b/videos/src/PortalPresentation.tsx index 108e8e3..0d1aa13 100644 --- a/videos/src/PortalPresentation.tsx +++ b/videos/src/PortalPresentation.tsx @@ -2,6 +2,7 @@ import { AbsoluteFill, Sequence, useVideoConfig, Img, staticFile } from "remotio import { inconsolataFont } from "./fonts/inconsolata"; import { PortalIntroScene } from "./scenes/portal/PortalIntroScene"; import { PortalTitleScene } from "./scenes/portal/PortalTitleScene"; +import { DashboardOverviewScene } from "./scenes/portal/DashboardOverviewScene"; /** * PortalPresentation - Main composition for the Einundzwanzig Portal presentation video @@ -144,7 +145,7 @@ export const PortalPresentation: React.FC = () => { durationInFrames={sceneFrames.dashboardOverview.duration} premountFor={fps} > - + {/* Scene 4: Meine Meetups (12s) */} diff --git a/videos/src/scenes/portal/DashboardOverviewScene.test.tsx b/videos/src/scenes/portal/DashboardOverviewScene.test.tsx new file mode 100644 index 0000000..fb573ef --- /dev/null +++ b/videos/src/scenes/portal/DashboardOverviewScene.test.tsx @@ -0,0 +1,312 @@ +import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; +import { render, cleanup } from "@testing-library/react"; +import { DashboardOverviewScene } from "./DashboardOverviewScene"; + +/* eslint-disable @remotion/warn-native-media-tag */ +// Mock Remotion hooks +vi.mock("remotion", () => ({ + useCurrentFrame: vi.fn(() => 60), + useVideoConfig: vi.fn(() => ({ fps: 30, width: 1920, height: 1080 })), + interpolate: vi.fn((value, inputRange, outputRange, options) => { + const [inMin, inMax] = inputRange; + const [outMin, outMax] = outputRange; + let progress = (value - inMin) / (inMax - inMin); + if (options?.extrapolateLeft === "clamp") { + progress = Math.max(0, progress); + } + if (options?.extrapolateRight === "clamp") { + progress = Math.min(1, progress); + } + return outMin + progress * (outMax - outMin); + }), + spring: vi.fn(() => 1), + AbsoluteFill: vi.fn(({ children, className, style }) => ( +
+ {children} +
+ )), + Img: vi.fn(({ src, className, style }) => ( + + )), + staticFile: vi.fn((path: string) => `/static/${path}`), + Sequence: vi.fn(({ children, from, durationInFrames }) => ( +
+ {children} +
+ )), + Easing: { + out: vi.fn((fn) => fn), + cubic: vi.fn((t: number) => t), + }, +})); + +// Mock @remotion/media +vi.mock("@remotion/media", () => ({ + Audio: vi.fn(({ src, volume }) => ( +