Add Anki's new Deck Options page
Purpose / Description
Free screen + spare a lot of work migrating DeckOptions.kt to use fragments and the androidx.Preference
Approach
- Add the CollectionV16's deck options methods on BackendDeckOptions.kt
- Add the new page
- Use it if the new backend is enabled
How Has This Been Tested?
https://user-images.githubusercontent.com/69634269/186731680-548ff459-7c7d-46e3-a973-b12d6124a46f.mp4
Checklist
Please, go through these checks before submitting the PR.
- [X] You have a descriptive commit message with a short title (first line, max 50 chars).
- [X] You have commented your code, particularly in hard-to-understand areas
- [X] You have performed a self-review of your own code
- [X] UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
- [ ] UI Changes: You have tested your change using the Google Accessibility Scanner
Drafting because of some issues shown on the video.
- the restore option spins eternally
- "Remove preset" doesn't work
- There isn't any feedback after taping "Save"
- a big right margin shows up if you open one of the preset dialogs
I barely have explored/tested this screen, so some of these are probably my fault. Not sure when I'll be available to work on this
Splendid! Thanks a lot for this work!
- The spinning is the same on the desktop when you hover over the option - I believe Henrik intended it to be that way, though the behaviour on mobile may have been unintentional.
- The feedback on save should be provided by AnkiDroid when it processes the save request
- Preset removal relies on the JavaScript confirm() and alert(), which AnkiDroid may have to add support for.
Preset removal relies on the JavaScript confirm() and alert(), which AnkiDroid may have to add support for.
I believe that these come from here on upstream, which are QWebEnginePage methods and which I need to find the Android methods to intercept them
Appears to be possible: https://stackoverflow.com/questions/2726377/how-to-handle-a-webview-confirm-dialog
~~On top of/blocked by #12289~~
Now that I noticed that if you tap "Restore this setting to its default value", it stops spinning. The spinning confused me a lot before, but that's something to solve on upstream.
https://user-images.githubusercontent.com/69634269/188265140-0dc78a22-33f9-4ff6-b16a-6cc352bede66.mp4
About the previous problems, only a big right margin shows up if you open one of the preset dialogs remains and this big margin:

As those aren't vital and I won't have time to investigate it any time soon, I think this can be reviewed.
I just rebased to main and did git push --force-with-lease on the reomte fork/branch mostly to re-start CI really easily but also to make sure this is up to date. Hoping to review shortly and get this in
This is getting dusty, but conflict-proof 😎
focused on scoped storage right now but I do want to get this in (obviously, I even pull/pushed the branch myself ha), just have to prioritize those PR reviews, thanks for your patience
I want to approve this but it is not working for me on an android 21 google-apis emulator?
Anki HTML pages need Chromium 77+, which means you need a updated version of WebView, and the WebView version that comes with the emulator is older (original discussion/testing here)
IIRC, SDK 21 devices can use WebView up to 96 or something near that. If you want to test it on emulator, you should update it
Ah ha! I'll try a play store emulator for 21, it can update I think. Subtle, good info thank you
Hi there @BrayanDSO! This is the OpenCollective Notice for PRs merged from 2022-10-01 through 2022-10-31
If you are interested in compensation for this work, the process with details is here:
https://github.com/ankidroid/Anki-Android/wiki/OpenCollective-Payment-Process#how-to-get-paid
We only post one comment per person per month to avoid spamming you, regardless of the number of PRs merged, but this note applies to all PRs merged for this month
Please note that GSoC contributions are okay for this process. Our philosophy is that our users have donated to AnkiDroid for all contributions. The only PRs that will not go through the OpenCollective process are ones directly related to am accepted GSoC project from a selected participant, since those receive a stipend from GSoC itself.
Please understand that our monthly budget is never guaranteed to cover all claims - the cap on payments-per-person may be lower, but we try to make our process as fair and transparent as possible, we just need your understanding.
Thanks!
How nice. Now we can specify intervals with units of hours (e.g. 3h) and days (e.g. 3d) on AnkiDroid as well as Anki Desktop. It's so useful. Information icons beside each items are also so helpful. Thanks a lot.
