Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[ZEPPELIN-1736] Introduce trash & enable removing folder #1730
What is this PR for?
I added basic operations of the trash:
Added operations of trash
What type of PR is it?
Maybe it would be better if notebook view notices that a note is in the trash.
What is the Jira issue?
How should this be tested?
Screenshots (if appropriate)
Move, restore, remove a note from the main page
Move, restore, remove a folder from the main page
Move, remove a note from the notebook view
Restore, empty the trash
Suffix current date if the folder exists in the trash
It is a great feature!
I've tested it and found some points that should be considered.
- Korean notenames are located at the bottom of Trash folder.
- I think that displaying '~Trash' concatenated notename is a little bit unnatural.
It would be better if user cannot see '~Trash' prefix and cannot get a chance to restore note by just removing
- Why don't you change a tooltip text 'for good' to 'permanently'?
- How about removing 'removed at xxxx-xx-xx' postfix from the folder name when it is restored?
@marchpig Thanks for your prompt and high-quality review!
You made really valid points. I agree with those at all.
I chose '~' as prefix because of sort order, but I didn't consider Korean. Thanks!
I will fix what you mentioned when I have some time and ping you again
Thanks for the review @cuspymd! I think so, but I used HashSet because of consistency. Other methods used HashSet.
I think if we want to change to 'Set', wouldn't it be better to open new refactoring PR that change all other 'HashSet' to 'Set' for consistency?
What do you think?
@marchpig Sorry for my late response! I changed what you addressed except one thing.
Korean note order
Remove date string when restore
The one thing is about hiding
Actually, I planned to add features related to the trash on notebook view in the future. There are many features need to be implemented!
The first and second features are needed in my opinion, so I would like to handle those on next PR!
Please tell me your opinion.
@tae-jun It works well! Thank you very much for accepting my opinions.
However, I found a minor problem.
Thanks again for considering my opinions.
CI is green!
@tae-jun Nice feature indeed!
As you can see there are two trash can icons and their sizes are different now. Hmm.. so I would suggest you to use another icon for
@AhyoungRyu Always thanks for your nice review
Yes, it's intended. A time stamp is generated only if a
I made this feature because of a use case like this:
A use case needs time stamp
Necessity of the time stamp for the use case above
If there is no time stamp:
If there is a time stamp:
The folder created later will be moved to the trash with a time stamp postfix. There will be two folders which are "NoteDirA" (old one) and "NoteDirA removed at 2016-12-14 xx:xx:xx" (new one). In this case, the user can restore the folder successfully.
This is why I added time stamp! :-) Please tell me if there is any other idea.
Remove permanently icon candidates (?)
I agree with you so I searched Font Awesome and found some candidates for the icon. I think not only
The icons above are the candidates I found, but please let me know if you have a better one!
Which icon do you prefer?
Thanks for the review again
@tae-jun Appreciate for your precise explanation and picking proper candidates as well :) Tested again to check the time stamp, it makes sense. Then how about attaching the time stamp for every cases to keep consistency? Currently the firstly removed one doesn't show the stamp. Surely It's just my opinion.
Empty trash icon:
Remove folder permanently icon:
Remove note permanently icon:
And I've been thinking about attaching the time stamp to all, but there are some reasons I worry about:
What do you think @AhyoungRyu?
Thanks for good feature :) It works well as described and here are two things to consider.
@AhyoungRyu Always thanks for the review :) Also thanks for your understanding.
@1ambda Thanks for the review! I appreciate it and sorry for my late response.
As to the second point that you mentioned, I thought a lot of about it as well :)
Would you mind if I do that? Please let me know
@tae-jun I tried to run
Can you take a look again?
1 build failed with below error, but it's irrelevant to this change.
So let me merge into master in this time. Thanks for your long long patience and effort @tae-jun