fix: improve studio timeline discoverability#431
Conversation
Review notesBranch is well-scoped and clearly motivated. Two real issues, plus a few nits/follow-ups. Issues1. Cross-origin iframe will throw
const syncPreviewTimelineHotkey = useCallback(
(iframe: HTMLIFrameElement | null) => {
const nextWindow = iframe?.contentWindow ?? null;
if (previewHotkeyWindowRef.current === nextWindow) return;
if (previewHotkeyWindowRef.current) {
previewHotkeyWindowRef.current.removeEventListener("keydown", handleTimelineToggleHotkey);
}
previewHotkeyWindowRef.current = nextWindow;
nextWindow?.addEventListener("keydown", handleTimelineToggleHotkey);
},Today the preview src is same-origin ( try {
previewHotkeyWindowRef.current?.removeEventListener("keydown", handleTimelineToggleHotkey);
} catch {
// cross-origin or detached window
}
previewHotkeyWindowRef.current = nextWindow;
try {
nextWindow?.addEventListener("keydown", handleTimelineToggleHotkey);
} catch {
previewHotkeyWindowRef.current = null;
}2. Hint never appears for first-time users on an empty composition {timelineVisible && timelineElements.length > 0 && !timelineEditorHintDismissed && (...)}The Nits / follow-ups
VerdictLGTM with two small asks before merge: add |
Summary
Shift+ThintShift+Thotkey for showing and hiding the timeline from both the Studio shell and preview iframeTesting
hyperframes previewsession, including a recording pass for show/hide and dismiss persistencehttps://www.loom.com/share/02d914b28434482cbe8ca0bc889a1655