Keyframe graphs and markers#34
Conversation
Keyframes are drawn over the clip, Ctrl+Left/Right Arrow moves the playhead to the nearest keyframe.
📝 WalkthroughWalkthroughAdds clip keyframe diamonds, direct and keyboard keyframe navigation, and inspector keyframe graphs with interpolated curves and click-to-seek interaction. Updates monitor markup, styling, shortcut help, and Motion documentation. ChangesKeyframe visualization and navigation
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant Inspector
participant state
participant KeyframeGraphs
participant Timeline
Inspector->>state: Toggle property graph
state->>KeyframeGraphs: Render graph card
KeyframeGraphs->>KeyframeGraphs: Draw curve and keyframes
KeyframeGraphs->>Timeline: Seek from pointer position
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
app.js (1)
2005-2012: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winProperty-label graph toggles are mouse-only (keyboard users can't open graphs).
propLabelrenders an interactive<label class="kf-graph-toggle">whose only activation path is aclickhandler (Line 2242). A bare<label>is not focusable or operable via keyboard, so keyboard-only users have no way to open/close the keyframe graphs. Consider making it a real control (e.g.role="button"+tabindex="0"with a keydown handler, or a<button>).♿ Proposed change
- return `<label class="kf-graph-toggle${on}${has}" data-kfgraph="${k}" title="Show / hide keyframe graph">${label}</label>`; + return `<label class="kf-graph-toggle${on}${has}" data-kfgraph="${k}" role="button" tabindex="0" aria-pressed="${state.kfGraphs.has(k)}" title="Show / hide keyframe graph">${label}</label>`;And handle keyboard activation alongside the existing click handler:
els.inspector.querySelectorAll("[data-kfgraph]").forEach((lab) => { lab.addEventListener("click", (e) => { e.preventDefault(); toggleKfGraph(lab.dataset.kfgraph); }); + lab.addEventListener("keydown", (e) => { + if (e.key === "Enter" || e.key === " ") { + e.preventDefault(); + toggleKfGraph(lab.dataset.kfgraph); + } + }); });🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@app.js` around lines 2005 - 2012, Make the interactive keyframe graph label generated by propLabel keyboard-accessible by giving it button semantics and keyboard focusability, then extend the existing graph-toggle handler near the click listener to activate on Enter and Space while preserving click behavior. Ensure keyboard activation invokes the same graph show/hide logic and prevents default scrolling where appropriate.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@app.js`:
- Around line 2005-2012: Make the interactive keyframe graph label generated by
propLabel keyboard-accessible by giving it button semantics and keyboard
focusability, then extend the existing graph-toggle handler near the click
listener to activate on Enter and Space while preserving click behavior. Ensure
keyboard activation invokes the same graph show/hide logic and prevents default
scrolling where appropriate.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: b7cb97d8-b582-494c-8cce-d6f513cc0fab
📒 Files selected for processing (4)
README.mdapp.jsindex.htmlstyle.css
What does this PR do?
Visualizes keyframes. Keframes are displayed on a clip itself (with a counter if more than one effects is keyed at certain time point), and/or, when a property label is clicked, as a small overlay with a graph that is also clickable. Ctrl+⇒/⇐ jumps between keyframes.
Type of change
How was it verified?
node --check server.js && node --check app.js && node --check mcp-server.jspassesCLAUDE.md/README.mdif the schema, props, or API changedChecklist
Summary by CodeRabbit