-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Deck options: 'back' should only request confirmation if changes are made #14438
Comments
The first point would require some work to implement, as currently the frontend doesn't have a flag that tracks when a change has been made. You'd need to store a copy of the initial data, then provide some JS method that compares the current state with the initial state to see if anything has changed. The Kotlin code would then need to invoke it and decide what to do based on its response. |
User comment:
https://forums.ankiweb.net/t/improvements-on-deck-options-screen-when-the-new-backend-enabled/39101 |
I was actually coming here to consider filing a similar ticket. The title would have been something like: For the internal app settings (hamburger menu->settings), "back" will unconditionally save, which I think is how Ankidroid has always worked, even for deck-specific settings. Now, as you know, deck settings require the user to tap "save", or your changes will be silently discarded. I screwed this up 4 or 5 times before I realized why my settings changes were not sticking. It doesn't take much work to adapt to, but every ankidroid user is going to screw this up 4 or 5 times before they figure out what's going on. A confirmation warning would alleviate this problem. A long time ago I disliked this "back = unconditional save" mechanic, with no way to easily undo accidental changes. But all of iOS works this way, and most of Android I think. People are losing an intuition for an explicit "Save" button on phones, especially a tiny button at the top-right of the screen. I agree with the earlier remarks on button-size and accessibility. The "save" button, and especially the drop-down menu to the right of the "save" button, are very very small. Besides being made physically taller, padding would probably help. There is literally 0 padding between the right side of the "Save" button and the edge of the screen. Whitespace on the right would make a safer tap-target for the drop-down menu. |
@briankrznarich Thank you for your time, I agree and I'll get this resolved |
Keep this open until we ask for confirmation on change, rather than unconditionally |
This comment has been minimized.
This comment has been minimized.
Still looking for a solution... |
I just opened this PR ankitects/anki#3410 , if DAE accepts it, once it's included in AnkiDroid, we can query the javascript to know whether there was any change. |
The backend changes have been incorporated into the AnkiDroid |
The test don't have to press "ok" anymore as there are no changes. Sadly, it seems that the javascript is not executed, so the test halts Fixes ankidroid#14438
The test don't have to press "ok" anymore as there are no changes. Sadly, it seems that the javascript is not executed, so the test halts The tests are deleted. As they use real webview, they can't be saved as-is. And for some reason LongPress don't work on integration test in the deck picker, which means I can't recreate the same test starting with opening the deck options. Fixes ankidroid#14438
The test don't have to press "ok" anymore as there are no changes. Sadly, it seems that the javascript is not executed, so the test halts The tests are deleted. As they use real webview, they can't be saved as-is. And for some reason LongPress don't work on integration test in the deck picker, which means I can't recreate the same test starting with opening the deck options. Fixes ankidroid#14438
Was this fixed in the following? |
Yes but it'll be broken with anki backend change because I removed the Bridge command that I introduced before knowing it was deprecated |
That's fine. We won't update the backend until they start on RCs |
To clarify, Arthur didn't remove the implementation from upstream. He replaced it with another one. Here's the PR: ankitects/anki#3571 So, I guess AnkiDroid would have to modify some of its own code after the backend update. |
Things move fast! This is now actively in the pipeline: |
Running on HEAD. If you open the deck option and change them then press back they are discarded. Please instead ask whether they should be cancelled or saved.
(Also, the save button is quite small. I doubt it satisfies accessibility requirement)
The text was updated successfully, but these errors were encountered: