Skip to content
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 #5631: Fix thumbnail loading for multiple classrooms #5642

Merged
merged 13 commits into from
Jan 21, 2025

Conversation

theMr17
Copy link
Collaborator

@theMr17 theMr17 commented Jan 6, 2025

Explanation

Fixes #5631

This PR introduces a new ThumbnailImage composable that integrates the LessonThumbnailImageView within a Compose layout. The changes include:

  • Adding the basic structure for ThumbnailImage composable.
  • Updating various UI components to use the new ThumbnailImage composable.
  • Adding classroom thumbnail drawables to LessonThumbnailImageView.

Note: Initial attempts were made to use the Glide Compose library, but was found to be incompatible with other dependencies #5631 (comment).

Screenshots

Light Mode Dark Mode
image image
image image

Essential Checklist

  • The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • Any changes to scripts/assets files have their rationale included in the PR explanation.
  • The PR follows the style guide.
  • The PR does not contain any unnecessary code changes from Android Studio (reference).
  • The PR is made from a branch that's not called "develop" and is up-to-date with "develop".
  • The PR is assigned to the appropriate reviewers (reference).

For UI-specific PRs only

If your PR includes UI-related changes, then:

  • Add screenshots for portrait/landscape for both a tablet & phone of the before & after UI changes
  • For the screenshots above, include both English and pseudo-localized (RTL) screenshots (see RTL guide)
  • Add a video showing the full UX flow with a screen reader enabled (see accessibility guide)
  • For PRs introducing new UI elements or color changes, both light and dark mode screenshots must be included
  • Add a screenshot demonstrating that you ran affected Espresso tests locally & that they're passing

@theMr17 theMr17 requested a review from a team as a code owner January 6, 2025 06:04
@theMr17 theMr17 requested a review from adhiamboperes January 6, 2025 06:04
@theMr17
Copy link
Collaborator Author

theMr17 commented Jan 6, 2025

Hey @BenHenning, as discussed in chat, we can use this PR to test again with the production assets. PTAL.

@theMr17 theMr17 requested a review from a team as a code owner January 6, 2025 06:58
Copy link

github-actions bot commented Jan 6, 2025

Coverage Report

Results

Number of files assessed: 11
Overall Coverage: 0.00%
Coverage Analysis: PASS

Exempted coverage

Files exempted from coverage
File Exemption Reason
ExplorationHtmlParserEntityType.ktutility/src/main/java/org/oppia/android/util/parser/html/ExplorationHtmlParserEntityType.kt
This file is exempted from having a test file; skipping coverage check.
HtmlParserEntityTypeModule.ktutility/src/main/java/org/oppia/android/util/parser/html/HtmlParserEntityTypeModule.kt
This file is exempted from having a test file; skipping coverage check.
LessonThumbnailImageView.ktapp/src/main/java/org/oppia/android/app/customview/LessonThumbnailImageView.kt
This file is incompatible with code coverage tooling; skipping coverage check.
ClassroomSummaryViewModel.ktapp/src/main/java/org/oppia/android/app/home/classroomlist/ClassroomSummaryViewModel.kt
This file is exempted from having a test file; skipping coverage check.
ClassroomListViewModel.ktapp/src/main/java/org/oppia/android/app/classroom/ClassroomListViewModel.kt
This file is exempted from having a test file; skipping coverage check.
ThumbnailImage.ktapp/src/main/java/org/oppia/android/app/classroom/ThumbnailImage.kt
This file is exempted from having a test file; skipping coverage check.
TopicCard.ktapp/src/main/java/org/oppia/android/app/classroom/topiclist/TopicCard.kt
This file is exempted from having a test file; skipping coverage check.
ClassroomListFragmentPresenter.ktapp/src/main/java/org/oppia/android/app/classroom/ClassroomListFragmentPresenter.kt
This file is exempted from having a test file; skipping coverage check.
ClassroomList.ktapp/src/main/java/org/oppia/android/app/classroom/classroomlist/ClassroomList.kt
This file is exempted from having a test file; skipping coverage check.
ComingSoonTopicList.ktapp/src/main/java/org/oppia/android/app/classroom/promotedlist/ComingSoonTopicList.kt
This file is exempted from having a test file; skipping coverage check.
PromotedStoryList.ktapp/src/main/java/org/oppia/android/app/classroom/promotedlist/PromotedStoryList.kt
This file is exempted from having a test file; skipping coverage check.

Refer test_file_exemptions.textproto for the comprehensive list of file exemptions and their required coverage percentages.

To learn more, visit the Oppia Android Code Coverage wiki page

Copy link

github-actions bot commented Jan 7, 2025

APK & AAB differences analysis

Note that this is a summarized snapshot. See the CI artifacts for detailed differences.

Dev

Expand to see flavor specifics

Universal APK

APK file size: 19 MiB (old), 19 MiB (new), 4868 bytes (Added)

APK download size (estimated): 17 MiB (old), 17 MiB (new), 4619 bytes (Added)

Method count: 260202 (old), 260231 (new), 29 (Added)

Features: 2 (old), 2 (new), 0 (No change)

Permissions: 6 (old), 6 (new), 0 (No change)

