From 5d9e02fe9582665cc1e571c7da64ccf251f9345e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Wed, 19 Nov 2025 16:32:49 +0100 Subject: [PATCH] feat: streamline track and master controls layout consistency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Streamlined track controls and master controls to same width (240px) - Fixed track controls container to use full width of parent column - Matched TrackControls card structure with MasterControls (gap-3, no w-full/h-full) - Updated outer container padding from p-2 to p-4 with gap-4 - Adjusted track controls wrapper to center content instead of stretching - Added max-width constraint to PlaybackControls to prevent width changes - Centered transport control buttons in footer 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- components/automation/AutomationHeader.tsx | 5 +- components/automation/AutomationLane.tsx | 12 +- components/editor/AudioEditor.tsx | 4 +- components/editor/PlaybackControls.tsx | 4 +- components/tracks/Track.tsx | 152 +++-------- components/tracks/TrackControls.tsx | 124 +++++++-- components/tracks/TrackFader.tsx | 62 ++++- components/tracks/TrackList.tsx | 303 +++++++++++++++++---- types/track.ts | 5 +- 9 files changed, 457 insertions(+), 214 deletions(-) diff --git a/components/automation/AutomationHeader.tsx b/components/automation/AutomationHeader.tsx index 000113b..8d20f03 100644 --- a/components/automation/AutomationHeader.tsx +++ b/components/automation/AutomationHeader.tsx @@ -69,10 +69,13 @@ export function AutomationHeader({ return (
+ {/* Automation label - always visible */} + Automation + {/* Color indicator */} {color && (
{ if (!containerRef.current) return 0; const width = containerRef.current.clientWidth; - return (time / duration) * width * zoom; + return (time / duration) * width; }, - [duration, zoom] + [duration] ); // Convert value (0-1) to Y pixel position (inverted: 0 at bottom, 1 at top) @@ -58,9 +58,9 @@ export function AutomationLane({ (x: number): number => { if (!containerRef.current) return 0; const width = containerRef.current.clientWidth; - return (x / (width * zoom)) * duration; + return (x / width) * duration; }, - [duration, zoom] + [duration] ); // Convert Y pixel position to value (0-1) @@ -209,7 +209,7 @@ export function AutomationLane({ const width = rect.width; // Calculate new time and value - const timePerPixel = duration / (width * zoom); + const timePerPixel = duration / width; const valuePerPixel = 1 / lane.height; const newTime = Math.max(0, Math.min(duration, point.time + deltaX * timePerPixel)); @@ -217,7 +217,7 @@ export function AutomationLane({ onUpdatePoint(pointId, { time: newTime, value: newValue }); }, - [lane.points, lane.height, duration, zoom, onUpdatePoint] + [lane.points, lane.height, duration, onUpdatePoint] ); const handlePointDragEnd = React.useCallback(() => { diff --git a/components/editor/AudioEditor.tsx b/components/editor/AudioEditor.tsx index ec98a52..1b7d871 100644 --- a/components/editor/AudioEditor.tsx +++ b/components/editor/AudioEditor.tsx @@ -1569,7 +1569,7 @@ export function AudioEditor() { {/* Right Sidebar - Master Controls & Analyzers */} -