From 9c0fc6c126083bc64beb3b6947bae384cb603ce4 Mon Sep 17 00:00:00 2001 From: kratofl <72558571+kratofl@users.noreply.github.com> Date: Sat, 5 Dec 2026 14:31:54 +0100 Subject: [PATCH 1/5] Stop the removed-widget ghost from hiding a widget in its spot In a dash version, an inherited widget the version removed shows as an opaque dashed placeholder with "Bring back". Putting another widget where it sat left the new widget hidden behind that placeholder. The placeholder now only shows while its cells are free; the removal still counts in the scope strip and Reset still undoes it. Co-Authored-By: Claude Opus 5.5 --- app/desktop/src/designer/VersionMarks.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/desktop/src/designer/VersionMarks.tsx b/app/desktop/src/designer/VersionMarks.tsx index 86c6c66a..e26525f7 100644 --- a/app/desktop/src/designer/VersionMarks.tsx +++ b/app/desktop/src/designer/VersionMarks.tsx @@ -1,7 +1,7 @@ import { useEffect, useState, type CSSProperties, type PointerEvent } from 'react' import { AlertTriangle, Undo2 } from 'lucide-react' import { cellAt, layoutRect, type DashLayout, type DashWidget, type GridSpan } from '@sprint/dashboard' -import { widgetName, type GridRect } from '../views/DashesDomain' +import { rectsIntersect, widgetName, type GridRect } from '../views/DashesDomain' /** What a picked scope's own version does on the page the designer shows (variants.ts `scopeView`). */ export type VersionMarksData = { @@ -23,7 +23,8 @@ export type VersionMarksData = { /** * The version's marks over the designer's canvas, at the canvas size: an inherited widget the - * version removed as a dashed ghost with "Bring back", a blue dot on each widget of its own, and an + * version removed as a dashed ghost with "Bring back" (only where its cells are still free — a ghost + * is opaque and would hide a widget drawn there), a blue dot on each widget of its own, and an * amber edge round each inherited widget that doesn't fit, with a bar to place it or leave it out. * "Place it" carries the widget with the pointer; a click on free cells puts it there, Esc lets go. */ @@ -72,7 +73,9 @@ export function VersionMarks({ return (
- {data.removed.map((widget) => ( + {data.removed + .filter((ghost) => !widgets.some((widget) => rectsIntersect(widget, ghost))) + .map((widget) => (
{`${widgetName(widget)} · removed`}