Resources: 6818 (old), 6818 (new), 0 (No change)

  • Anim: 43 (old), 43 (new), 0 (No change)
  • Animator: 26 (old), 26 (new), 0 (No change)
  • Array: 15 (old), 15 (new), 0 (No change)
  • Attr: 922 (old), 922 (new), 0 (No change)
  • Bool: 9 (old), 9 (new), 0 (No change)
  • Color: 967 (old), 967 (new), 0 (No change)
  • Dimen: 1048 (old), 1048 (new), 0 (No change)
  • Drawable: 380 (old), 380 (new), 0 (No change)
  • Id: 1275 (old), 1275 (new), 0 (No change)
  • Integer: 37 (old), 37 (new), 0 (No change)
  • Interpolator: 11 (old), 11 (new), 0 (No change)
  • Layout: 380 (old), 380 (new), 0 (No change)
  • Menu: 3 (old), 3 (new), 0 (No change)
  • Mipmap: 1 (old), 1 (new), 0 (No change)
  • Plurals: 10 (old), 10 (new), 0 (No change)
  • Raw: 2 (old), 2 (new), 0 (No change)
  • String: 852 (old), 852 (new), 0 (No change)
  • Style: 831 (old), 831 (new), 0 (No change)
  • Xml: 6 (old), 6 (new), 0 (No change)

Lesson assets: 111 (old), 111 (new), 0 (No change)

AAB differences

Expand to see AAB specifics

Supported configurations:

  • hdpi (same)
  • ldpi (same)
  • mdpi (same)
  • tvdpi (same)
  • xhdpi (same)
  • xxhdpi (same)
  • xxxhdpi (same)

Base APK

APK file size: 18 MiB (old), 18 MiB (new), 4872 bytes (Added)
APK download size (estimated): 17 MiB (old), 17 MiB (new), 1678 bytes (Added)
Method count: 260202 (old), 260231 (new), 29 (Added)

Configuration hdpi

APK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change)
APK download size (estimated): 18 KiB (old), 18 KiB (new), 0 bytes (No change)

Configuration ldpi

APK file size: 49 KiB (old), 49 KiB (new), 0 bytes (No change)
APK download size (estimated): 14 KiB (old), 14 KiB (new), 0 bytes (No change)

Configuration mdpi

APK file size: 45 KiB (old), 45 KiB (new), 0 bytes (No change)
APK download size (estimated): 14 KiB (old), 14 KiB (new), 0 bytes (No change)

Configuration tvdpi

APK file size: 86 KiB (old), 86 KiB (new), 0 bytes (No change)
APK download size (estimated): 29 KiB (old), 29 KiB (new), 0 bytes (No change)

Configuration xhdpi

APK file size: 57 KiB (old), 57 KiB (new), 0 bytes (No change)
APK download size (estimated): 21 KiB (old), 21 KiB (new), 0 bytes (No change)

Configuration xxhdpi

APK file size: 63 KiB (old), 63 KiB (new), 0 bytes (No change)
APK download size (estimated): 29 KiB (old), 29 KiB (new), 0 bytes (No change)

Configuration xxxhdpi

APK file size: 63 KiB (old), 63 KiB (new), 0 bytes (No change)
APK download size (estimated): 28 KiB (old), 28 KiB (new), 0 bytes (No change)

Alpha

Expand to see flavor specifics

Universal APK

APK file size: 11 MiB (old), 11 MiB (new), 39 KiB (Removed)

APK download size (estimated): 10 MiB (old), 10 MiB (new), 40 KiB (Removed)

Method count: 116281 (old), 115770 (new), 511 (Removed)

Features: 2 (old), 2 (new), 0 (No change)

Permissions: 6 (old), 6 (new), 0 (No change)

Resources: 5786 (old), 5786 (new), 0 (No change)

  • Anim: 33 (old), 33 (new), 0 (No change)
  • Animator: 24 (old), 24 (new), 0 (No change)
  • Array: 14 (old), 14 (new), 0 (No change)
  • Attr: 888 (old), 888 (new), 0 (No change)
  • Bool: 8 (old), 8 (new), 0 (No change)
  • Color: 820 (old), 820 (new), 0 (No change)
  • Dimen: 780 (old), 780 (new), 0 (No change)
  • Drawable: 342 (old), 342 (new), 0 (No change)
  • Id: 1221 (old), 1221 (new), 0 (No change)
  • Integer: 32 (old), 32 (new), 0 (No change)
  • Interpolator: 11 (old), 11 (new), 0 (No change)
  • Layout: 343 (old), 343 (new), 0 (No change)
  • Menu: 1 (old), 1 (new), 0 (No change)
  • Mipmap: 1 (old), 1 (new), 0 (No change)
  • Plurals: 10 (old), 10 (new), 0 (No change)
  • String: 785 (old), 785 (new), 0 (No change)
  • Style: 472 (old), 472 (new), 0 (No change)
  • Xml: 1 (old), 1 (new), 0 (No change)

Lesson assets: 111 (old), 111 (new), 0 (No change)

AAB differences

Expand to see AAB specifics

Supported configurations:

  • hdpi (same)
  • ldpi (same)
  • mdpi (same)
  • tvdpi (same)
  • xhdpi (same)
  • xxhdpi (same)
  • xxxhdpi (same)

Base APK

APK file size: 11 MiB (old), 11 MiB (new), 39 KiB (Removed)
APK download size (estimated): 10 MiB (old), 10 MiB (new), 39 KiB (Removed)
Method count: 116281 (old), 115770 (new), 511 (Removed)

Configuration hdpi

APK file size: 43 KiB (old), 43 KiB (new), 0 bytes (No change)
APK download size (estimated): 17 KiB (old), 17 KiB (new), 0 bytes (No change)

Configuration ldpi

APK file size: 44 KiB (old), 44 KiB (new), 0 bytes (No change)
APK download size (estimated): 13 KiB (old), 13 KiB (new), 0 bytes (No change)

Configuration mdpi

