Skip to content

Conversation

@korelstar
Copy link
Member

Fixes #417, see discussion under nextcloud-libraries/nextcloud-vue#705, especially nextcloud-libraries/nextcloud-vue#705 (comment). Thanks to @paulschwoerer for help on implementing this. For now, I'm using the (old) OC.Notification API, since I want to be compatible to Nextcloud 15/16. We will switch to the new OCP.Toast API later.

grafik

@jancborchardt Is this how you imagined?

@jancborchardt
Copy link
Member

Nice!

Let’s call it "Undo deletion", and does it maybe look more clickable if we make it a button?

Also, the [ ] were just a visualization for the button when I wrote the mockup in text – they should not be there. :)

@korelstar korelstar force-pushed the undo branch 2 times, most recently from f70b5bc to 43dad87 Compare February 23, 2020 20:38
@korelstar
Copy link
Member Author

I did a complete re-work of this (backend deletes directly and re-creates on undo, fronted uses @nextcloud/dialogs). Here are some impressions:

deleting a single note

Screenshot

The Toast is closed after a timeout of 12 seconds. I used a longer timeout than normal due to the discussion under nextcloud-libraries/nextcloud-vue#705 (comment)

deleting multiple notes

If another note is deleted before the timeout is expired, the Toast is adjusted and the timeout is reset:

Screenshot

Pressing "Undo delete" will restore all deleted notes within the timeout-period (here: three).

@korelstar korelstar merged commit 5f6b8c6 into master Feb 23, 2020
@korelstar korelstar deleted the undo branch February 23, 2020 21:03
@jancborchardt
Copy link
Member

So @skjnldsv and I recently talked about Undo, so looping him in. :)

Also @korelstar only one thing about the notification: To prevent misclicks and accidental closing of the notification when you actually want to undo, can we remove the X button? It will automatically close anyway. :)

@skjnldsv
Copy link
Member

skjnldsv commented Apr 1, 2020

Oooh, never seen this!! :O
See nextcloud-libraries/nextcloud-dialogs#106

@korelstar
Copy link
Member Author

Of course, we can remove the "x" button.

I'm already watching nextcloud-libraries/nextcloud-dialogs#106, where a standardization is developed (there, the "x" button is removed). As far as I can see, that approach is similar, so I would switch so the standardized solution, when finished.

@skjnldsv
Copy link
Member

skjnldsv commented Apr 1, 2020

You rock!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Design of Undo deletion

4 participants