Skip to content

Conversation

@jeff-phillips-18
Copy link
Member

@jeff-phillips-18 jeff-phillips-18 commented Mar 12, 2025

What

Closes Topology - Enable DefaultEdge as drop target

Description

Adds parameters and styles to DefaultEdge for drop target indication.
Adds edgeDropTargetSpec
Updates the demo app to demo the new feature

Type of change

  • Feature

Screen shots / Gifs for design review

DroppableEdgeDemo

Copy link
Collaborator

@jenny-s51 jenny-s51 left a comment

Choose a reason for hiding this comment

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

Tested the DefaultEdge drag and drop functionality locally - looks great and works as expected.

Just one thing I noticed while testing - when toggling the "Edge options" from the dropdown menu in Topology Package, and dragging a node over a styled edge, the UI throws an error and a blank screen.

It looks like a recent update is resulting in an undefined value in DemoEdge.tsx.

Copy link
Contributor

@dlabaj dlabaj left a comment

Choose a reason for hiding this comment

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

LGTM

.pf-topology__edge__link.pf-m-drop-target {
stroke-dasharray: 2;
stroke-dashoffset: 2;
stroke: var(--pf-t--global--border--color--brand--default);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we swap this token please:
stroke: var(--pf-t--global--border--color--hover)

Copy link
Member Author

@jeff-phillips-18 jeff-phillips-18 Mar 12, 2025

Choose a reason for hiding this comment

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

Can we swap this token please: stroke: var(--pf-t--global--border--color--hover)

@andrew-ronaldson Done:

image

@jeff-phillips-18 jeff-phillips-18 force-pushed the droppable-edges branch 2 times, most recently from 7e64cd9 to 86b00c0 Compare March 12, 2025 17:46
@patternfly-build
Copy link

Copy link
Collaborator

@jenny-s51 jenny-s51 left a comment

Choose a reason for hiding this comment

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

Thank you @jeff-phillips-18 - Retested in demo-app, drag and drop works as expected when dragging a node onto a styled edge. LGTM.

@jeff-phillips-18
Copy link
Member Author

@andrew-ronaldson Are you ok with the update above?

Copy link
Collaborator

@andrew-ronaldson andrew-ronaldson left a comment

Choose a reason for hiding this comment

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

LGTM

@jeff-phillips-18 jeff-phillips-18 merged commit 88bd5bc into patternfly:main Mar 14, 2025
8 checks passed
@jeff-phillips-18 jeff-phillips-18 deleted the droppable-edges branch March 14, 2025 11:19
@github-actions
Copy link

🎉 This PR is included in version 6.2.0-prerelease.6 🎉

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.

Topology - Enable DefaultEdge as drop target

5 participants