APK file size: 38 KiB (old), 38 KiB (new), 0 bytes (No change)
APK download size (estimated): 13 KiB (old), 13 KiB (new), 0 bytes (No change)

Configuration tvdpi

APK file size: 73 KiB (old), 73 KiB (new), 0 bytes (No change)
APK download size (estimated): 27 KiB (old), 27 KiB (new), 0 bytes (No change)

Configuration xhdpi

APK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change)
APK download size (estimated): 20 KiB (old), 20 KiB (new), 0 bytes (No change)

Configuration xxhdpi

APK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change)
APK download size (estimated): 28 KiB (old), 28 KiB (new), 0 bytes (No change)

Configuration xxxhdpi

APK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change)
APK download size (estimated): 27 KiB (old), 27 KiB (new), 0 bytes (No change)

Beta

Expand to see flavor specifics

Universal APK

APK file size: 11 MiB (old), 11 MiB (new), 38 KiB (Removed)

APK download size (estimated): 10 MiB (old), 10 MiB (new), 40 KiB (Removed)

Method count: 116287 (old), 115776 (new), 511 (Removed)

Features: 2 (old), 2 (new), 0 (No change)

Permissions: 6 (old), 6 (new), 0 (No change)

Resources: 5786 (old), 5786 (new), 0 (No change)

  • Anim: 33 (old), 33 (new), 0 (No change)
  • Animator: 24 (old), 24 (new), 0 (No change)
  • Array: 14 (old), 14 (new), 0 (No change)
  • Attr: 888 (old), 888 (new), 0 (No change)
  • Bool: 8 (old), 8 (new), 0 (No change)
  • Color: 820 (old), 820 (new), 0 (No change)
  • Dimen: 780 (old), 780 (new), 0 (No change)
  • Drawable: 342 (old), 342 (new), 0 (No change)
  • Id: 1221 (old), 1221 (new), 0 (No change)
  • Integer: 32 (old), 32 (new), 0 (No change)
  • Interpolator: 11 (old), 11 (new), 0 (No change)
  • Layout: 343 (old), 343 (new), 0 (No change)
  • Menu: 1 (old), 1 (new), 0 (No change)
  • Mipmap: 1 (old), 1 (new), 0 (No change)
  • Plurals: 10 (old), 10 (new), 0 (No change)
  • String: 785 (old), 785 (new), 0 (No change)
  • Style: 472 (old), 472 (new), 0 (No change)
  • Xml: 1 (old), 1 (new), 0 (No change)

Lesson assets: 111 (old), 111 (new), 0 (No change)

AAB differences

Expand to see AAB specifics

Supported configurations:

  • hdpi (same)
  • ldpi (same)
  • mdpi (same)
  • tvdpi (same)
  • xhdpi (same)
  • xxhdpi (same)
  • xxxhdpi (same)

Base APK

APK file size: 11 MiB (old), 10 MiB (new), 38 KiB (Removed)
APK download size (estimated): 10 MiB (old), 9 MiB (new), 37 KiB (Removed)
Method count: 116287 (old), 115776 (new), 511 (Removed)

Configuration hdpi

APK file size: 43 KiB (old), 43 KiB (new), 0 bytes (No change)
APK download size (estimated): 17 KiB (old), 17 KiB (new), 0 bytes (No change)

Configuration ldpi

APK file size: 44 KiB (old), 44 KiB (new), 0 bytes (No change)
APK download size (estimated): 13 KiB (old), 13 KiB (new), 0 bytes (No change)

Configuration mdpi

APK file size: 38 KiB (old), 38 KiB (new), 0 bytes (No change)
APK download size (estimated): 13 KiB (old), 13 KiB (new), 0 bytes (No change)

Configuration tvdpi

APK file size: 73 KiB (old), 73 KiB (new), 0 bytes (No change)
APK download size (estimated): 27 KiB (old), 27 KiB (new), 0 bytes (No change)

Configuration xhdpi

APK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change)
APK download size (estimated): 20 KiB (old), 20 KiB (new), 0 bytes (No change)

Configuration xxhdpi

APK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change)
APK download size (estimated): 28 KiB (old), 28 KiB (new), 0 bytes (No change)

Configuration xxxhdpi

APK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change)
APK download size (estimated): 27 KiB (old), 27 KiB (new), 0 bytes (No change)

Ga

Expand to see flavor specifics

Universal APK

APK file size: 11 MiB (old), 11 MiB (new), 38 KiB (Removed)

APK download size (estimated): 10 MiB (old), 10 MiB (new), 39 KiB (Removed)

Method count: 116287 (old), 115776 (new), 511 (Removed)

Features: 2 (old), 2 (new), 0 (No change)

Permissions: 6 (old), 6 (new), 0 (No change)

Resources: 5786 (old), 5786 (new), 0 (No change)

  • Anim: 33 (old), 33 (new), 0 (No change)
  • Animator: 24 (old), 24 (new), 0 (No change)
  • Array: 14 (old), 14 (new), 0 (No change)
  • Attr: 888 (old), 888 (new), 0 (No change)
  • Bool: 8 (old), 8 (new), 0 (No change)
  • Color: 820 (old), 820 (new), 0 (No change)
  • Dimen: 780 (old), 780 (new), 0 (No change)
  • Drawable: 342 (old), 342 (new), 0 (No change)
  • Id: 1221 (old), 1221 (new), 0 (No change)
  • Integer: 32 (old), 32 (new), 0 (No change)
  • Interpolator: 11 (old), 11 (new), 0 (No change)
  • Layout: 343 (old), 343 (new), 0 (No change)
  • Menu: 1 (old), 1 (new), 0 (No change)
  • Mipmap: 1 (old), 1 (new), 0 (No change)
  • Plurals: 10 (old), 10 (new), 0 (No change)
  • String: 785 (old), 785 (new), 0 (No change)
  • Style: 472 (old), 472 (new), 0 (No change)
  • Xml: 1 (old), 1 (new), 0 (No change)

