fix(studio): address timeline PR review — drop dead code, add fadeIn keyframes, compSrc test

This commit is contained in:
Miguel Ángel
2026-05-20 23:54:19 -04:00
parent ef2ff298b6
commit 36898f7681
5 changed files with 80 additions and 30 deletions
@@ -5,7 +5,6 @@ interface CompositionThumbnailProps {
previewUrl: string;
label: string;
labelColor: string;
accentColor?: string;
selector?: string;
selectorIndex?: number;
seekTime?: number;
@@ -52,7 +51,6 @@ export const CompositionThumbnail = memo(function CompositionThumbnail({
previewUrl,
label,
labelColor,
accentColor: _accentColor = "#6B7280",
selector,
selectorIndex,
seekTime = 2,
@@ -112,7 +110,7 @@ export const CompositionThumbnail = memo(function CompositionThumbnail({
{loaded && (
<div
className="absolute inset-0 flex"
style={{ animation: "fadeIn 200ms ease-out", mixBlendMode: "lighten" }}
style={{ animation: "hf-thumb-fade 200ms ease-out", mixBlendMode: "lighten" }}
>
{Array.from({ length: frameCount }).map((_, i) => (
<div
@@ -35,17 +35,13 @@ export interface TimelineTheme {
clipRadius: string;
}
const UNIFIED_STYLE: TimelineTrackStyle = {
const TRACK_STYLE: TimelineTrackStyle = {
clip: "#1c2028",
accent: "#3CE6AC",
label: "#dde1e8",
iconBackground: "rgba(255,255,255,0.06)",
};
function createTrackStyle(_tag: string): TimelineTrackStyle {
return UNIFIED_STYLE;
}
export const defaultTimelineTheme: TimelineTheme = {
shellBackground: "#0A0A0B",
shellBorder: "rgba(255,255,255,0.05)",
@@ -74,16 +70,8 @@ export const defaultTimelineTheme: TimelineTheme = {
clipRadius: "6px",
};
export function getTimelineTrackStyle(tag: string): TimelineTrackStyle {
const normalized = tag.toLowerCase();
if (
normalized.startsWith("h") &&
normalized.length === 2 &&
"123456".includes(normalized[1] ?? "")
) {
return createTrackStyle("h1");
}
return createTrackStyle(normalized);
export function getTimelineTrackStyle(_tag: string): TimelineTrackStyle {
return TRACK_STYLE;
}
export function getClipHandleOpacity({