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

Architecture for DeleteQueue with Undo System #28

Closed
ralph-dev opened this issue Jun 5, 2020 · 2 comments
Closed

Architecture for DeleteQueue with Undo System #28

ralph-dev opened this issue Jun 5, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@ralph-dev
Copy link
Contributor

This architecture proposal is just for the implementation of Tree Core ability to delete specific parts of the tree and have it re-appear with an undo button

Requirements

  • Support Deletion of any Line on the Tree Core
  • Support Undo of most recent deletion on Tree Core
  • Support Deletion of entire DepthLevel ( Folder )
  • Support Undo of entire DepthLevel ( Folder )

We can implement a variable that holds a list of Tree Core Objects in FIFO format (Queue).

We can delete any line and push it into the DeleteQueue.
We can undo any line by popping it out of the DeleteQueue.

We can delete an entire depth level by filtering through the Tree Core for a specific depth level.
We can undo an entire depth level deletion by filtering through the DeleteQueue for a specific depth Level.

@nchaloult
Copy link
Member

nchaloult commented Jun 5, 2020

What are your plans for building UI elements around this change?

EDIT: I understand that this issue is just you introducing your proposal for implementing this functionality under the covers. I'm just curious about your early visions for how this feature may be presented to users.

@ralph-dev ralph-dev added the enhancement New feature or request label Jun 5, 2020
@ralph-dev
Copy link
Contributor Author

I haven't really thought too far ahead in that area but I was thinking along the lines of Visual Studio Code.

Deleting a file or Level would collapse the div and provide a red triangle on the right side for adding it back. For general undos people would have to CTRL+Z.

This will support all cases of deletion, 1 or Many although might require the deletion of DeleteQueue and just an update to Tree Core... I'll have to think about this. Great Question!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants