HabitRPG / habitica-android

Native Android app for Habitica
GNU General Public License v3.0
1.45k stars 514 forks source link

Pressing back when a task is edited loses changes without prompt #1456

Closed h4xnoodle closed 2 years ago

h4xnoodle commented 3 years ago

Reproduction steps:

  1. Start creating a task or edit a task
  2. Make changes
  3. Press 'hardware'/OS back button

Actual: user's changes are lost immediately Expected: a prompt notifying user that their changes are not saved, and an option to save or cancel changes.

This is something I've experienced so much, and it's very annoying to lose my task list or changes if back is pressed. Typically the pattern is to ask a user to save or cancel their changes and at least warn them of dirty state.

I'm currently starting the changes for this issue.

yarrouye commented 3 years ago

I lost so many new tasks that way too. A more modern pattern is to just not offer save/cancel and always save the state. This is what most modern phone apps do, despite the inconvenience of not having an "undo" (if one were to be prompted to save or cancel). But it's much faster and it seems that it's been accepted well. Tasks are not novels, so the lack of undo is likely fine and the UX would be better.

saraolson commented 3 years ago

while that is definitely a pattern seen in more and more apps, all the task apps ive referenced have shown a send or save button, and differ on what happens when you tap back. google tasks auto saves, todoist shows the prompt suggested in this original issue, and anydo/daily just deletes the task.

considering what current habitica users are accustomed to, i would still opt for the warning over auto save for now. we could then run analytics on how many times people tap back then tap save anyways vs discard and see for sure if tapping back to auto save is a pattern the majority of our users would expect.

saraolson commented 2 years ago

Strings/visual of how we'd like this modal to appear.

Screen Shot 2022-01-12 at 12 52 56 PM
yarrouye commented 2 years ago

Nice. The default should be "Cancel," though, not "Discard."

On Wed, Jan 12, 2022 at 10:53 AM Sara Olson @.***> wrote:

Strings/visual of how we'd like this modal to appear.

[image: Screen Shot 2022-01-12 at 12 52 56 PM] https://user-images.githubusercontent.com/12453119/149195080-f77be593-c5d8-4c76-b678-e8cc0df58dbc.png

— Reply to this email directly, view it on GitHub https://github.com/HabitRPG/habitica-android/issues/1456#issuecomment-1011305291, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPOTU42QFMHHCH6JO34JHTUVW53FANCNFSM4V2VS5CA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

saraolson commented 2 years ago

We're testing making the current action of pressing back the main action. During testing, if more people tap cancel rather than discard we'll reevaluate the actions.