From 0f472034273d9efb9a847fdd65f4ea78e4fe14c7 Mon Sep 17 00:00:00 2001 From: Floh <48927090+Flohhhhh@users.noreply.github.com> Date: Sat, 18 Apr 2026 15:35:51 -0400 Subject: [PATCH 1/3] ui: tighten right panel adjustments spacing Reduce vertical padding in collapsible sections and align adjustment tabs (Color, Curves, Details, Effects) with the controls panel layout. Made-with: Cursor --- src/components/adjustments/Color.tsx | 41 ++++++-------- src/components/adjustments/Curves.tsx | 18 +++--- src/components/adjustments/Details.tsx | 6 +- src/components/adjustments/Effects.tsx | 10 ++-- src/components/panel/right/ControlsPanel.tsx | 9 ++- src/components/ui/CollapsibleSection.tsx | 58 +++++++------------- 6 files changed, 57 insertions(+), 85 deletions(-) diff --git a/src/components/adjustments/Color.tsx b/src/components/adjustments/Color.tsx index ae8733fab..8ec6752ad 100644 --- a/src/components/adjustments/Color.tsx +++ b/src/components/adjustments/Color.tsx @@ -87,9 +87,8 @@ const ColorSwatch = ({ color, name, isActive, onClick }: ColorSwatchProps) => { onTouchEnd={handleMouseUp} >
{ />
-
+
{tabs.map((tab) => { const isActive = activeTab === tab.id; return ( @@ -166,10 +164,9 @@ const ColorGradingPanel = ({ adjustments, setAdjustments, onDragStateChange }: C key={tab.id} onClick={() => setActiveTab(tab.id as '3way' | 'global')} className={`w-7 h-7 rounded-full flex items-center justify-center transition-all focus:outline-none - ${ - isActive - ? 'ring-2 ring-offset-2 ring-offset-surface ring-accent text-text-primary' - : 'bg-bg-secondary text-text-secondary hover:text-text-primary hover:bg-bg-secondary/80' + ${isActive + ? 'ring-2 ring-offset-2 ring-offset-surface ring-accent text-text-primary' + : 'bg-bg-secondary text-text-secondary hover:text-text-primary hover:bg-bg-secondary/80' }`} > {tab.icon} @@ -182,10 +179,9 @@ const ColorGradingPanel = ({ adjustments, setAdjustments, onDragStateChange }: C
-
+
{activeTab === '3way' ? ( -
+
White Balance {!isForMask && toggleWbPicker && (
-
+
Presence @@ -483,7 +478,7 @@ export default function ColorPanel({ />
-
+
Color Grading @@ -495,7 +490,7 @@ export default function ColorPanel({ />
-
+
Color Mixer diff --git a/src/components/adjustments/Curves.tsx b/src/components/adjustments/Curves.tsx index 6a52b06a7..ed397218f 100644 --- a/src/components/adjustments/Curves.tsx +++ b/src/components/adjustments/Curves.tsx @@ -97,9 +97,8 @@ function getCurvePath(points: Array) { const cp2x = p1.x - dx / 3.0; const cp2y = p1.y - (m1 * dx) / 3.0; - path += ` C ${cp1x.toFixed(2)} ${255 - Number(cp1y.toFixed(2))}, ${cp2x.toFixed(2)} ${ - 255 - Number(cp2y.toFixed(2)) - }, ${p1.x} ${255 - p1.y}`; + path += ` C ${cp1x.toFixed(2)} ${255 - Number(cp1y.toFixed(2))}, ${cp2x.toFixed(2)} ${255 - Number(cp2y.toFixed(2)) + }, ${p1.x} ${255 - p1.y}`; } if (points[n - 1].x < 255) { @@ -326,7 +325,7 @@ export default function CurveGraph({ const handlePointStart = (e: any, index: number) => { if (e.button === 2) return; - + if (!e.touches) e.preventDefault(); e.stopPropagation(); @@ -485,17 +484,16 @@ export default function CurveGraph({ }; return ( -
-
+
+
{Object.keys(channelConfig).map((channel: any) => (
+
{adjustmentVisibility.sharpening !== false && ( -
+
Sharpening @@ -46,7 +46,7 @@ export default function DetailsPanel({ )} {adjustmentVisibility.presence !== false && ( -
+
Presence diff --git a/src/components/adjustments/Effects.tsx b/src/components/adjustments/Effects.tsx index e680a8fda..3b8433389 100644 --- a/src/components/adjustments/Effects.tsx +++ b/src/components/adjustments/Effects.tsx @@ -46,7 +46,7 @@ export default function EffectsPanel({ return (
-
+
Creative @@ -85,8 +85,8 @@ export default function EffectsPanel({
{!isForMask && ( -
-
+
+
LUT @@ -101,7 +101,7 @@ export default function EffectsPanel({
{adjustmentVisibility.vignette !== false && ( -
+
Vignette @@ -149,7 +149,7 @@ export default function EffectsPanel({ )} {adjustmentVisibility.grain !== false && ( -
+
Grain diff --git a/src/components/panel/right/ControlsPanel.tsx b/src/components/panel/right/ControlsPanel.tsx index 6cf19a9c1..9623e7b5b 100644 --- a/src/components/panel/right/ControlsPanel.tsx +++ b/src/components/panel/right/ControlsPanel.tsx @@ -178,9 +178,8 @@ export default function Controls({ const isPasteAllowed = copiedSectionAdjustments && copiedSectionAdjustments.section === sectionName; const pasteLabel = copiedSectionAdjustments - ? `Paste ${ - copiedSectionAdjustments.section.charAt(0).toUpperCase() + copiedSectionAdjustments.section.slice(1) - } Settings` + ? `Paste ${copiedSectionAdjustments.section.charAt(0).toUpperCase() + copiedSectionAdjustments.section.slice(1) + } Settings` : 'Paste Settings'; const options: Array = [ @@ -249,7 +248,7 @@ export default function Controls({ waveformData={waveform || null} histogram={histogram} displayMode={activeWaveformChannel || 'luma'} - setDisplayMode={setActiveWaveformChannel || (() => {})} + setDisplayMode={setActiveWaveformChannel || (() => { })} showClipping={adjustments.showClipping || false} onToggleClipping={() => { setAdjustments((prev: Adjustments) => ({ @@ -265,7 +264,7 @@ export default function Controls({ )} -
+
{Object.keys(ADJUSTMENT_SECTIONS).map((sectionName: string) => { const SectionComponent: any = { basic: BasicAdjustments, diff --git a/src/components/ui/CollapsibleSection.tsx b/src/components/ui/CollapsibleSection.tsx index e01e49fcd..dbbabccc6 100644 --- a/src/components/ui/CollapsibleSection.tsx +++ b/src/components/ui/CollapsibleSection.tsx @@ -1,4 +1,4 @@ -import { useRef, useEffect, useState } from 'react'; +import { useRef, useState } from 'react'; import { ChevronDown, Eye, EyeOff } from 'lucide-react'; import clsx from 'clsx'; import Text from './Text'; @@ -22,38 +22,12 @@ export default function CollapsibleSection({ isOpen, onContextMenu, onToggle, - onToggleVisibility = () => {}, + onToggleVisibility = () => { }, title, }: CollapsibleSectionProps) { - const contentRef = useRef(null); - const wrapperRef = useRef(null); const [isHovering, setIsHovering] = useState(false); const hoverTimeoutRef = useRef(null); - useEffect(() => { - const wrapper = wrapperRef.current; - const content = contentRef.current; - if (!wrapper || !content) { - return; - } - - const updateMaxHeight = () => { - if (isOpen) { - const contentHeight = content.scrollHeight; - wrapper.style.maxHeight = `${contentHeight}px`; - } else { - wrapper.style.maxHeight = '0px'; - } - }; - - updateMaxHeight(); - - const resizeObserver = new ResizeObserver(updateMaxHeight); - resizeObserver.observe(content); - - return () => resizeObserver.disconnect(); - }, [isOpen]); - const handleMouseEnter = () => { if (!canToggleVisibility) { return; @@ -77,9 +51,9 @@ export default function CollapsibleSection({ }; return ( -
+
-
-
- {children} +
+
+
+ {children} +
From 6a097800d09f9adbf9c434513eb051b258d98c1b Mon Sep 17 00:00:00 2001 From: Floh <48927090+Flohhhhh@users.noreply.github.com> Date: Wed, 29 Apr 2026 07:54:07 -0400 Subject: [PATCH 2/3] Undo no-op code formatting changes --- src/components/adjustments/Color.tsx | 24 ++++++++++++-------- src/components/adjustments/Curves.tsx | 5 ++-- src/components/panel/right/ControlsPanel.tsx | 7 +++--- src/components/ui/CollapsibleSection.tsx | 2 +- 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/src/components/adjustments/Color.tsx b/src/components/adjustments/Color.tsx index bd2076eb0..391992085 100644 --- a/src/components/adjustments/Color.tsx +++ b/src/components/adjustments/Color.tsx @@ -87,8 +87,9 @@ const ColorSwatch = ({ color, name, isActive, onClick }: ColorSwatchProps) => { onTouchEnd={handleMouseUp} >
{ />
setActiveTab(tab.id as '3way' | 'global')} className={`w-7 h-7 rounded-full flex items-center justify-center transition-all focus:outline-none - ${isActive - ? 'ring-2 ring-offset-2 ring-offset-surface ring-accent text-text-primary' - : 'bg-bg-secondary text-text-secondary hover:text-text-primary hover:bg-bg-secondary/80' + ${ + isActive + ? 'ring-2 ring-offset-2 ring-offset-surface ring-accent text-text-primary' + : 'bg-bg-secondary text-text-secondary hover:text-text-primary hover:bg-bg-secondary/80' }`} > {tab.icon} @@ -179,9 +182,10 @@ const ColorGradingPanel = ({ adjustments, setAdjustments, onDragStateChange }: C