Lesson assets: 111 (old), 111 (new), 0 (No change)

AAB differences

Expand to see AAB specifics

Supported configurations:

  • hdpi (same)
  • ldpi (same)
  • mdpi (same)
  • tvdpi (same)
  • xhdpi (same)
  • xxhdpi (same)
  • xxxhdpi (same)

Base APK

APK file size: 11 MiB (old), 10 MiB (new), 38 KiB (Removed)
APK download size (estimated): 10 MiB (old), 9 MiB (new), 37 KiB (Removed)
Method count: 116287 (old), 115776 (new), 511 (Removed)

Configuration hdpi

APK file size: 43 KiB (old), 43 KiB (new), 0 bytes (No change)
APK download size (estimated): 17 KiB (old), 17 KiB (new), 0 bytes (No change)

Configuration ldpi

APK file size: 44 KiB (old), 44 KiB (new), 0 bytes (No change)
APK download size (estimated): 13 KiB (old), 13 KiB (new), 0 bytes (No change)

Configuration mdpi

APK file size: 38 KiB (old), 38 KiB (new), 0 bytes (No change)
APK download size (estimated): 13 KiB (old), 13 KiB (new), 0 bytes (No change)

Configuration tvdpi

APK file size: 73 KiB (old), 73 KiB (new), 0 bytes (No change)
APK download size (estimated): 27 KiB (old), 27 KiB (new), 0 bytes (No change)

Configuration xhdpi

APK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change)
APK download size (estimated): 20 KiB (old), 20 KiB (new), 0 bytes (No change)

Configuration xxhdpi

APK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change)
APK download size (estimated): 28 KiB (old), 28 KiB (new), 0 bytes (No change)

Configuration xxxhdpi

APK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change)
APK download size (estimated): 27 KiB (old), 27 KiB (new), 0 bytes (No change)

Copy link

oppiabot bot commented Jan 14, 2025

Hi @theMr17, 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.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

