feat(timeline): tint video and image clips by element type#796
feat(timeline): tint video and image clips by element type#796avillagran wants to merge 1 commit into
Conversation
Video clips on the timeline previously had a transparent background, which made them blend into the timeline surface and only become visible when selected. Image clips share the same track type as video and therefore had the same problem. This adds a per-element-type tint layer that applies a subtle background colour to clips on the timeline: - video clips: sky tint (\`bg-sky-500/20\`) - image clips: amber tint (\`bg-amber-500/20\`) - audio / text / sticker / graphic / effect: unchanged, still driven by \`TIMELINE_TRACK_THEME\` The new \`TIMELINE_ELEMENT_THEME\` map is a Partial<Record<ElementType, …>> so the element-level theme can override per type while keeping the existing track-level theme as the fallback. A small unit test covers the override and fallback behaviour.
|
@avillagran is attempting to deploy a commit to the OpenCut OSS Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR adds a per-element-type theming layer to timeline elements. The changes introduce ChangesElement-level theming with fallback
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Summary
Video clips on the timeline previously had a transparent background (`TIMELINE_TRACK_THEME.video.elementClassName = "transparent"`), so they blended into the timeline surface and were only visible once selected. Image clips share the same track type as video, so they had the exact same problem.
This PR adds a subtle per-element-type tint:
How
The colour values are intentionally low-alpha so the selected-state and hover styling are still clearly the strongest visual signal on a clip.
Test plan
Notes
Summary by CodeRabbit
New Features
Tests