From 1766f5418763f189e237ce73f980efc1f31353c8 Mon Sep 17 00:00:00 2001 From: Karthikeya Date: Fri, 22 May 2026 01:01:53 +0530 Subject: [PATCH 01/13] fix: trap keyboard focus within onboarding dialog --- src/components/OnboardingTour.tsx | 178 ++++++++++++++++-------------- 1 file changed, 96 insertions(+), 82 deletions(-) diff --git a/src/components/OnboardingTour.tsx b/src/components/OnboardingTour.tsx index d5c163bc..d76f6c28 100644 --- a/src/components/OnboardingTour.tsx +++ b/src/components/OnboardingTour.tsx @@ -2,6 +2,7 @@ import { useEffect, useRef, useState, useCallback } from "react"; import { createPortal } from "react-dom"; +import { FocusTrap } from "focus-trap-react"; const TOUR_KEY = "reframe_onboarding_complete"; @@ -14,7 +15,7 @@ interface TourStep { } const TOUR_STEPS: TourStep[] = [ - { + { targetId: "upload-zone", title: "Drop your video here", description: "Click to browse or drag and drop a video file to get started.", @@ -32,11 +33,11 @@ const TOUR_STEPS: TourStep[] = [ description: "After uploading, set in/out points and tweak colour in the controls that appear on the left.", position: "left", }, - { + { targetId: "export-button", title: "Export your video", description: "Click Export (or press ⌘↵) to process your video locally — nothing ever leaves your device.", - position: "top", + position: "top", }, ]; @@ -198,7 +199,7 @@ function Tooltip({ step, stepIndex, totalSteps, rect, onNext, onSkip, tooltipRef Skip tour + + {/* Text Overlay List */} + {textOverlays.length > 0 && ( +
+ {textOverlays.map((overlay, idx) => ( +
+ + +
+ ))} +
+ )} + + {/* Text Editing Controls */} + {selectedOverlay && ( +
+ {/* Text Input */} +
+ +