@oppiabot oppiabot bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Jan 14, 2025
Copy link
Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @theMr17! Can you please attach screenshots to the main comment showing that this works with multiple classrooms enabled at least for test data locally? I think you may need to check out an earlier version of develop (before Gradle was removed) and merge this in to verify (since thumbnails don't currently load for Bazel builds--which is something we will need to fix eventually).

Otherwise, the changes seem quite sensible! Only had a few comments--PTAL.

@oppiabot oppiabot bot removed the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Jan 15, 2025
@BenHenning BenHenning assigned theMr17 and unassigned BenHenning Jan 15, 2025
Co-authored-by: Ben Henning <ben@oppia.org>
Copy link

Coverage Report

Results

Number of files assessed: 34
Overall Coverage: 93.93%
Coverage Analysis: PASS

Passing coverage

Files with passing code coverage
File Coverage Lines Hit Status Min Required
MathTagHandler.ktutility/src/main/java/org/oppia/android/util/parser/html/MathTagHandler.kt
96.88% 62 / 64 70%
LiTagHandler.ktutility/src/main/java/org/oppia/android/util/parser/html/LiTagHandler.kt
92.55% 87 / 94 70%
ImageTagHandler.ktutility/src/main/java/org/oppia/android/util/parser/html/ImageTagHandler.kt
100.00% 62 / 62 70%
PolicyPageTagHandler.ktutility/src/main/java/org/oppia/android/util/parser/html/PolicyPageTagHandler.kt
93.94% 31 / 33 70%
CustomHtmlContentHandler.ktutility/src/main/java/org/oppia/android/util/parser/html/CustomHtmlContentHandler.kt
83.76% 98 / 117 70%
ConceptCardTagHandler.ktutility/src/main/java/org/oppia/android/util/parser/html/ConceptCardTagHandler.kt
100.00% 20 / 20 70%
RegexPatternValidationCheck.ktscripts/src/java/org/oppia/android/scripts/regex/RegexPatternValidationCheck.kt
100.00% 104 / 104 70%

Exempted coverage

Files exempted from coverage
File Exemption Reason
ExplorationHtmlParserEntityType.ktutility/src/main/java/org/oppia/android/util/parser/html/ExplorationHtmlParserEntityType.kt
This file is exempted from having a test file; skipping coverage check.
HtmlParserEntityTypeModule.ktutility/src/main/java/org/oppia/android/util/parser/html/HtmlParserEntityTypeModule.kt
This file is exempted from having a test file; skipping coverage check.
IntentFactoryShim.ktapp/src/main/java/org/oppia/android/app/shim/IntentFactoryShim.kt
This file is exempted from having a test file; skipping coverage check.
StoryFragmentScroller.ktapp/src/main/java/org/oppia/android/app/story/StoryFragmentScroller.kt
This file is exempted from having a test file; skipping coverage check.
CompletedStoryListFragmentPresenter.ktapp/src/main/java/org/oppia/android/app/completedstorylist/CompletedStoryListFragmentPresenter.kt
This file is exempted from having a test file; skipping coverage check.
CompletedStoryListViewModel.ktapp/src/main/java/org/oppia/android/app/completedstorylist/CompletedStoryListViewModel.kt
This file is exempted from having a test file; skipping coverage check.
CompletedStoryListActivityPresenter.ktapp/src/main/java/org/oppia/android/app/completedstorylist/CompletedStoryListActivityPresenter.kt
This file is exempted from having a test file; skipping coverage check.
CompletedStoryListActivity.ktapp/src/main/java/org/oppia/android/app/completedstorylist/CompletedStoryListActivity.kt
This file is incompatible with code coverage tooling; skipping coverage check.
CompletedStoryListFragment.ktapp/src/main/java/org/oppia/android/app/completedstorylist/CompletedStoryListFragment.kt
This file is exempted from having a test file; skipping coverage check.
CompletedStoryItemViewModel.ktapp/src/main/java/org/oppia/android/app/completedstorylist/CompletedStoryItemViewModel.kt
This file is exempted from having a test file; skipping coverage check.
LessonThumbnailImageView.ktapp/src/main/java/org/oppia/android/app/customview/LessonThumbnailImageView.kt
This file is incompatible with code coverage tooling; skipping coverage check.
FontScaleConfigurationUtil.ktapp/src/main/java/org/oppia/android/app/utility/FontScaleConfigurationUtil.kt
This file is exempted from having a test file; skipping coverage check.
LanguageInterface.ktapp/src/main/java/org/oppia/android/app/player/audio/LanguageInterface.kt
This file is exempted from having a test file; skipping coverage check.
ClassroomSummaryViewModel.ktapp/src/main/java/org/oppia/android/app/home/classroomlist/ClassroomSummaryViewModel.kt
This file is exempted from having a test file; skipping coverage check.
ClassroomListViewModel.ktapp/src/main/java/org/oppia/android/app/classroom/ClassroomListViewModel.kt
This file is exempted from having a test file; skipping coverage check.
ThumbnailImage.ktapp/src/main/java/org/oppia/android/app/classroom/ThumbnailImage.kt
This file is exempted from having a test file; skipping coverage check.
TopicCard.ktapp/src/main/java/org/oppia/android/app/classroom/topiclist/TopicCard.kt
This file is exempted from having a test file; skipping coverage check.
ClassroomListFragmentPresenter.ktapp/src/main/java/org/oppia/android/app/classroom/ClassroomListFragmentPresenter.kt
This file is exempted from having a test file; skipping coverage check.
ClassroomList.ktapp/src/main/java/org/oppia/android/app/classroom/classroomlist/ClassroomList.kt
This file is exempted from having a test file; skipping coverage check.
ComingSoonTopicList.ktapp/src/main/java/org/oppia/android/app/classroom/promotedlist/ComingSoonTopicList.kt
This file is exempted from having a test file; skipping coverage check.
PromotedStoryList.ktapp/src/main/java/org/oppia/android/app/classroom/promotedlist/PromotedStoryList.kt
This file is exempted from having a test file; skipping coverage check.
RealSubject.kttesting/src/main/java/org/oppia/android/testing/math/RealSubject.kt
This file is exempted from having a test file; skipping coverage check.
FractionSubject.kttesting/src/main/java/org/oppia/android/testing/math/FractionSubject.kt
This file is exempted from having a test file; skipping coverage check.
MathEquationSubject.kttesting/src/main/java/org/oppia/android/testing/math/MathEquationSubject.kt
This file is exempted from having a test file; skipping coverage check.
MathExpressionSubject.kttesting/src/main/java/org/oppia/android/testing/math/MathExpressionSubject.kt
This file is exempted from having a test file; skipping coverage check.
ExceptionsController.ktdomain/src/main/java/org/oppia/android/domain/oppialogger/exceptions/ExceptionsController.kt
This file is incompatible with code coverage tooling; skipping coverage check.
HintHandler.ktdomain/src/main/java/org/oppia/android/domain/hintsandsolution/HintHandler.kt
This file is exempted from having a test file; skipping coverage check.

Refer test_file_exemptions.textproto for the comprehensive list of file exemptions and their required coverage percentages.

To learn more, visit the Oppia Android Code Coverage wiki page

@theMr17
Copy link
Collaborator Author

theMr17 commented Jan 18, 2025

Hey @BenHenning, thanks for the review! I've addressed your comments and added screenshots to the PR description, PTAL. I didn't need to check out older commits for the Gradle build; image loading works fine for me with Bazel builds as well.

Regarding the classroom thumbnails, they already have a background. The production assets should have the correct background color set for them to display properly.

@theMr17 theMr17 assigned BenHenning and unassigned theMr17 Jan 18, 2025
Copy link

APK & AAB differences analysis

Note that this is a summarized snapshot. See the CI artifacts for detailed differences.

Dev

Expand to see flavor specifics

Universal APK

APK file size: 19 MiB (old), 19 MiB (new), 2300 bytes (Added)

APK download size (estimated): 17 MiB (old), 17 MiB (new), 801 bytes (Added)

Method count: 260219 (old), 260231 (new), 12 (Added)

Features: 2 (old), 2 (new), 0 (No change)

Permissions: 6 (old), 6 (new), 0 (No change)

Resources: 6818 (old), 6818 (new), 0 (No change)

  • Anim: 43 (old), 43 (new), 0 (No change)
  • Animator: 26 (old), 26 (new), 0 (No change)
  • Array: 15 (old), 15 (new), 0 (No change)
  • Attr: 922 (old), 922 (new), 0 (No change)
  • Bool: 9 (old), 9 (new), 0 (No change)
  • Color: 967 (old), 967 (new), 0 (No change)
  • Dimen: 1048 (old), 1048 (new), 0 (No change)
  • Drawable: 380 (old), 380 (new), 0 (No change)
  • Id: 1275 (old), 1275 (new), 0 (No change)
  • Integer: 37 (old), 37 (new), 0 (No change)
  • Interpolator: 11 (old), 11 (new), 0 (No change)
  • Layout: 380 (old), 380 (new), 0 (No change)
  • Menu: 3 (old), 3 (new), 0 (No change)
  • Mipmap: 1 (old), 1 (new), 0 (No change)
  • Plurals: 10 (old), 10 (new), 0 (No change)
  • Raw: 2 (old), 2 (new), 0 (No change)
  • String: 852 (old), 852 (new), 0 (No change)
  • Style: 831 (old), 831 (new), 0 (No change)
  • Xml: 6 (old), 6 (new), 0 (No change)

Lesson assets: 111 (old), 111 (new), 0 (No change)

AAB differences

Expand to see AAB specifics

Supported configurations:

  • hdpi (same)
  • ldpi (same)
  • mdpi (same)
  • tvdpi (same)
  • xhdpi (same)
  • xxhdpi (same)
  • xxxhdpi (same)

Base APK

APK file size: 18 MiB (old), 18 MiB (new), 2300 bytes (Added)
APK download size (estimated): 17 MiB (old), 17 MiB (new), 303 bytes (Added)
Method count: 260219 (old), 260231 (new), 12 (Added)

Configuration hdpi

APK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change)
APK download size (estimated): 18 KiB (old), 18 KiB (new), 0 bytes (No change)

