From f65fd350ccaa58dcba59f9b01fef5e3e7cf86f79 Mon Sep 17 00:00:00 2001 From: LyAhn Date: Sun, 28 Jun 2026 21:12:22 +0100 Subject: [PATCH] fix: make toolbar, sidebar, and lightbox responsive on small screens --- src/components/ColorFilter.tsx | 126 +++++++++++++++++---------------- src/components/Lightbox.tsx | 15 ++-- src/components/Sidebar.tsx | 2 +- src/components/Toolbar.tsx | 15 ++-- 4 files changed, 86 insertions(+), 72 deletions(-) diff --git a/src/components/ColorFilter.tsx b/src/components/ColorFilter.tsx index 5db3aef..f4bcbe9 100644 --- a/src/components/ColorFilter.tsx +++ b/src/components/ColorFilter.tsx @@ -56,7 +56,7 @@ export function ColorFilter() { }, [open]); return ( -
+
{/* Trigger — a single palette icon; shows the active color as a dot when a filter is applied so the collapsed state still communicates it. */} @@ -85,70 +85,74 @@ export function ColorFilter() { {open ? ( + // Right-aligned popover so it never widens the toolbar row or gets + // pushed off-screen on narrow windows. Swatches wrap into a compact + // grid instead of a single long horizontal strip. - {SWATCHES.map((swatch) => { - const active = rgbEquals(colorFilter, swatch.rgb); - return ( -
- {/* Custom color picker — rainbow until a custom color is chosen. */} - - - {isActive ? ( - - ) : null} - - {colorBackfill && colorBackfill.total > 0 ? ( - - sampling {colorBackfill.processed.toLocaleString()}/{colorBackfill.total.toLocaleString()} - + {isActive || (colorBackfill && colorBackfill.total > 0) ? ( +
+ {colorBackfill && colorBackfill.total > 0 ? ( + + sampling {colorBackfill.processed.toLocaleString()}/{colorBackfill.total.toLocaleString()} + + ) : } + {isActive ? ( + + ) : null} +
) : null} ) : null} diff --git a/src/components/Lightbox.tsx b/src/components/Lightbox.tsx index f4e08b3..5eb2f3e 100644 --- a/src/components/Lightbox.tsx +++ b/src/components/Lightbox.tsx @@ -517,7 +517,7 @@ export function Lightbox() {
-
+

{selectedImage.filename}

@@ -534,7 +534,7 @@ export function Lightbox() {