fix: streamline effects header controls and add Plus button
- Removed absolute positioning from eye icon button - Added Plus button to add effects (currently adds low-pass filter) - All controls now properly inline in normal flex flow - Eye button correctly positioned at end without overlap 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -638,11 +638,11 @@ export function TrackList({
|
|||||||
{!track.collapsed && (
|
{!track.collapsed && (
|
||||||
<div className="flex-shrink-0 bg-card/90 backdrop-blur-sm border-b border-border">
|
<div className="flex-shrink-0 bg-card/90 backdrop-blur-sm border-b border-border">
|
||||||
{/* Effects Header - Collapsible */}
|
{/* Effects Header - Collapsible */}
|
||||||
<div className="relative flex items-center gap-2 px-3 py-1.5 bg-muted/50 border-t border-b border-border/30 overflow-x-auto">
|
<div className="flex items-center gap-2 px-3 py-1.5 bg-muted/50 border-t border-b border-border/30">
|
||||||
<span className="text-xs font-medium flex-shrink-0">Effects</span>
|
<span className="text-xs font-medium flex-shrink-0">Effects</span>
|
||||||
|
|
||||||
{/* Effect name labels */}
|
{/* Effect name labels */}
|
||||||
<div className="flex items-center gap-1.5 flex-1 min-w-0">
|
<div className="flex items-center gap-1.5 flex-1 min-w-0 overflow-x-auto">
|
||||||
{track.effectChain.effects.map((effect) => (
|
{track.effectChain.effects.map((effect) => (
|
||||||
<span
|
<span
|
||||||
key={effect.id}
|
key={effect.id}
|
||||||
@@ -658,7 +658,25 @@ export function TrackList({
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Show/hide toggle - Positioned absolutely on the right */}
|
{/* Add effect button */}
|
||||||
|
<Button
|
||||||
|
variant="ghost"
|
||||||
|
size="icon-sm"
|
||||||
|
onClick={() => {
|
||||||
|
const newEffect = createEffect('lowpass', EFFECT_NAMES['lowpass']);
|
||||||
|
const updatedChain = {
|
||||||
|
...track.effectChain,
|
||||||
|
effects: [...track.effectChain.effects, newEffect],
|
||||||
|
};
|
||||||
|
onUpdateTrack(track.id, { effectChain: updatedChain });
|
||||||
|
}}
|
||||||
|
title="Add effect (Low-pass filter)"
|
||||||
|
className="h-5 w-5 flex-shrink-0"
|
||||||
|
>
|
||||||
|
<Plus className="h-3 w-3" />
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
{/* Show/hide toggle */}
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="icon-sm"
|
size="icon-sm"
|
||||||
@@ -666,7 +684,7 @@ export function TrackList({
|
|||||||
onUpdateTrack(track.id, { effectsExpanded: !track.effectsExpanded });
|
onUpdateTrack(track.id, { effectsExpanded: !track.effectsExpanded });
|
||||||
}}
|
}}
|
||||||
title={track.effectsExpanded ? 'Hide effects' : 'Show effects'}
|
title={track.effectsExpanded ? 'Hide effects' : 'Show effects'}
|
||||||
className="absolute right-2 h-5 w-5 flex-shrink-0"
|
className="h-5 w-5 flex-shrink-0"
|
||||||
>
|
>
|
||||||
{track.effectsExpanded ? (
|
{track.effectsExpanded ? (
|
||||||
<Eye className="h-3 w-3" />
|
<Eye className="h-3 w-3" />
|
||||||
|
|||||||
Reference in New Issue
Block a user