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 && (