-
Notifications
You must be signed in to change notification settings - Fork 531
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
Fix #4492 & 3537: Improved hints and solution UI UX #4500
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for much @rt4914! Really well done implementation. Just had a few comments that I plan to follow up on directly.
if (currentExpandedHintListIndex == -1) { | ||
currentExpandedHintListIndex = null | ||
} | ||
expandedItemsList = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noting that it would be preferable to use a proto here to avoid passing around mutable state.
.../main/java/org/oppia/android/app/hintsandsolution/HintsAndSolutionDialogFragmentPresenter.kt
Show resolved
Hide resolved
.../main/java/org/oppia/android/app/hintsandsolution/HintsAndSolutionDialogFragmentPresenter.kt
Show resolved
Hide resolved
) { | ||
binding.buttonViewModel = returnToLessonViewModel | ||
|
||
binding.returnToLessonButton.setOnClickListener { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be moved to the view model for slightly simpler binding.
app/src/main/java/org/oppia/android/app/hintsandsolution/HintsViewModel.kt
Outdated
Show resolved
Hide resolved
app/src/test/java/org/oppia/android/app/player/state/StateFragmentLocalTest.kt
Outdated
Show resolved
Hide resolved
app/src/test/java/org/oppia/android/app/player/state/StateFragmentLocalTest.kt
Outdated
Show resolved
Hide resolved
closeHintsAndSolutionsDialog() | ||
|
||
onView(withId(R.id.hint_bulb)) | ||
.check(matches(withDrawable(R.drawable.ic_keyboard_arrow_right_white_48))) | ||
} | ||
} | ||
|
||
@Test | ||
fun testStateFragment_openHintsAndSolution_checkReturnToLessonButtonIsVisible() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about a test verifying clicking on the return to lesson button?
closeHintsAndSolutionsDialog() | ||
|
||
onView(withId(R.id.hint_bulb)) | ||
.check(matches(withDrawable(R.drawable.ic_keyboard_arrow_right_white_48))) | ||
} | ||
} | ||
|
||
@Test | ||
fun testStateFragment_openHintsAndSolution_checkReturnToLessonButtonIsVisible() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth adding these new tests to questions' local tests, too.
FWIW this seems like a complete fix of #4492 as far as I can tell, though some investigation may be needed with regards to the hint timing logic. |
Confirming that the current logic will NOT pause the timer while the hints are being viewed (I think this is a change in behavior from the old hints implementation). I think fixing it will be straightforward, but I'll follow up soon. |
Okay, this is very much not going to be trivial, so I think we may need to skip it for this release. Will follow up with Sean on product priority here. The main issue is that hints are handled in the domain layer entirely separately from the frontend lifecycle. We almost certainly would need to either somehow provide signal from the frontend when hints are being shown (and not mess this up since it'll break the hints timer), or manage hint state based on the observation of its results (similar to how ExplorationProgressController used to work), but this is difficult and not at all straightforward since hint behaviors are observed through ExplorationProgressController. I suspect we may need the DataProvider dynamic transformation that I'm working on for the beta release in order to even start tackling this issue. |
I would say, just make the timer for showing the next hint long enough so that it's unlikely that a student will get another hint while the current hint is showing. 2 or 2.5 minutes should be reasonable. (Note: this is still a stopgap and we should fix it properly in the long term.) |
@seanlip fortunately we can very easily tweak this specifically for the study build. We currently have three hint delays which I think should be adjusted as such:
Does this seem sensible? |
Yes, seems reasonable. I slightly lean towards making the third one 15 seconds instead of 10, to give the learner some time to read the wrong answer feedback. |
Update hint delay times for the Kenya-specific alpha build of the app.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving this with some open comments. #4510 is tracking addressing those comments post-merge. Plus, an additional review should take place for the changes I contributed directly to the PR (since they haven't yet been reviewed).
Explanation
Fixes #4492 by introducing a complete revamp of the hint & solution management flow in the app (see designs below).
Fixes #3537 by merging the hint summary layouts.
Note that one part of #4492 isn't implemented: pausing the hint timer while hints are being viewed. Ensuring this is properly implemented is being tracked as part of #4510.
Two new test exemptions were added: one for a new view model file (which seems sensible since most of the changes in this PR are aesthetic and not functional), and a second for a new hints configuration module that's specific to the alpha user study build of the app (which is temporary and we generally don't test thoroughly, anyway).
Designs
https://xd.adobe.com/view/3dca36c2-5115-419c-b25e-0f10526b077c-6899/screen/619724cc-0ecf-4c32-a452-432fded803f5/specs/
https://xd.adobe.com/view/3dca36c2-5115-419c-b25e-0f10526b077c-6899/screen/5311124a-b143-4916-aa46-6e318aca5650/specs/
https://xd.adobe.com/view/3dca36c2-5115-419c-b25e-0f10526b077c-6899/screen/545c6f32-2fec-4a8b-bb53-cecfb8e52f31/specs/
Essential Checklist
For UI-specific PRs only
If your PR includes UI-related changes, then:
Mobile Portrait
Mobile Landscape
Tablet
Return to Lesson button
NOTE: This button was created later on that's why not all screenshots contain this button but the below screenshot should suffice. It is fully functional too.
Dark Mode (Not Implemented)
Do not have designs for dark mode
RTL Support
Accessibility Output
There are few issues but not solving them right now.
Video Output
20220816_000912.mp4