Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete node on the frontend should remove it from the graph #1311

Merged
merged 4 commits into from
Apr 25, 2024

Conversation

AhsanFarooqDev
Copy link
Contributor

Ticket №: #1264

closes #1264

Problem:

Delete node on the frontend should remove it from the graph

As a Proof:

https://www.loom.com/share/a7560e9de6cb4502a5beb2a3af78390e?sid=0dae9776-94fb-4fb1-b367-c67ea076bfd3

@AhsanFarooqDev
Copy link
Contributor Author

@tomsmith8 @Rassl Kindly review this PR

@AhsanFarooqDev AhsanFarooqDev changed the title fix(delete-node): on the frontend should remove it from the graph Delete node on the frontend should remove it from the graph Apr 20, 2024
Copy link
Collaborator

@Rassl Rassl left a comment

Choose a reason for hiding this comment

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

Please take a look to my comment

@AhsanFarooqDev AhsanFarooqDev requested a review from Rassl April 24, 2024 14:49
@AhsanFarooqDev
Copy link
Contributor Author

AhsanFarooqDev commented Apr 24, 2024

@Rassl Here, we are simply deleting the selected node from the data store so that it is reflected throughout the entire app. Therefore, the ref_id must match in order to remove the selected node from the graph.

At previous case:

image
image

image
image

@Rassl
Copy link
Collaborator

Rassl commented Apr 24, 2024

@Rassl Here, we are simply deleting the selected node from the data store so that it is reflected throughout the entire app. Therefore, the ref_id must match in order to remove the selected node from the graph.

At previous case:

image image

image image

not sure what are you trying to explain here, the only problem in current changes is this lines, for node type topic ref_id is fake, therefore we should get actual id buy finding real node id by name
image

@AhsanFarooqDev
Copy link
Contributor Author

not sure what are you trying to explain here, the only problem in current changes is this lines, for node type topic ref_id is fake, therefore we should get actual id buy finding real node id by name

You are right but when the actual id pass to the removeNode function

image

then at that function the actual ref_id is not match with the fake node type ref_id that is present in data of type NodeExtended
and that node from the graph is not removed means deleting the node is not reflected on graph

@AhsanFarooqDev
Copy link
Contributor Author

@Rassl Please review the changes now.

You are right to delete a node from backend we need to pass actual id that would be come from topic node
image

Copy link
Collaborator

@Rassl Rassl left a comment

Choose a reason for hiding this comment

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

LGTM

@Rassl Rassl merged commit 50a8e54 into stakwork:master Apr 25, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Delete node on the frontend should remove it from the graph
2 participants