From 25be7027f34808db5e318bc93de8afa1c94f2138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Tue, 18 Nov 2025 08:16:41 +0100 Subject: [PATCH] refactor: make effects section always visible with inline collapse toggle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Removed "Devices" button from control panel - Effects section now always present below each track - Collapsible via chevron in the effects header itself - Click header to expand/collapse the device rack - "+" button in header to add effects (with stopPropagation) - Each track has independent collapse state - Hover effect on header for better UX This matches the typical DAW layout where each track has its own device section that can be individually collapsed/expanded. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- components/tracks/Track.tsx | 105 +++++++++++++++--------------------- 1 file changed, 44 insertions(+), 61 deletions(-) diff --git a/components/tracks/Track.tsx b/components/tracks/Track.tsx index e49c009..48c6548 100644 --- a/components/tracks/Track.tsx +++ b/components/tracks/Track.tsx @@ -390,27 +390,6 @@ export function Track({ : `R${Math.round(track.pan * 100)}`} - - {/* Devices Toggle Button */} - {!track.collapsed && ( -
- -
- )} )} @@ -460,54 +439,58 @@ export function Track({ {/* Bottom: Effects Section (Collapsible, Full Width) */} - {showEffects && !track.collapsed && ( + {!track.collapsed && (
{/* Effects Header */} -
- - Devices ({track.effectChain.effects.length}) - +
setShowEffects(!showEffects)} + >
- - + {showEffects ? ( + + ) : ( + + )} + + Devices ({track.effectChain.effects.length}) +
+
{/* Horizontal scrolling device rack */} -
-
- {track.effectChain.effects.length === 0 ? ( -
- No devices. Click + to add an effect. -
- ) : ( - track.effectChain.effects.map((effect) => ( - onToggleEffect?.(effect.id)} - onRemove={() => onRemoveEffect?.(effect.id)} - /> - )) - )} + {showEffects && ( +
+
+ {track.effectChain.effects.length === 0 ? ( +
+ No devices. Click + to add an effect. +
+ ) : ( + track.effectChain.effects.map((effect) => ( + onToggleEffect?.(effect.id)} + onRemove={() => onRemoveEffect?.(effect.id)} + /> + )) + )} +
-
+ )}
)}