-
Notifications
You must be signed in to change notification settings - Fork 497
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 #4026, #4027, #4040, #4076, #4287, #4319, #4329: Fix miscellaneous bugs found while testing alpha MR4 #4259
Conversation
Issues this will fix:
#4076 isn't included yet, but will be in a follow-up commit. Once these are all re-verified as implemented, I'll need to audit this PR and clean it up in terms of code layout, architecture, and readability. Then, tests will need to be added & the PR title/description finalized before this can be sent for review. |
Hi @BenHenning, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue. |
Conflicts: domain/src/main/java/org/oppia/android/domain/devoptions/ModifyLessonProgressController.kt domain/src/main/java/org/oppia/android/domain/topic/TopicController.kt utility/build.gradle utility/src/main/java/org/oppia/android/util/parser/image/UrlImageParser.kt
The first fix addresses #4076 in full. The second fix addresses what seems to be a long-standing issue with image region selection to ensure that the region views are always clickable when the interaction loads.
Hi @BenHenning, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue. |
Still active. |
This test corresponds to Bazel-locked functionality, so it can't pass on Gradle in the same way.
@anandwana001 PTAL. |
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 @anandwana001 since they have already approved the PR. |
Hi @BenHenning, this PR is ready to be merged. Please address any remaining comments prior to merging, and feel free to merge this PR once the CI checks pass and you're happy with it. Thanks! |
Hi @BenHenning, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue. |
…ndroid into fix-miscellaneous-mr4-bugs
Note that I plan to push more fixes to this branch, and additional tests. I'll re-request a review at that time. |
Conflicts: domain/src/test/java/org/oppia/android/domain/topic/TopicListControllerTest.kt
…ndroid into fix-miscellaneous-mr4-bugs
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 Thanks.
Explanation
Fixes #4026
Fixes #4027
Fixes #4040
Fixes #4076
Fixes #4287
Fixes #4319
Fixes #4329
This PR fixes a bunch of different issues, but specifically:
Image fixes
There are images below demonstrating some of the problems and what they look like with the fix in place.
There were three categories of issues that needed to be fixed:
Image region interaction issue
It's not entirely clear to me after investigating why this issue seems to affect alpha assets but not the local prototype exploration. Nevertheless, the problem is that image regions may not compute correctly when translated to views which makes the interaction impossible to get past (we didn't notice this before because the image itself wasn't being pulled in until #4026 was fixed). The reasonable workaround for the sizing issue was to ensure Android was explicitly told to relayout such that it would definitely recompute the region views' dimensions (https://stackoverflow.com/a/42430695/3689782 explains the flow in much more detail, and there's a detailed comment in
ClickableAreasImage
).Notes on testing and verifications
I mostly focused on introducing regression tests for bugs that I could, but some aren't possible:
AssetRepositoryImpl
doesn't have a test suite, and I didn't want to add that in this PR due to many other priorities.Beyond that, however, I did add tests for the other parts of the PR. I also verified that the new tests in both
TopicListControllerTest
andStateFragmentTest
correctly failed without their corresponding fixes in place. Finally, I manually verified the continue button behavior, the crash, and image behaviors on the branch against develop to verify that the fixes are working as expected.Essential Checklist
For UI-specific PRs only
Screenshots
Images showing the change in continue button behavior:
Note that I didn't add localization cases or the accessibility video since neither should be affected by the UI fixes introduced in this PR.
Espresso test results
StateFragmentTest
results:Note that I only ran
StateFragmentTest
on Espresso since:StateFragmentLocalTest
wasn't updated directly (since the new tests went inStateFragmentTest
), and it was verified as passing on Robolectric (given it can't run on Espresso).