Skip to content

feat(new reviewer): answer timer #18510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BrayanDSO
Copy link
Member

@BrayanDSO BrayanDSO commented Jun 13, 2025

localized below the Count numbers to avoid losing screen space

Approach

  1. Add an improved subclass of Chronometer to handle configuration changes properly
  2. Add the Timer below the Count numbers
  3. Setup the timer

How Has This Been Tested?

Emulator SDK 35:

timer.mp4

Android 15 phone (Galaxy S23):

Screen_Recording_20250613_203446_AnkiDroid.mp4

Learning (optional, can help others)

  1. Had heard before about ConstraintLayout Flow, but never used it until now
  2. You can force the emission of the same value in MutableStateFlow by overriding equals() and hashCode() https://stackoverflow.com/questions/62331931/mutablestateflow-is-not-emitting-values-after-1st-emit-kotlin-coroutine

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

@BrayanDSO BrayanDSO marked this pull request as draft June 13, 2025 23:03
@BrayanDSO BrayanDSO marked this pull request as ready for review June 13, 2025 23:39
@david-allison
Copy link
Member

In the first video, the answer counts are not in a stable position on the screen. Can this be fixed?

@BrayanDSO
Copy link
Member Author

BrayanDSO commented Jun 14, 2025

the timer can be in the top left of the screen.

Screen_recording_20250613_212920.mp4

Both options are fine to me. I just don't want to lose vertical space.

With the toolbar on the bottom

image

image

localized below the Count numbers to avoid losing screen space
@david-allison
Copy link
Member

I prefer the timer below the counts. Very minor preference. Implementer's choice

My point was that It's distracting to have UI elements move in-between cards.

@BrayanDSO
Copy link
Member Author

BrayanDSO commented Jun 14, 2025

My point was that It's distracting to have UI elements move in-between cards.

In most use cases, the user either will never use the timer or always use the timer. If they have mixed deck options, and with the same parent deck, the vanishing/appearing timer calls the atention either way, and that may be even beneficial for that case, so the user notices that there is a timer.

@mikehardy
Copy link
Member

@BrayanDSO - I think you mean "In most use cases, the user either will never use the timer or always use the timer" (never/always, vs never/never) ?

@david-allison I'm inclined to agree, I don't think most decks contain mixed note types, and I don't think most people that like the timer will only use it sometimes, and my guess at the intersection of those two guesses is pretty small and Brayan's argument it might even be a positive is somewhat persuasive. I'm inclined to go with Brayan on this one and go with it as-is

Needs consensus either way though ?

@mikehardy mikehardy requested a review from david-allison June 16, 2025 15:53
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.

I'm happy (to keep the moving UI elements), could we document the decision in the code?

@david-allison david-allison added Needs Second Approval Has one approval, one more approval to merge and removed Needs Review labels Jun 16, 2025
@BrayanDSO
Copy link
Member Author

In most use cases, the user either will never use the timer or always use the timer" (never/always, vs never/never) ?

Never/Always.

@BrayanDSO BrayanDSO added the Needs Author Reply Waiting for a reply from the original author label Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Author Reply Waiting for a reply from the original author Needs Second Approval Has one approval, one more approval to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants