Skip to content

design(ui): convert IncrementerNumberPicker to Compose - #22846

Open
david-allison wants to merge 5 commits into
ankidroid:mainfrom
david-allison:compose-number-picker
Open

david-allison wants to merge 5 commits into
ankidroid:mainfrom
david-allison:compose-number-picker

Conversation

@david-allison

Copy link
Copy Markdown
Member

Note

Assisted-by: GPT-6.1-Sol xhigh

Purpose / Description

Approach

  • Extract utils
  • Add screenshot tests
  • Implement in Compose
  • Use in the Backup screen
  • Fix an issue: done closed the soft keyboard, rather than submitting the dialog

How Has This Been Tested?

Screenshot tests are 1:1 matching

Checklist

  • 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

@david-allison david-allison added the Jetpack Compose Code or UI components built with or migrating to Jetpack Compose. label Oct 28, 2026
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

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

  • BackupPickerScreenshotTest: 16 changes
All 16 changed screenshots

BackupPickerScreenshotTest

  • daily_compare.png
  • daily_landscape_compare.png
  • daily_large_text_compare.png
  • interval_below_minimum_compare.png
  • interval_compare.png
  • interval_empty_compare.png
  • interval_landscape_compare.png
  • interval_large_text_compare.png
  • interval_maximum_compare.png
  • interval_minimum_compare.png
  • monthly_compare.png
  • monthly_landscape_compare.png
  • monthly_large_text_compare.png
  • weekly_compare.png
  • weekly_landscape_compare.png
  • weekly_large_text_compare.png

@david-allison

Copy link
Copy Markdown
Member Author
daily_compare daily_landscape_compare daily_large_text_compare interval_below_minimum_compare interval_compare interval_empty_compare interval_landscape_compare interval_large_text_compare interval_maximum_compare interval_minimum_compare monthly_compare monthly_landscape_compare monthly_large_text_compare weekly_compare weekly_landscape_compare weekly_large_text_compare

@david-allison david-allison added the Needs Author Reply Waiting for a reply from the original author label Oct 28, 2026
@david-allison
david-allison marked this pull request as draft October 28, 2026 19:57
* 1:1 design
* native numeric field interop
* existing input connection code
* existing accessibility behavior

Assisted-by: GPT-6.1-Sol xhigh
* backup preferences only (for now)

Screenshots are byte-identical

Prep for moving 'reposition' to this dialog

Assisted-by: GPT-6.1-Sol xhigh
'done' & 'enter' press the 'save' button if available.

Assisted-by: GPT-6.1-Sol xhigh
@david-allison david-allison removed the Needs Author Reply Waiting for a reply from the original author label Nov 2, 2026
@david-allison
david-allison marked this pull request as ready for review November 2, 2026 17:30

@mikehardy mikehardy 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.

Assisted-by: Grok 4.7

Thank you — wiring IME Done/Enter through the enabled Save button keeps the incrementer honest without changing the range rules.

Locally I rebased onto main without force-pushing (prep stayed at the PR tip). I ran lint (lintAll, ktlintCheck, lint-rules:test), unit tests (jacocoUnitTestReport), and release emulator tests (TEST_RELEASE_BUILD=true via run_emulator_tests.py on emulator-5556 / API35_GAPI); all passed.

Reviewed the shared Compose IncrementerNumberPicker hosted from IncrementerNumberRangePreferenceCompat, validation in NumberPickerState, backup-picker Roborazzi/input/a11y coverage, and Done/Enter performing the positive button only when in-range so cancel and bad input do not persist.

some acceptable findings, no action required, just leaving for posterity: backup test artifacts under filesDir/backup-picker are write-only; screenshot test header still mentions comparing old vs new picker though it captures the current dialog once.

Screenshot changes have been detected, so leaving this for a good manual look.

@mikehardy mikehardy added Needs Second Approval Has one approval, one more approval to merge and removed Needs Review labels Nov 3, 2026
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants