-
Notifications
You must be signed in to change notification settings - Fork 28
Add page trash frontend #709
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
Conversation
c681193 to
9ca6abc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool! General idea looks great! :) Some points from my end:
- It would be useful to show the path to the pages as well, as I can see a use case where 2 pages with the same name have been deleted and then it's difficult to tell which one to restore. I also have concerns about the height of the list when there are more pages. How about a modal like this (adapted from the calendar trash bin)? There is a subline with the page "location" shown

- Agreed that we can highlight the deleted pages when the page is deleted! Opening the trash is a bit much indeed
- Similarly when a page it restored it can also be highlighted for a couple of seconds
- if the page being restored is a subpage of a page that is collapsed in the list then it could automatically be expanded upon restoring
What do you think? :) also ccing @jancborchardt and @szaimen for more design feedback
jancborchardt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally agree with @nimishavijay's proposal, modal is more proper here. :)
0f54482 to
cffedb9
Compare
|
Thanks a lot for your feedback @nimishavijay and @jancborchardt. I implemented most of your suggestions. See the updated sceenshots/casts. Only remaining is how to represent the path of the page in trashbin. In the files trashbin, original path is not displayed either. And it can become quite long and cluttered soon if we display it. That's why I went without first, but would be curious about your ideas. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Some further feedback:
- It is a bit strange that "Delete page" is not the last entry of the action menu. The "last modified" info entry could be moved to first position instead?
- Pages with subpages also seems to remove all subpages. Maybe in that case it is ok to have a confirmation modal?
- The feedback with highlighting the "Deleted pages" is not super obvious. Generally we should always also use showNotification, in this case it could say "[Pagename] deleted", ideally even with an " Undo" button.
- In the modal:
- The table headings don't need to be bold
- "Restore" button could be outside of the menu so it's quick to access, in secondary button style.
- The last horizontal line below the last list item is not necessary
|
Thanks @jancborchardt! Some quick follow-ups:
Well, it was forbidden before, but now that it's easy to restore I thought it would be ok to just allow it. But if you prefer, we can add a confirmation modal for sure.
I'm not sure whether I like that. I will give it a try, but in general the "last modified" info is really more something like an info and not something we should emphasize by putting it as the first entry, no? |
Yeah, it's just that it's not super clear that this is what happens, at least before you do it. So yes I would say a confirmation is in order here.
Right, yeah and actually the "Convert with pandoc" is also a bit of a nerdy option (at least wording-wise)? What do you think about this order:
|
Haha, yeah sorry this is from a custom extension (https://github.com/mejo-/pandoc) and not part of Collectives. |
Nice! :) May I suggest "Convert or export" (or "Convert & export")? |
b03b9fb to
34b080a
Compare
cffedb9 to
3be9342
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! I would still say the "modified" info line should move one up in the menu so delete is the last entry, but that can also be a follow-up. :)
juliusknorr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only a minor comment, non blocking, otherwise the code looks good to me. Haven't tested yet though.
|
Tested and found a few issues that might be worth to look into before merging:
|
f0e7de2 to
3abce81
Compare
|
Thanks for testing @juliushaertl. I was unable to reproduce most of the issues you face. The problem with broken collective was a severe bug though that I fixed in 3abce81 now. Maybe you can test again?
For me, pages always get removed from the trashbin UI after deleting permanently
That's what happens in my tests.
Mh, unable to reproduce these two as well. |
3abce81 to
090f263
Compare
499a015 to
33390fb
Compare
|
Strange, now it works all fine. I'm wondering if I just have been on an outdated branch, though I'm quite sure I pulled before testing. Anyways, works like a charm now ❤️ |
f3315e2 to
d7c6cb8
Compare
Fixes: #47 Signed-off-by: Jonas <[email protected]>
Signed-off-by: Jonas <[email protected]>
We want the subpage order to stay consistent after restore Signed-off-by: Jonas <[email protected]>
* Highlight trash button when trashing a page * Expand path to restored page in page list * Highlight and scroll into view restored page in page list * Don't remove subpage order of parent when trashing a page Signed-off-by: Jonas <[email protected]>
Signed-off-by: Jonas <[email protected]>
* Distinguish 'Delete page' and 'Delete page and subpages' * Fix stickyness of page trash button on mobile * Show notification toast when trashing a page * Remove trailing horizontal line in page trash modal * Don't use bold font for table headings in trash modal Signed-off-by: Jonas <[email protected]>
* Define thead and tbody areas in page trash table * Always show restore button inline in page trash table Signed-off-by: Jonas <[email protected]>
Signed-off-by: Jonas <[email protected]>
If the folder has an index page, we want to use its fileId in the collectives page database. But if it doesn't, we don't want to fail hard. Signed-off-by: Jonas <[email protected]>
Signed-off-by: Jonas <[email protected]>
Signed-off-by: Jonas <[email protected]>
d7c6cb8 to
2cfa45e
Compare
* Clear timeout before setting a new one * Remove highlight class and add it again for re-highlighting * Clear timeout on component unmount to prevent memory leaks Signed-off-by: Jonas <[email protected]>
2cfa45e to
43d1d13
Compare

📝 Summary
This PR depends on #700.
🖼️ Screenshots and screencasts
🚧 TODO
🏁 Checklist
npm run lint/npm run stylelint/composer run cs:check)