[UX] Show progress bars
Some progress dialogs can show very large numbers, which makes it difficult to estimate the progress at a quick glance. Examples include
-
Full sync dialog
-
Check Database
I propose replacing these progress dialogs with percentage-based ones.
Anki Desktop shows the progress with a progress bar, which is also clearer than raw numbers.
Related:
- https://github.com/ankidroid/Anki-Android/pull/18341
I remember David suggesting something similar before, but I couldn't find any issue.
Instead of the progress bar, I suggest replacing the looping circle with a circular progress bar.
I’d like to work on this. Please assign me. I’ll switch number-only dialogs to percentage-based determinate progress bars when totals exist, and use an indeterminate circular indicator otherwise. ETA: 3–5 days. Related: #18341. Could a maintainer assign me? @user1823
Hi 👋, great issue! I’d love to help with showing progress as a percentage in dialogs.
What I’d do:
-
Replace numeric progress counts with percentage-based display
- Compute:
int percent = (current / (float) total) * 100 - Use this instead of raw numbers in progress dialogs.
- Compute:
-
Update UI components accordingly
- In
ProgressDialogFragment(or equivalent), change dialog text to: “Loading… 42%” rather than “Loading item 42/100” - Optionally add/enable a visual
ProgressBar(determinate style) reflecting the percentage.
- In
-
Fallback for unknown totals
- If total items aren’t available (indeterminate loading), keep an indeterminate spinner and skip percentage.
-
Ensure localization-ready formatting
- Use
String.format(Locale.getDefault(), "%d%%", percent)or Android string resources with%d%%placeholder.
- Use
-
Testing plan
- Check cases with known total vs unknown total.
- Cover dialogs like deck import, media sync, backup/restore, etc.
Happy to implement a first draft and share screenshots for feedback, or help with UX details like adding the proper progress bar style and localization. Let me know where I should begin, or if there’s a preferred dialog class to start with. Thanks!
Hi @BrayanDSO , I’d like to take this up if @bavi404 is not able to work on it. I’m interested in addressing the issue and implement percentage-based progress bars. If no one else is actively working on it, I can get started.
Hi @BrayanDSO , I’d like to take this up if @bavi404 is not able to work on it. I’m interested in addressing the issue and implement percentage-based progress bars. If no one else is actively working on it, I can get started.
- hey, I have been working on it as well, only that I'm not quite satisfied with the result yet. I think I'd be able to finish it soon (unfortunately took longer than expected) but yeah if you have a better, quicker solution it would be cool too.
@david-allison ,Is this issue open to work?
Sure, cheers!
Hey @david-allison , I’ve completed most of the implementation and I’m now in the testing phase. I’m trying to ensure full coverage , could you please point me to all the places in the app where progress dialogs appear, so I can verify the new implementation thoroughly?
A brief search for withProgress shows hundreds. Could you push your progress to a branch?
is this issue still being worked on, it's been 1 and a half months? @gurnoorpannu If not, I'd like to take the issue up
is this issue still being worked on, it's been 1 and a half months? @gurnoorpannu If not, I'd like to take the issue up
sure! go ahead
Just wanted to show a mock UI, if we are fine with this I'll proceed but the concept i'm going for is to make a helper class that can be used in the withProgressDialog function in CoroutineHelpers.kt, this should allow for pretty much any progress counter, having a fixed end, to be changed into the progress circle. I'm open to any other ideas, but since we are using withProgress in so many areas, I thought this would be best. (The below is implemented using a test function which I slotted into onResume so that won't be there later on ofc)
https://github.com/user-attachments/assets/0614cd2c-3a43-4444-9bdb-8564e5a8d0cb
Hello 👋, this issue has been opened for more than 3 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically
The following PR moved this into 'X MB/XY MB' progress. I looked into showing a percentage and it's possible, but means we'd need to recode ProgressDialog, which is more work.
- As far as I recall, we have a loading step before a percentage step, and the dialog can't change between an indeterminate and determinate progress spinner once shown (and it's a deprecated class)
@Arthur-Milchior - pinging on a review, so we can pick which PR to merge
- https://github.com/ankidroid/Anki-Android/pull/18341#issuecomment-4020251089
- https://github.com/david-allison/Anki-Android/pull/49
Sorry for not being of much help here, was supposed to get back to it in the coming month but glad it was resolved You can unsassign me on this one since we are merging a fix
My fix displays progress textually, but it does not include a 'progress bar'
We have an 'Amount' abstraction: https://github.com/ankidroid/Anki-Android/pull/20671/changes#diff-ab2a7a47110cd7660b276c059e8612c4586f636533d31b36f631808c6558cc73R543
If we recode ProgressDialog so the progress style can be set after the dialog is shown, we can then provide Amount to this, and get a better progress experience.
This is to be enabled on a case-by-case basis as some operations appear to not contain a 'global' progress indicator (computeMemory):
- https://github.com/ankidroid/Anki-Android/pull/20909
Hello 👋, this issue has been opened for more than 3 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically