Repository navigation
fix(designer): stop edge remove buttons from stacking and sticking - #1126
Abyssalisk wants to merge 1 commit into
Conversation
|
PR author is not in the allowed authors list. |
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe graph designer now registers edge hover tools through a dedicated helper. The helper adds tools on edge entry and removes the remove button when hover moves away or the hovered edge is removed. Tests cover these event cases and disabled registration. ChangesEdge Hover Tools
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant Graph
participant registerEdgeHoverTools
participant Edge
Graph->>registerEdgeHoverTools: Emit edge:mouseenter
registerEdgeHoverTools->>Edge: Add missing vertex and remove tools
Graph->>registerEdgeHoverTools: Emit edge, node, blank, or graph leave event
registerEdgeHoverTools->>Edge: Remove the remove button
Suggested reviewers: Merge Risk: ⚪ Minimal · up to The hover-button change is mergeable after normal checks. Browser pointer-event ordering remains unverified, but no specific failure is established. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@dotnet-policy-service agree company="Aristotle International" |
1a38c0d to
5379ea7
Compare
|
Adopted this contribution in elsa-core #8656, preserving Gav's original author identity and the exact four-file source blobs from Separate reviewed corrections cover stale edge-leave events and read-only registration. Validation passed 263 frontend tests/typecheck/bundles, nine real-X6 natural browser cases and four handler-isolation controls, broad exact-head CI, independent source/runtime approval and Greptile 5/5. Browser receipt/evidence. This source PR remains open and unchanged for the explicit contribution-migration disposition under Core #8216. No npm publication or source publisher cutover is implied. |
Purpose
Stops the flowchart designer's edge remove button from stacking on repeated hovers and from staying visible after the pointer has moved away.
Scope
Description
Problem
Hovering a connection in the flowchart designer shows a remove button. The button sometimes stays visible after the pointer has moved away, and repeated hovers can stack several.
edge:mouseentercallsaddToolson every entry, and X6 appends rather than replaces, so each re-entry adds anotherverticestool and anotherbutton-remove.edge:mouseleaveremoves only onebutton-remove, and X6 does not raise it at all when the pointer leaves across a tool or moves straight onto another edge, a node, or empty canvas.Solution
The hover logic moves from
create-graph.tstoedge-hover-tools.ts:blank:mouseover;blank:mousemoveonly fires while a button is held), or leaves the graph;Otherwise behavior is unchanged: the tools are still registered only when the designer mode allows interactive edges, and the vertex handles behave as before.
Verification
Steps:
npm testinsrc/modules/Elsa.Studio.Workflows.Designer/ClientLib.Expected outcome:
npm testpasses (262 tests). The newedge-hover-tools.test.tsreplays the event sequences that leave a button behind: against the previous logic 5 of its 9 cases fail, and with this change all pass.Screenshots / Recordings (if applicable)
Before:
edge-hover-before.webm
After:
edge-hover-after.webm
Before (main) and after (this PR), same pointer path. Recorded in a downstream build of Studio with custom node styling; the hover handlers in the "before" clip are identical to
main, and the "after" clip runs this PR'sedge-hover-tools.ts.Checklist
Summary by CodeRabbit