Skip to content

Conversation

benloh
Copy link
Collaborator

@benloh benloh commented Nov 30, 2023

Addresses #53

If you create a new node, then change your mind and decide to cancel the creation, the new node will be deleted. (When the user clicks "New Node", a node is immediately created and saved. Prior to this, clicking "Cancel" would leave the newly created node in place).

Similarly, if you create a new edge, then change your mind and decide to cancel the creation, the new edge will be deleted.

ADDITIONAL NOTES:

  • We re-added support for the Revision field. We make use of this to decide whether to delete a "Canceled" node/edge. Upon creation, a new node/edge has a revision value of -1. When you save the node/edge the revision is incremented to 0. If you "Cancel" a node or edge edit and the revision is still at -1, we delete the node or edge.
  • The "Delete" button in Edge Edit mode is now only shown if the edge has been previously saved. Otherwise it only shows "Cancel". This makes it clearer that when you click "Cancel" on an newly-created unsaved edge, the edge will be removed, matching the node behavior.
  • We re-added support for the Created and Updated fields. Prior to this they were left blank.

@benloh benloh requested a review from jdanish November 30, 2023 19:01
# Conflicts:
#	app/view/netcreate/components/NCNode.jsx
Copy link

@jdanish jdanish left a comment

Choose a reason for hiding this comment

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

Looks good.

@benloh benloh merged commit cec60da into dev Nov 30, 2023
@benloh benloh deleted the dev-bl/delete-on-cancel branch November 30, 2023 23:16
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.

2 participants