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

Undo not fully functional #428

Closed
github-itsec-oculavis opened this issue May 18, 2022 · 5 comments · Fixed by #952
Closed

Undo not fully functional #428

github-itsec-oculavis opened this issue May 18, 2022 · 5 comments · Fixed by #952
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed priority version-2.3
Milestone

Comments

@github-itsec-oculavis
Copy link

github-itsec-oculavis commented May 18, 2022

Describe the bug
While the undo operation works for deleted processes, actors, and data storages, it doesn´t work for arrows (data flows). If you delete one of the aforementioned diagrams which were previously connected with arrows, after "undo", the diagrams will show up again, but the arrows are gone, together with the threats defined for them.
Undo also doesn´t work if you just delete an arrow and want to undo it.

Expected behaviour
After accidental deletion of an arrow, or diagrams connected with arrows, the undo button should make the arrows reappear. It is particularly important when threats were already defined for those data flows.

Environment

  • Version: 2.0
  • Platform: Web App Beta
  • OS: Windows
  • Browser: Chrome

To Reproduce

  1. Create two actors.
  2. Connect them with a data flow arrow.
  3. Delete one of the actors. (The arrow should also disappear.)
  4. Undo the operation. (The actor reappears but the connection arrow doesn´t.)

Further information

  • Undo button does not undo deletion of objects. This is a big deal because objects are too easy to remove accidentally.
  • If it is too hard to undo deletion, perhaps an “are you really sure” button would help with accidental deletes?
@github-itsec-oculavis github-itsec-oculavis added the bug Something isn't working label May 18, 2022
@jgadsden jgadsden added version-2.0 blocker Functionality isn't working priority labels May 18, 2022
@jgadsden
Copy link
Collaborator

Thanks for finding this @github-itsec-oculavis

@lreading I remember that one of the companies we talked to who were using Threat Dragon a lot, they did not like the way the arrows / data-flows were deleted if the diagram component was deleted. I think if we alter that behavious then this may also be corrected?

I can experiment ...

@lreading
Copy link
Collaborator

I do remember having that discussion! I think we may have done something a bit custom with the undo feature, and IIRC it works off of the history stack at the graph level. Related: #201

This might have been due to how the data flows that are connected work, as they reference other objects rather than absolute coordinates, and antv handles finding the best path for them. My memory is a bit fuzzy, but I 100% agree with the current behavior not being the best user-experience! I'd love to find a better solution for it! 😄

@jgadsden
Copy link
Collaborator

In addition a user reports "Undo button does not undo deletion of objects. This is a big deal because objects are too easy to remove accidentally.
If it is too hard to undo deletion, perhaps an “are you really sure” button would help with accidental deletes?"

@jgadsden jgadsden added the help wanted Extra attention is needed label Oct 4, 2022
@jgadsden
Copy link
Collaborator

Unlikely to get this into the imminent version 2.0 release, so pushing it back to version 2.x

@ChristopherHackett
Copy link
Collaborator

I would be interested in taking a look at this so scanned for existing tests that look at the undo behaviour.

I found tests re the binding and correctness of things like canUndo but nothing dedicated to something like "place x, y and z, connect x & y, assert z and y connected".

If something like the above exists please can I be pointed in the direction of them. Alternatively, do existing maintainers have any helpful pointers about in adding this type of test in before I start to look into more detail at the undo functionality.

@jgadsden jgadsden added this to the Version 2.2 milestone Sep 10, 2023
@jgadsden jgadsden removed the blocker Functionality isn't working label Oct 17, 2023
@jgadsden jgadsden modified the milestones: Version 2.2, Version 2.3 Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed priority version-2.3
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants