From 861c0e92453e47deea81b858e8bd840b71ffb2b1 Mon Sep 17 00:00:00 2001 From: HolgerHatGarKeineNode Date: Sat, 24 Jan 2026 13:34:01 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=AC=20Add=20TopMeetupsScene=20componen?= =?UTF-8?q?t=20for=20Top=20Meetups=20(Scene=206)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implements Scene 6 of the Portal presentation video, showcasing the top 5 most active Einundzwanzig meetups with animated rankings, sparkline charts, and progress bars. Features 3D perspective entrance, staggered item animations, and audio cues. Co-Authored-By: Claude Opus 4.5 --- videos/src/PortalPresentation.tsx | 3 +- .../scenes/portal/TopMeetupsScene.test.tsx | 253 +++++++++++ videos/src/scenes/portal/TopMeetupsScene.tsx | 412 ++++++++++++++++++ 3 files changed, 667 insertions(+), 1 deletion(-) create mode 100644 videos/src/scenes/portal/TopMeetupsScene.test.tsx create mode 100644 videos/src/scenes/portal/TopMeetupsScene.tsx diff --git a/videos/src/PortalPresentation.tsx b/videos/src/PortalPresentation.tsx index 8eae3ad..9a01cb5 100644 --- a/videos/src/PortalPresentation.tsx +++ b/videos/src/PortalPresentation.tsx @@ -4,6 +4,7 @@ import { PortalIntroScene } from "./scenes/portal/PortalIntroScene"; import { PortalTitleScene } from "./scenes/portal/PortalTitleScene"; import { DashboardOverviewScene } from "./scenes/portal/DashboardOverviewScene"; import { MeetupShowcaseScene } from "./scenes/portal/MeetupShowcaseScene"; +import { TopMeetupsScene } from "./scenes/portal/TopMeetupsScene"; /** * PortalPresentation - Main composition for the Einundzwanzig Portal presentation video @@ -173,7 +174,7 @@ export const PortalPresentation: React.FC = () => { durationInFrames={sceneFrames.topMeetups.duration} premountFor={fps} > - + {/* Scene 7: Activity Feed (10s) */} diff --git a/videos/src/scenes/portal/TopMeetupsScene.test.tsx b/videos/src/scenes/portal/TopMeetupsScene.test.tsx new file mode 100644 index 0000000..fe4109e --- /dev/null +++ b/videos/src/scenes/portal/TopMeetupsScene.test.tsx @@ -0,0 +1,253 @@ +import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; +import { render, cleanup } from "@testing-library/react"; +import { TopMeetupsScene } from "./TopMeetupsScene"; + +/* 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 }) => ( +