Configuration ldpi

APK file size: 49 KiB (old), 49 KiB (new), 0 bytes (No change)
APK download size (estimated): 14 KiB (old), 14 KiB (new), 0 bytes (No change)

Configuration mdpi

APK file size: 45 KiB (old), 45 KiB (new), 0 bytes (No change)
APK download size (estimated): 14 KiB (old), 14 KiB (new), 0 bytes (No change)

Configuration tvdpi

APK file size: 86 KiB (old), 86 KiB (new), 0 bytes (No change)
APK download size (estimated): 29 KiB (old), 29 KiB (new), 0 bytes (No change)

Configuration xhdpi

APK file size: 57 KiB (old), 57 KiB (new), 0 bytes (No change)
APK download size (estimated): 21 KiB (old), 21 KiB (new), 0 bytes (No change)

Configuration xxhdpi

APK file size: 63 KiB (old), 63 KiB (new), 0 bytes (No change)
APK download size (estimated): 29 KiB (old), 29 KiB (new), 0 bytes (No change)

Configuration xxxhdpi

APK file size: 63 KiB (old), 63 KiB (new), 0 bytes (No change)
APK download size (estimated): 28 KiB (old), 28 KiB (new), 0 bytes (No change)

Alpha

Expand to see flavor specifics

Universal APK

APK file size: 11 MiB (old), 11 MiB (new), 39 KiB (Removed)

APK download size (estimated): 10 MiB (old), 10 MiB (new), 43 KiB (Removed)

Method count: 116287 (old), 115770 (new), 517 (Removed)

Features: 2 (old), 2 (new), 0 (No change)

Permissions: 6 (old), 6 (new), 0 (No change)

Resources: 5786 (old), 5786 (new), 0 (No change)

  • Anim: 33 (old), 33 (new), 0 (No change)
  • Animator: 24 (old), 24 (new), 0 (No change)
  • Array: 14 (old), 14 (new), 0 (No change)
  • Attr: 888 (old), 888 (new), 0 (No change)
  • Bool: 8 (old), 8 (new), 0 (No change)
  • Color: 820 (old), 820 (new), 0 (No change)
  • Dimen: 780 (old), 780 (new), 0 (No change)
  • Drawable: 342 (old), 342 (new), 0 (No change)
  • Id: 1221 (old), 1221 (new), 0 (No change)
  • Integer: 32 (old), 32 (new), 0 (No change)
  • Interpolator: 11 (old), 11 (new), 0 (No change)
  • Layout: 343 (old), 343 (new), 0 (No change)
  • Menu: 1 (old), 1 (new), 0 (No change)
  • Mipmap: 1 (old), 1 (new), 0 (No change)
  • Plurals: 10 (old), 10 (new), 0 (No change)
  • String: 785 (old), 785 (new), 0 (No change)
  • Style: 472 (old), 472 (new), 0 (No change)
  • Xml: 1 (old), 1 (new), 0 (No change)

Lesson assets: 111 (old), 111 (new), 0 (No change)

AAB differences

Expand to see AAB specifics

Supported configurations:

  • hdpi (same)
  • ldpi (same)
  • mdpi (same)
  • tvdpi (same)
  • xhdpi (same)
  • xxhdpi (same)
  • xxxhdpi (same)

Base APK

APK file size: 11 MiB (old), 11 MiB (new), 39 KiB (Removed)
APK download size (estimated): 10 MiB (old), 10 MiB (new), 40 KiB (Removed)
Method count: 116287 (old), 115770 (new), 517 (Removed)

Configuration hdpi

APK file size: 43 KiB (old), 43 KiB (new), 0 bytes (No change)
APK download size (estimated): 17 KiB (old), 17 KiB (new), 0 bytes (No change)

Configuration ldpi

APK file size: 44 KiB (old), 44 KiB (new), 0 bytes (No change)
APK download size (estimated): 13 KiB (old), 13 KiB (new), 0 bytes (No change)

Configuration mdpi

APK file size: 38 KiB (old), 38 KiB (new), 0 bytes (No change)
APK download size (estimated): 13 KiB (old), 13 KiB (new), 0 bytes (No change)

Configuration tvdpi

APK file size: 73 KiB (old), 73 KiB (new), 0 bytes (No change)
APK download size (estimated): 27 KiB (old), 27 KiB (new), 0 bytes (No change)

Configuration xhdpi

APK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change)
APK download size (estimated): 20 KiB (old), 20 KiB (new), 0 bytes (No change)

Configuration xxhdpi

APK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change)
APK download size (estimated): 28 KiB (old), 28 KiB (new), 0 bytes (No change)

Configuration xxxhdpi

APK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change)
APK download size (estimated): 27 KiB (old), 27 KiB (new), 0 bytes (No change)

Beta

Expand to see flavor specifics

Universal APK

APK file size: 11 MiB (old), 11 MiB (new), 39 KiB (Removed)

APK download size (estimated): 10 MiB (old), 10 MiB (new), 40 KiB (Removed)

Method count: 116293 (old), 115776 (new), 517 (Removed)

Features: 2 (old), 2 (new), 0 (No change)

Permissions: 6 (old), 6 (new), 0 (No change)

Resources: 5786 (old), 5786 (new), 0 (No change)

  • Anim: 33 (old), 33 (new), 0 (No change)
  • Animator: 24 (old), 24 (new), 0 (No change)
  • Array: 14 (old), 14 (new), 0 (No change)
  • Attr: 888 (old), 888 (new), 0 (No change)
  • Bool: 8 (old), 8 (new), 0 (No change)
  • Color: 820 (old), 820 (new), 0 (No change)
  • Dimen: 780 (old), 780 (new), 0 (No change)
  • Drawable: 342 (old), 342 (new), 0 (No change)
  • Id: 1221 (old), 1221 (new), 0 (No change)
  • Integer: 32 (old), 32 (new), 0 (No change)
  • Interpolator: 11 (old), 11 (new), 0 (No change)
  • Layout: 343 (old), 343 (new), 0 (No change)
  • Menu: 1 (old), 1 (new), 0 (No change)
  • Mipmap: 1 (old), 1 (new), 0 (No change)
  • Plurals: 10 (old), 10 (new), 0 (No change)
  • String: 785 (old), 785 (new), 0 (No change)
  • Style: 472 (old), 472 (new), 0 (No change)
  • Xml: 1 (old), 1 (new), 0 (No change)

Lesson assets: 111 (old), 111 (new), 0 (No change)

AAB differences

Expand to see AAB specifics

Supported configurations:

  • hdpi (same)
  • ldpi (same)
  • mdpi (same)
  • tvdpi (same)
  • xhdpi (same)
  • xxhdpi (same)
  • xxxhdpi (same)

Base APK

APK file size: 11 MiB (old), 10 MiB (new), 39 KiB (Removed)
APK download size (estimated): 10 MiB (old), 9 MiB (new), 37 KiB (Removed)
Method count: 116293 (old), 115776 (new), 517 (Removed)

Configuration hdpi

APK file size: 43 KiB (old), 43 KiB (new), 0 bytes (No change)
APK download size (estimated): 17 KiB (old), 17 KiB (new), 0 bytes (No change)

Configuration ldpi

APK file size: 44 KiB (old), 44 KiB (new), 0 bytes (No change)
APK download size (estimated): 13 KiB (old), 13 KiB (new), 0 bytes (No change)

Configuration mdpi

APK file size: 38 KiB (old), 38 KiB (new), 0 bytes (No change)
APK download size (estimated): 13 KiB (old), 13 KiB (new), 0 bytes (No change)

Configuration tvdpi

APK file size: 73 KiB (old), 73 KiB (new), 0 bytes (No change)
APK download size (estimated): 27 KiB (old), 27 KiB (new), 0 bytes (No change)

Configuration xhdpi

APK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change)
APK download size (estimated): 20 KiB (old), 20 KiB (new), 0 bytes (No change)

Configuration xxhdpi

APK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change)
APK download size (estimated): 28 KiB (old), 28 KiB (new), 0 bytes (No change)

Configuration xxxhdpi

APK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change)
APK download size (estimated): 27 KiB (old), 27 KiB (new), 0 bytes (No change)

Ga

Expand to see flavor specifics

Universal APK

APK file size: 11 MiB (old), 11 MiB (new), 39 KiB (Removed)

APK download size (estimated): 10 MiB (old), 10 MiB (new), 41 KiB (Removed)

Method count: 116293 (old), 115776 (new), 517 (Removed)

Features: 2 (old), 2 (new), 0 (No change)

Permissions: 6 (old), 6 (new), 0 (No change)

Resources: 5786 (old), 5786 (new), 0 (No change)

  • Anim: 33 (old), 33 (new), 0 (No change)
  • Animator: 24 (old), 24 (new), 0 (No change)
  • Array: 14 (old), 14 (new), 0 (No change)
  • Attr: 888 (old), 888 (new), 0 (No change)
  • Bool: 8 (old), 8 (new), 0 (No change)
  • Color: 820 (old), 820 (new), 0 (No change)
  • Dimen: 780 (old), 780 (new), 0 (No change)
  • Drawable: 342 (old), 342 (new), 0 (No change)
  • Id: 1221 (old), 1221 (new), 0 (No change)
  • Integer: 32 (old), 32 (new), 0 (No change)
  • Interpolator: 11 (old), 11 (new), 0 (No change)
  • Layout: 343 (old), 343 (new), 0 (No change)
  • Menu: 1 (old), 1 (new), 0 (No change)
  • Mipmap: 1 (old), 1 (new), 0 (No change)
  • Plurals: 10 (old), 10 (new), 0 (No change)
  • String: 785 (old), 785 (new), 0 (No change)
  • Style: 472 (old), 472 (new), 0 (No change)
  • Xml: 1 (old), 1 (new), 0 (No change)

