haystack / nb

12 stars 10 forks source link

Editing Folders and Trash System Updates #153

Closed 20rohanc closed 3 years ago

20rohanc commented 3 years ago

Added the following features:

  1. Rename folders
  2. Delete folders
  3. Restore folders from trash
  4. Slightly modified trash system. In the current version of nb, every directory has its own trash. If you click on a directory that has been trashed, you don't access that directory as one would expect; instead, you access its trash. I have preserved the localized trash system for now, but I made it so that entering a trashed folder enters the folder itself, not the folder's trash. I would be happy to further work on the trash system if you think a different system (perhaps a global trash) would be better.

Notes:

  1. In the current version of nb, one accesses a directory by clicking the bubble that holds the directory. Now, one accesses it by clicking the folder icon, as shown below. This enables the user to choose between accessing and editing a directory. Screen Shot 2021-06-25 at 4 58 53 AM

I will now show screenshots of each feature.

1) Renaming and Deleting Folders: Renaming folders is done via clicking the edit button next to the directory name.

Screen Shot 2021-06-25 at 5 01 41 AM

This will open a window that asks what the desired edit is.

Screen Shot 2021-06-25 at 5 03 29 AM

One can click cancel to go back...

Screen Shot 2021-06-25 at 5 04 34 AM

Enter a new name and click save to rename the folder (Note that our folder moves to the end because they are sorted in order of their last modification)...

Screen Shot 2021-06-25 at 5 05 35 AM

Or click delete to move it to trash.

Screen Shot 2021-06-25 at 5 07 38 AM Screen Shot 2021-06-25 at 5 07 55 AM

2) Restoring folders from trash Clicking the restore icon results in a deleted folder being restored from the trash.

Screen Shot 2021-06-25 at 5 11 54 AM Screen Shot 2021-06-25 at 5 12 03 AM Screen Shot 2021-06-25 at 5 12 14 AM

3) Edits with browsing trash To demonstrate, I have re-deleted the templates folder, and we can access this folder as expected despite it being in the trash.

Screen Shot 2021-06-25 at 5 14 33 AM Screen Shot 2021-06-25 at 5 14 39 AM

As you can see, this is still a local trash system; I have attached an image of the directory Math Textbooks, which has its own trash.

Screen Shot 2021-06-25 at 5 16 10 AM Screen Shot 2021-06-25 at 5 16 29 AM
20rohanc commented 3 years ago

I forgot to save and commit an issue with clicking the edit button I had fixed in this branch, so I'll open another pull request with that commit.

JumanaFM commented 3 years ago

Closed through PR #160 and PR #161