From 1e711b087dca254fa021f0c16006197c138d1884 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel?= Date: Wed, 7 Oct 2026 09:13:07 +0000 Subject: [PATCH] feat(studio): a host can show the hover box and give the stage its starting size (#5116) * test(studio): pin a host's hover box and a starting stage size * feat(studio): a host can show the hover box and give the stage its starting size * fix(studio): keep the comment share flat and let a measured size win over the hint --- .../src/components/editor/DomEditOverlay.tsx | 4 +- .../editor/previewReadOnly.overlay.test.tsx | 5 ++- .../src/components/nle/NLEPreview.test.ts | 45 ++++++++++++++++++- .../studio/src/components/nle/NLEPreview.tsx | 9 +++- 4 files changed, 56 insertions(+), 7 deletions(-) diff --git a/packages/studio/src/components/editor/DomEditOverlay.tsx b/packages/studio/src/components/editor/DomEditOverlay.tsx index 4edd7a3b0f..6408546adf 100644 --- a/packages/studio/src/components/editor/DomEditOverlay.tsx +++ b/packages/studio/src/components/editor/DomEditOverlay.tsx @@ -61,7 +61,7 @@ export interface DomEditOverlayProps { hoverSelection: DomEditSelection | null; allowCanvasMovement?: boolean; allowBodyDrag?: boolean; - /** "host": no hover, marquee, box re-select, or body drag if allowBodyDrag is false; Enter still opens text. */ + /** "host": no marquee, box re-select, or body drag if allowBodyDrag is false; Enter still opens text. */ canvasInput?: "overlay" | "host"; onTextEditingChange?: (editing: boolean) => void; /** A click on a single selection's box, in either mode; the event may be the pointerup. */ @@ -500,7 +500,7 @@ export const DomEditOverlay = memo(function DomEditOverlay({ onLostPointerCapture={gestures.onLostPointerCapture} onContextMenu={hostInput ? undefined : handleContextMenu} > - {!hostInput && hoverSelection && hoverRect && compRect.width > 0 && ( + {hoverSelection && hoverRect && compRect.width > 0 && (