Lesson assets: 111 (old), 111 (new), 0 (No change)

AAB differences

Expand to see AAB specifics

Supported configurations:

  • hdpi (same)
  • ldpi (same)
  • mdpi (same)
  • tvdpi (same)
  • xhdpi (same)
  • xxhdpi (same)
  • xxxhdpi (same)

Base APK

APK file size: 11 MiB (old), 10 MiB (new), 39 KiB (Removed)
APK download size (estimated): 10 MiB (old), 9 MiB (new), 37 KiB (Removed)
Method count: 116293 (old), 115776 (new), 517 (Removed)

Configuration hdpi

APK file size: 43 KiB (old), 43 KiB (new), 0 bytes (No change)
APK download size (estimated): 17 KiB (old), 17 KiB (new), 0 bytes (No change)

Configuration ldpi

APK file size: 44 KiB (old), 44 KiB (new), 0 bytes (No change)
APK download size (estimated): 13 KiB (old), 13 KiB (new), 0 bytes (No change)

Configuration mdpi

APK file size: 38 KiB (old), 38 KiB (new), 0 bytes (No change)
APK download size (estimated): 13 KiB (old), 13 KiB (new), 0 bytes (No change)

Configuration tvdpi

APK file size: 73 KiB (old), 73 KiB (new), 0 bytes (No change)
APK download size (estimated): 27 KiB (old), 27 KiB (new), 0 bytes (No change)

Configuration xhdpi

APK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change)
APK download size (estimated): 20 KiB (old), 20 KiB (new), 0 bytes (No change)

Configuration xxhdpi

APK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change)
APK download size (estimated): 28 KiB (old), 28 KiB (new), 0 bytes (No change)

Configuration xxxhdpi

APK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change)
APK download size (estimated): 27 KiB (old), 27 KiB (new), 0 bytes (No change)

Copy link
Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @theMr17! I'm actually surprised to hear that the Bazel build actually has working thumbnails. Perhaps it's because the JSON assets are still being loaded.

This otherwise LGTM--really happy to see this get in quickly as it will allow us to test multiple classrooms in alpha. :)

@BenHenning
Copy link
Member

Merging with the latest develop & enabling auto-merge.

@BenHenning BenHenning enabled auto-merge (squash) January 21, 2025 22:48
Copy link

oppiabot bot commented Jan 21, 2025

Unassigning @BenHenning since they have already approved the PR.

Copy link

oppiabot bot commented Jan 21, 2025

Assigning @adhiamboperes for code owner reviews. Thanks!

@BenHenning BenHenning merged commit 968a18d into develop Jan 21, 2025
38 checks passed
@BenHenning BenHenning deleted the fix-thumbnails-multiple-classrooms branch January 21, 2025 23:54
Copy link

Coverage Report

Results

Number of files assessed: 11
Overall Coverage: 0.00%
Coverage Analysis: PASS

Exempted coverage

Files exempted from coverage
File Exemption Reason
ExplorationHtmlParserEntityType.ktutility/src/main/java/org/oppia/android/util/parser/html/ExplorationHtmlParserEntityType.kt
This file is exempted from having a test file; skipping coverage check.
HtmlParserEntityTypeModule.ktutility/src/main/java/org/oppia/android/util/parser/html/HtmlParserEntityTypeModule.kt
This file is exempted from having a test file; skipping coverage check.
LessonThumbnailImageView.ktapp/src/main/java/org/oppia/android/app/customview/LessonThumbnailImageView.kt
This file is incompatible with code coverage tooling; skipping coverage check.
ClassroomSummaryViewModel.ktapp/src/main/java/org/oppia/android/app/home/classroomlist/ClassroomSummaryViewModel.kt
This file is exempted from having a test file; skipping coverage check.
ClassroomListViewModel.ktapp/src/main/java/org/oppia/android/app/classroom/ClassroomListViewModel.kt
This file is exempted from having a test file; skipping coverage check.
ThumbnailImage.ktapp/src/main/java/org/oppia/android/app/classroom/ThumbnailImage.kt
This file is exempted from having a test file; skipping coverage check.
TopicCard.ktapp/src/main/java/org/oppia/android/app/classroom/topiclist/TopicCard.kt
This file is exempted from having a test file; skipping coverage check.
ClassroomListFragmentPresenter.ktapp/src/main/java/org/oppia/android/app/classroom/ClassroomListFragmentPresenter.kt
This file is exempted from having a test file; skipping coverage check.
ClassroomList.ktapp/src/main/java/org/oppia/android/app/classroom/classroomlist/ClassroomList.kt
This file is exempted from having a test file; skipping coverage check.
ComingSoonTopicList.ktapp/src/main/java/org/oppia/android/app/classroom/promotedlist/ComingSoonTopicList.kt
This file is exempted from having a test file; skipping coverage check.
PromotedStoryList.ktapp/src/main/java/org/oppia/android/app/classroom/promotedlist/PromotedStoryList.kt
This file is exempted from having a test file; skipping coverage check.

Refer test_file_exemptions.textproto for the comprehensive list of file exemptions and their required coverage percentages.

To learn more, visit the Oppia Android Code Coverage wiki page

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.

[BUG]: Multiple classrooms do not load thumbnails from protos correctly
3 participants