Skip to content

feat: Shared deck screen redesign - #21854

Open
criticalAY wants to merge 3 commits into
ankidroid:mainfrom
criticalAY:shared-decks-compose
Open

criticalAY wants to merge 3 commits into
ankidroid:mainfrom
criticalAY:shared-decks-compose

Conversation

@criticalAY

Copy link
Copy Markdown
Contributor

Purpose / Description

Redesign the download deck screen in Compose;

Fixes

NA

Approach

See commits

How Has This Been Tested?

Pixel 10 and Emulator:
Here's Pixel 10 screen rec.

Screen_recording_20260915_103943.mp4

Learning (optional, can help others)

NA

Checklist

Please, go through these checks before submitting the PR.

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • 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

@github-actions

Copy link
Copy Markdown
Contributor

Important

Maintainers: This PR contains Strings changes

  1. Sync Translations before merging this PR and wait for the action to complete
  2. Review and merge the auto-generated PR in order to sync all user-submitted translations
  3. Sync Translations again and merge the PR so the huge automated string changes caused by merging this PR are by themselves and easy to review

@criticalAY criticalAY added the Jetpack Compose Code or UI components built with or migrating to Jetpack Compose. label Sep 15, 2026
@github-actions

github-actions Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Snapshot diff report vs main. Open screenshot-diff for diffs.

  • SharedDecksScreenshotTest: 1 change
All 1 changed screenshots

SharedDecksScreenshotTest

  • download_compare.png

@david-allison david-allison left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (not even that, looks excellent!), one comment on the download calculation.

Please add follow up issues:

  • Animation on the progress + indicator, probably every 1s with the text driven by same value
  • We need a higher priority issue to handle failues:
    • Due to increased AnkiWeb rate limits, a user gets 1 download before they need to log in
    • Our UX states 'failed' rather than 'login required'
    • Our UX moves to 'sign up' with a very small 'login' button
    • Sign up on AnkiWeb does not accept a login

val timeDiff = currentTime - lastTime
val bytesDiff = downloadedBytes - lastBytesDownloaded

if (bytesDiff >= 0) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This handles a byte diff of 0, which is going to happen: we poll every 1s, and upstream produces every 2s.

  • Skip 0 by default
  • Add a timeout, if the count hasn't moved in N seconds, start to reduce the speed

}
}

@Composable

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like for each component to have a brief description in a KDoc

@david-allison david-allison added the Needs Author Reply Waiting for a reply from the original author label Sep 16, 2026

@david-allison david-allison left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@david-allison david-allison added Needs Second Approval Has one approval, one more approval to merge and removed Needs Author Reply Waiting for a reply from the original author Needs Review labels Sep 16, 2026
@david-allison

Copy link
Copy Markdown
Member

@criticalAY with apologies, could we pause this in favor of:

It came up as a bug for 2.25, and there's a fair few changes here

@criticalAY

Copy link
Copy Markdown
Contributor Author

Sure!

@david-allison

david-allison commented Sep 18, 2026 •

Copy link
Copy Markdown
Member

Thanks so much!

PR is up:

criticalAY and others added 3 commits September 29, 2026 12:12
Same layout, strings and colours as the XML it replaces, now on
Material 3 components. Insets move from the listener onto the screen.
Colby's Material 3 design from 20962: a big progress ring with the
size downloaded, a card saying it's safe to leave, and the actions in
a flow row. Content stops at 600dp so it doesn't stretch on tablets.

Co-Authored-By: ColbyCabrera <gdthyispro@gmail.com>
Two cards under the ring. Colby's calculator smooths the speed so it
doesn't jump between polls, and time left stays blank until there's
enough data to estimate it.

Co-Authored-By: ColbyCabrera <gdthyispro@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Jetpack Compose Code or UI components built with or migrating to Jetpack Compose. Needs Second Approval Has one approval, one more approval to merge Strings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants