-
Notifications
You must be signed in to change notification settings - Fork 537
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 #2476, #3312 and #3703: Move hint handler to domain layer #3659
Conversation
@BenHenning PTAL |
The one failing CI is because there are no tests for the file hintHandler (there are that ensure the proper functioning of the hint handler in state fragment local tests) |
This simplifies some data pipelining in the UI, and improves HintHandler documentation in addition to fixing some more reviewer comments.
linking issue #3312 as this PR essentially covers the scope of the issue. |
This simplifies the changes & approvals needed in #3705.
Also, fix broken reference error accidentally introduced in an earlier commit.
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 the fast reviews! @rt4914 @vinitamurthi @anandwana001 can you PTAL at the latest changes & make sure they look good (& that the old conversation threads are resolved if so)?
I verified that all static checks, Gradle tests, and Bazel tests seem to work locally before uploading the latest changes. I also synced the branch with develop. If no further questions arise, this PR can probably be merged without waiting for the Bazel tests (to speed things up for @yashraj-01 & @MaskedCarrot).
Also, marking PR as approved since I reviewed all the changes & verified my old comment threads are now addressed.
app/src/main/java/org/oppia/android/app/topic/questionplayer/QuestionPlayerFragmentPresenter.kt
Outdated
Show resolved
Hide resolved
domain/src/main/java/org/oppia/android/domain/question/QuestionAssessmentProgress.kt
Outdated
Show resolved
Hide resolved
domain/src/main/java/org/oppia/android/domain/question/QuestionAssessmentProgressController.kt
Show resolved
Hide resolved
domain/src/test/java/org/oppia/android/domain/hintsandsolution/HintHandlerTest.kt
Outdated
Show resolved
Hide resolved
domain/src/test/java/org/oppia/android/domain/hintsandsolution/HintHandlerTest.kt
Outdated
Show resolved
Hide resolved
Ack @yashraj-01 that SGTM. Thanks! |
Unassigning @BenHenning since they have already approved the PR. |
Ah excellent. We can see via CI that #3703 is being resolved (all //testing module tests are now showing up in CI as they should have been originally). |
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.
LGTM,
as per this comment all static and bazel test checked locally, so the PR is gtg.
Unassigning @anandwana001 since they have already approved the PR. |
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.
LGTM
Unassigning @rt4914 since they have already approved the PR. |
All conversation threads have been verified & closed, required CI checks are passing, and required approvals are in. Going ahead and merging this since I verified that the new testing tests are correctly in CI now, and I verified locally that all Bazel tests are passing. This is blocking two separate streams of time-sensitive work, so I think we can take the risk of merging this in now. Note that it's theoretically possible that the testing module tests that were previously missing from CI now fail on develop. If this occurs, I'll fix forward to avoid reverting this large, blocking PR & because those tests are not yet blocking (we're running them in Gradle & they've been passing on CI--that check is required). Thanks again all for the repeated reviews & collaboration on this tricky unexpected design challenge. I'm glad we found a workable solution quickly. |
Explanation
Fixes #2476
Fixes #3312
Fixes #3703
Note that this PR was made in collaboration between @MaskedCarrot, @yashraj-01, and @BenHenning (see commits for specifics). Further, much of this was built as part of #3696 as a separate rewrite to address specific technical needs for both downstream dependent projects (lightweight checkpointing & developer options menu).
At a high-level, this PR moves & rebuilds HintHandler from the UI layer to being a separate, independent logic unit within the domain layer. Key changes that are meant to simplify hint handling:
This PR introduces a few other examples for future changes:
While neither of those are unique, the relevant part is that these were the default approaches taken to address the test file presence requirement.
Other details:
Checklist
Without this fix, tests (added in this PR because they were not present) fail on the latest develop.