-
-
Notifications
You must be signed in to change notification settings - Fork 871
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
[ios] Undo for the bookmark and tracks deletion #8263
base: master
Are you sure you want to change the base?
Conversation
Thanks! How does it work when bookmark is deleted on the map? This is the main case of issues. |
For now it is only the local solution to test the undo flow. To generalise the BM deletion may be tricky, because we need to store the deleted bookmarks somewhere in code. I'll try to move the undo manager into the bookmarks manager and to add an observer for adding the bookmark. Should we store them only for some seconds? On during the whole session? |
It would be great if the same approach/code could also be reused on Android without many changes. One of the ideas was to save all the recently deleted bookmark info so it will be automatically restored back when it's bookmarked again. Then, for example, after someone deletes a bookmark from the map, a toast with the hint "bookmark it again to restore" can be displayed 2 or 3 times. In this case, the bookmark can stay in memory until the app is restarted. Storing only for some seconds may be more complex than storing for the whole session. |
Maybe do not distract users with additional toasts? It may be annoyng. I think that one with the Undo will be enogh.
Such kind of restoring requires == operator to the bookmarks (as we discussed in several topics) to find the bookmark in the recently deleted list (by cooordinates?) and an additional logic in the code... Maybe we can skip the "bookmark it again to restore" in the first implementation of this feature? |
WDYT about about the following approach?
There are no any UI changes here, it should just work on both platforms. |
CC: @oleg-rswll, this is a new feature in progress. |
a43533d
to
9251646
Compare
@biodranik @vng can you please check the RP? Some additional questions:
|
9251646
to
3ded491
Compare
The branch was updated and I removed the
to simplify the behaviour. |
How will it look if the toast message is removed on the map, and the "Save" text on the bottom button changes to "Restore" after a bookmark is deleted (until the selection stays active)? I'm not sure yet about the undo in the lists. While it looks cool, nobody complained yet so far about it. This deletion requires 2 explicit actions or an explicit Delete button press, so it is highly unlikely to happen accidentally. Is it possible to review/merge the on-the-map undo part separately? |
This feature requires a huge refactoring of the action bar and place page data in the core... I can try to implement it.
The bookmarks can be easily deleted by trailing swipe with 1 accidental touch. I faced sometimes with it by my own. The overall approach with toast doesn't look disturbing for me... You can check the flow. trim.A86D79F0-7E61-4704-9497-2B6F0353B588.MOV
I'll create the separate PR with this feature. |
Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
- Now Toast is a facade to hide the subclass implementations from the callers - New `UndoToast` class Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
3ded491
to
628de3b
Compare
@kirylkaveryn the approach in the video with the delete undo in the toast from Bookmarks and Tracks, looks like a great approach! It preserves the existing flow, and the toast is unintrusive and helpful. |
@kirylkaveryn can we do the same thing in the Place Page? |
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.
This feature looks intuitive to me. I can't say the toast message is annoying. Thanks for implementing!!!
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.
Note that #8352 implements Undo for accidental bookmarks deletion in the Place Page in a better/simpler way.
The higher priority task is to avoid accidental deletion (or implement undo) for a whole list of bookmarks.
After it is implemented, we can come back to this issue and re-evaluate it, considering that there were no any user complaints about accidentally deleting bookmarks or tracks from lists (it requires an explicit user action, so the chance of doing it accidentally is extremely low, compared to accidental removal of a list or accidental removal of a bookmark on the Place Page).
Sorry, the presense of another task is not a reasonable argument to reject this PR.
#8352 doesn't really solve the issue with accidential deletion of bookmarks from Bookmark screen. Yes, I understand that I can seatch for the same place on the map and re-add it to my bookmarks. Meanwhile, it was possible before #8352. The issue is that you really remember where place was. This is purpose of bookmarks - to save places you can't remember in your head. This PR solves this issue. |
While the idea looks good, in reality, we didn't have any complaints about it. This PR is not rejected, it is postponed until we get a better understanding of the real user needs. |
Doing undo by adding a bookmark again is essentially hiding the functionality, there is no way to discover that this is actually intended as an undo feature. Even if someone does discover it by accident, the behavior is more similar to a bug rather than a feature. The thinking process may be "I deleted an old bookmark because I didn't need it anymore. Then wanted to add it, just in case, but for some reason it did't clear my old notes." |
Could you please rebase this PR? I would like to re-test it. |
Discussed that rebasing will take ~1 day to finish due to accumulated changes from other PRs :( |
We discussed with Kiryl that using undo toasts is not a common pattern on iOS. The toast makes information under it inaccessible, and elements untappable. And there is a higher priority issue when a whole list of tracks and bookmarks is deleted accidentally. We can return to this PR when the priority of this issue will change. |
Closes #4547
This PR contains the implementation of Undo for the bookmarks and tracks deletion.
The Undo button was added to the Toast message so the user has 3 seconds to undo deletion.
When a bookmark is created from the map, a deleted list is checked first. If there's already a bookmark at the same coordinates, its info is taken to fill a new bookmark, and it is removed from a "deleted" list.
Todo:
When a bookmark is created from the map, a deleted list is checked first. If there's already a bookmark at the same coordinates, its info is taken to fill a new bookmark, and it is removed from a "deleted" list.Screnrecords: