Skip to content

feat: improve learn ahead and timebox dialogs#20485

Merged
BrayanDSO merged 1 commit intoankidroid:mainfrom
Hammadtanveer:feat/improve-learn-timebox-dialogs
Mar 15, 2026
Merged

feat: improve learn ahead and timebox dialogs#20485
BrayanDSO merged 1 commit intoankidroid:mainfrom
Hammadtanveer:feat/improve-learn-timebox-dialogs

Conversation

@Hammadtanveer
Copy link
Contributor

Purpose / Description

The "Learn ahead limit" and "Timebox time limit" dialogs use a plain text input. This PR improves them by adding stepper buttons and changing "OK" to "Save".

Fixes

Approach

Switched both preferences in preferences_reviewing.xml from NumberRangePreferenceCompat to IncrementerNumberRangePreferenceCompat which already has +/- stepper buttons and input validation built in. Added dialog_save string to 03-dialogs.xml and updated the positive button text in IncrementerNumberRangePreferenceCompat to use it.

This addresses the required changes from the issue. The optional changes (unit label and description text) are not included in this PR and can be done separately.

How Has This Been Tested?

Built with assembleDebug and tested both dialogs on emulator (API 36).

@github-actions
Copy link
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

@david-allison
Copy link
Member

Can I confirm you've read our AI policy: https://github.com/ankidroid/Anki-Android/blob/main/AI_POLICY.md#new-contributors

  • we already have R.string.save

@Hammadtanveer
Copy link
Contributor Author

Yes, I have read the AI policy. I'll remove the duplicate string and use Rstring.save insted

@david-allison david-allison added the Needs Author Reply Waiting for a reply from the original author label Mar 15, 2026
@Hammadtanveer Hammadtanveer force-pushed the feat/improve-learn-timebox-dialogs branch from ff366eb to 4eaf673 Compare March 15, 2026 18:25
@Hammadtanveer
Copy link
Contributor Author

Fixed. Anything else to improve.

@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 Strings labels Mar 15, 2026
Copy link
Member

@david-allison david-allison left a comment

Choose a reason for hiding this comment

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

If you request a review, it removes my previous one

@Hammadtanveer Hammadtanveer force-pushed the feat/improve-learn-timebox-dialogs branch from 4eaf673 to 0886124 Compare March 15, 2026 19:37
@BrayanDSO BrayanDSO added this pull request to the merge queue Mar 15, 2026
@BrayanDSO BrayanDSO added Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) and removed Needs Second Approval Has one approval, one more approval to merge labels Mar 15, 2026
Merged via the queue into ankidroid:main with commit ffed658 Mar 15, 2026
15 checks passed
@github-actions github-actions bot removed the Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) label Mar 15, 2026
@github-actions github-actions bot added this to the 2.24 release milestone Mar 15, 2026
@Hammadtanveer Hammadtanveer deleted the feat/improve-learn-timebox-dialogs branch March 15, 2026 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants