Skip to content

feat: show ghost node during node drag#311

Merged
jeff-phillips-18 merged 1 commit intopatternfly:mainfrom
shivamG640:show-ghost-node-during-node-drag
Apr 7, 2026
Merged

feat: show ghost node during node drag#311
jeff-phillips-18 merged 1 commit intopatternfly:mainfrom
shivamG640:show-ghost-node-during-node-drag

Conversation

@shivamG640
Copy link
Copy Markdown
Contributor

@shivamG640 shivamG640 commented Mar 30, 2026

What

Closes #305

Description

When a node is dragged, its original position becomes empty, causing an awkward empty space between the connected edges.
This PR adds an optional “ghost node” (dummy/static placeholder) at the original position of the dragged node. The ghost node would remain non-interactive, fixed while the real node is being dragged and be removed once the drag operation completes, preserving visual continuity.

Type of change

  • Feature

Screen shots / Gifs for design review

Screencast.From.2026-03-31.21-37-14.mp4

Important Note

This PR also includes a fix in the DefaultEdge component, removing the data-based approach for retrieving the freezeEdgeDuringNodeDrag value.

@patternfly-build
Copy link
Copy Markdown

patternfly-build commented Mar 30, 2026

@jeff-phillips-18
Copy link
Copy Markdown
Member

@shivamG640 Looking good. I'd like to get some feedback from @andrew-ronaldson on any suggestions for the ghost node that is left behind so that it is obvious to users that the node left behind is temporary.

Also, I don't think we should use the data field showDragGhost for this determining the value, just the option if passed.

@jeff-phillips-18
Copy link
Copy Markdown
Member

Topology Demo surge: https://show-ghost-node-during-node-drag.surge.sh/

@shivamG640 shivamG640 force-pushed the show-ghost-node-during-node-drag branch from 7bf4e6b to 810a339 Compare March 31, 2026 16:05
@shivamG640 shivamG640 marked this pull request as ready for review March 31, 2026 16:09
Copy link
Copy Markdown
Member

@jeff-phillips-18 jeff-phillips-18 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. A few comments. Thanks @shivamG640

@shivamG640 shivamG640 force-pushed the show-ghost-node-during-node-drag branch from 810a339 to 540b8b0 Compare March 31, 2026 20:29
@shivamG640
Copy link
Copy Markdown
Contributor Author

Thanks for the review @jeff-phillips-18
I’ve updated the PR with the suggested changes.

Copy link
Copy Markdown
Member

@jeff-phillips-18 jeff-phillips-18 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @shivamG640!

@jeff-phillips-18
Copy link
Copy Markdown
Member

@andrew-ronaldson I have updated the surge with the latest changes including your suggestion. PTAL.

@jeff-phillips-18
Copy link
Copy Markdown
Member

@andrew-ronaldson @nicolethoen Please take a look at your earliest convenience. I'd like this PR to get in before any new release as it fixes a problem in DefaultEdge that would be a breaking change if it were to release prior to this releasing.

@jeff-phillips-18 jeff-phillips-18 merged commit a128910 into patternfly:main Apr 7, 2026
8 checks passed
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

🎉 This PR is included in version 6.5.0-prerelease.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nodes - Add optional ghost node at original position during drag operations

4 participants