MLH-Fellowship / 0.2.1-readme-dirs

A web application that generates helpful project structures for public GitHub repositories
https://project-structure-readme.netlify.app/
MIT License
1 stars 1 forks source link

Architecture for DeleteQueue with Undo System #28

Closed ralph-dev closed 4 years ago

ralph-dev commented 4 years ago

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

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 commented 4 years ago

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 commented 4 years ago

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!