From 036aa3545f32d918ecbb2997c18fd4cd0e1f12ed Mon Sep 17 00:00:00 2001 From: Tanish Manku Date: Tue, 5 May 2026 13:32:30 -0700 Subject: [PATCH] artcraft: clarify batch-pending dismissal with striped overlay and centered control MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The per-tile X button suggested individual tiles could be dismissed, but a batch resolves as a unit. The whole batch group is now the click target and the hover overlay paints diagonal red/black stripes across all tiles so the removal scope is unambiguous. Centered trash chip with a ×N badge for count > 1 confirms the batch size at a glance. --- .../pagedraw/src/lib/HistoryStack.tsx | 153 +++++++++++------- 1 file changed, 96 insertions(+), 57 deletions(-) diff --git a/frontend/libs/components/pagedraw/src/lib/HistoryStack.tsx b/frontend/libs/components/pagedraw/src/lib/HistoryStack.tsx index 541c7c2575..856b9896f6 100644 --- a/frontend/libs/components/pagedraw/src/lib/HistoryStack.tsx +++ b/frontend/libs/components/pagedraw/src/lib/HistoryStack.tsx @@ -182,69 +182,108 @@ export const HistoryStack = ({ {/* Pending placeholders first (newest at top) */} {(() => { const reversed = [...pendingPlaceholders].slice().reverse(); - return reversed.map((p, idx) => ( - - {Array.from({ length: Math.max(1, p.count || 1) }).map( - (_, i) => ( -
-
- {blurredBackgroundUrl && ( - - )} -
-
-
- {/* SVG running border (single solid line) */} - { + const tileCount = Math.max(1, p.count || 1); + return ( + + {/* Outer batch group: the entire group is the click target + for removal. Hovering reveals a striped overlay and a + centered trash affordance. */} +
1 + ? `Remove batch of ${tileCount}` + : "Remove" + } + onClick={(e) => { + e.stopPropagation(); + handlePendingRemoveClick(p.id); + }} + > +
+ {Array.from({ length: tileCount }).map((_, i) => ( +
- - -
-
{ - e.stopPropagation(); - handlePendingRemoveClick(p.id); - }} - > +
+ {blurredBackgroundUrl && ( + + )} +
+
+
+ {/* SVG running border (single solid line) */} + + + +
+
+ ))} +
+ + {/* Batch-removal hover overlay: alternating dark-red and + near-black diagonal stripes covering the whole batch. + pointer-events-none so the click bubbles to the + outer group. */} +
+ + {/* Centered remove affordance, shown on hover. Decorative + only — actual click is handled on the outer group. */} +
+
+ {tileCount > 1 && ( + + ×{tileCount} + + )}
- ), - )} - {idx < reversed.length - 1 && ( -
- )} - - )); +
+ {idx < reversed.length - 1 && ( +
+ )} + + ); + }); })()} {pendingPlaceholders.length > 0 && (