feat: enhance Recording Studio with reorderable events, origin options, and hover previews

This commit is contained in:
2026-02-15 18:13:25 +01:00
parent 40fa2a7721
commit 90cdd7e713
4 changed files with 247 additions and 27 deletions

View File

@@ -14,6 +14,14 @@ export function PickingHelper() {
} else if (e.data.type === 'STOP_PICKING') {
setPickingMode(null);
setHoveredElement(null);
} else if (e.data.type === 'SET_HOVER_SELECTOR') {
const selector = e.data.selector;
if (selector) {
const el = document.querySelector(selector) as HTMLElement;
setHoveredElement(el || null);
} else {
setHoveredElement(null);
}
}
};
@@ -86,7 +94,9 @@ export function PickingHelper() {
};
}, [pickingMode, hoveredElement]);
if (!pickingMode || !hoveredElement) return null;
if (!hoveredElement) return null;
// Don't show highlight if we are in picking mode but NOT hovering anything (handled by logic above)
// but DO show if we have a hoveredElement (from message or mouseover)
const rect = hoveredElement.getBoundingClientRect();