-
Notifications
You must be signed in to change notification settings - Fork 524
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 Part of #4938: Profile Configuration and Migration #5387
base: develop
Are you sure you want to change the base?
Conversation
Hi @adhiamboperes, 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. |
…boarding-learner-intro-screen # Conflicts: # app/src/main/java/org/oppia/android/app/activity/ActivityComponentImpl.kt # app/src/main/java/org/oppia/android/app/fragment/FragmentComponentImpl.kt # app/src/main/java/org/oppia/android/app/onboarding/CreateProfileFragmentPresenter.kt # app/src/main/java/org/oppia/android/app/onboarding/OnboardingFragment.kt # app/src/main/java/org/oppia/android/app/onboarding/OnboardingFragmentPresenter.kt # app/src/main/res/values/styles.xml # app/src/sharedTest/java/org/oppia/android/app/onboarding/CreateProfileFragmentTest.kt # scripts/assets/test_file_exemptions.textproto
…n' into onboarding-audio-language-screen # Conflicts: # app/src/main/java/org/oppia/android/app/onboarding/CreateProfileActivity.kt # app/src/main/java/org/oppia/android/app/onboarding/CreateProfileActivityPresenter.kt # app/src/main/java/org/oppia/android/app/onboarding/CreateProfileFragment.kt # app/src/main/java/org/oppia/android/app/onboarding/CreateProfileFragmentPresenter.kt # app/src/main/java/org/oppia/android/app/onboarding/IntroActivity.kt # app/src/main/java/org/oppia/android/app/onboarding/IntroActivityPresenter.kt # app/src/main/java/org/oppia/android/app/onboarding/IntroFragment.kt # app/src/main/java/org/oppia/android/app/onboarding/OnboardingProfileTypeActivity.kt # app/src/main/java/org/oppia/android/app/onboarding/OnboardingProfileTypeActivityPresenter.kt # app/src/main/java/org/oppia/android/app/onboarding/OnboardingProfileTypeFragment.kt # app/src/main/java/org/oppia/android/app/onboarding/OnboardingProfileTypeFragmentPresenter.kt # app/src/sharedTest/java/org/oppia/android/app/options/AudioLanguageFragmentTest.kt # scripts/assets/test_file_exemptions.textproto
…creen # Conflicts: # app/src/main/java/org/oppia/android/app/onboarding/OnboardingFragmentPresenter.kt
Coverage ReportResultsNumber of files assessed: 37 Failing coverage
Passing coverageFiles with passing code coverage
Exempted coverageFiles exempted from coverage
|
@BenHenning, PTAL. |
Coverage ReportResultsNumber of files assessed: 35 Passing coverageFiles with passing code coverage
Exempted coverageFiles exempted from coverage
|
APK & AAB differences analysisNote that this is a summarized snapshot. See the CI artifacts for detailed differences. DevExpand to see flavor specificsUniversal APKAPK file size: 19 MiB (old), 19 MiB (new), 16 KiB (Added) APK download size (estimated): 17 MiB (old), 17 MiB (new), 16 KiB (Added) Method count: 259594 (old), 260154 (new), 560 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 6816 (old), 6816 (new), 0 (No change)
Lesson assets: 111 (old), 111 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 18 MiB (old), 18 MiB (new), 16 KiB (Added) Configuration hdpiAPK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change) Configuration ldpiAPK file size: 49 KiB (old), 49 KiB (new), 0 bytes (No change) Configuration mdpiAPK file size: 45 KiB (old), 45 KiB (new), 0 bytes (No change) Configuration tvdpiAPK file size: 86 KiB (old), 86 KiB (new), 0 bytes (No change) Configuration xhdpiAPK file size: 57 KiB (old), 57 KiB (new), 0 bytes (No change) Configuration xxhdpiAPK file size: 63 KiB (old), 63 KiB (new), 0 bytes (No change) Configuration xxxhdpiAPK file size: 63 KiB (old), 63 KiB (new), 0 bytes (No change) AlphaExpand to see flavor specificsUniversal APKAPK file size: 11 MiB (old), 11 MiB (new), 7524 bytes (Added) APK download size (estimated): 10 MiB (old), 10 MiB (new), 8495 bytes (Added) Method count: 116054 (old), 116245 (new), 191 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5784 (old), 5784 (new), 0 (No change)
Lesson assets: 111 (old), 111 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 11 MiB (old), 11 MiB (new), 7528 bytes (Added) Configuration hdpiAPK file size: 43 KiB (old), 43 KiB (new), 0 bytes (No change) Configuration ldpiAPK file size: 44 KiB (old), 44 KiB (new), 0 bytes (No change) Configuration mdpiAPK file size: 38 KiB (old), 38 KiB (new), 0 bytes (No change) Configuration tvdpiAPK file size: 73 KiB (old), 73 KiB (new), 0 bytes (No change) Configuration xhdpiAPK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change) Configuration xxhdpiAPK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change) Configuration xxxhdpiAPK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change) BetaExpand to see flavor specificsUniversal APKAPK file size: 11 MiB (old), 11 MiB (new), 7688 bytes (Added) APK download size (estimated): 10 MiB (old), 10 MiB (new), 6556 bytes (Added) Method count: 116060 (old), 116251 (new), 191 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5784 (old), 5784 (new), 0 (No change)
Lesson assets: 111 (old), 111 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 11 MiB (old), 11 MiB (new), 7688 bytes (Added) Configuration hdpiAPK file size: 43 KiB (old), 43 KiB (new), 0 bytes (No change) Configuration ldpiAPK file size: 44 KiB (old), 44 KiB (new), 0 bytes (No change) Configuration mdpiAPK file size: 38 KiB (old), 38 KiB (new), 0 bytes (No change) Configuration tvdpiAPK file size: 73 KiB (old), 73 KiB (new), 0 bytes (No change) Configuration xhdpiAPK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change) Configuration xxhdpiAPK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change) Configuration xxxhdpiAPK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change) GaExpand to see flavor specificsUniversal APKAPK file size: 11 MiB (old), 11 MiB (new), 7672 bytes (Added) APK download size (estimated): 10 MiB (old), 10 MiB (new), 7213 bytes (Added) Method count: 116060 (old), 116251 (new), 191 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5784 (old), 5784 (new), 0 (No change)
Lesson assets: 111 (old), 111 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 11 MiB (old), 11 MiB (new), 7672 bytes (Added) Configuration hdpiAPK file size: 43 KiB (old), 43 KiB (new), 0 bytes (No change) Configuration ldpiAPK file size: 44 KiB (old), 44 KiB (new), 0 bytes (No change) Configuration mdpiAPK file size: 38 KiB (old), 38 KiB (new), 0 bytes (No change) Configuration tvdpiAPK file size: 73 KiB (old), 73 KiB (new), 0 bytes (No change) Configuration xhdpiAPK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change) Configuration xxhdpiAPK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change) Configuration xxxhdpiAPK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change) |
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 @adhiamboperes! Just had a few small comments left, otherwise the PR LGTM.
app/src/main/java/org/oppia/android/app/splash/SplashActivityPresenter.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/android/app/splash/SplashActivityTest.kt
Outdated
Show resolved
Hide resolved
domain/src/main/java/org/oppia/android/domain/profile/ProfileManagementController.kt
Show resolved
Hide resolved
app/src/main/java/org/oppia/android/app/classroom/ClassroomListFragmentPresenter.kt
Outdated
Show resolved
Hide resolved
Coverage ReportResultsNumber of files assessed: 35 Passing coverageFiles with passing code coverage
Exempted coverageFiles exempted from coverage
|
APK & AAB differences analysisNote that this is a summarized snapshot. See the CI artifacts for detailed differences. DevExpand to see flavor specificsUniversal APKAPK file size: 19 MiB (old), 19 MiB (new), 16 KiB (Added) APK download size (estimated): 17 MiB (old), 17 MiB (new), 17 KiB (Added) Method count: 259595 (old), 260157 (new), 562 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 6816 (old), 6816 (new), 0 (No change)
Lesson assets: 111 (old), 111 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 18 MiB (old), 18 MiB (new), 16 KiB (Added) Configuration hdpiAPK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change) Configuration ldpiAPK file size: 49 KiB (old), 49 KiB (new), 0 bytes (No change) Configuration mdpiAPK file size: 45 KiB (old), 45 KiB (new), 0 bytes (No change) Configuration tvdpiAPK file size: 86 KiB (old), 86 KiB (new), 0 bytes (No change) Configuration xhdpiAPK file size: 57 KiB (old), 57 KiB (new), 0 bytes (No change) Configuration xxhdpiAPK file size: 63 KiB (old), 63 KiB (new), 0 bytes (No change) Configuration xxxhdpiAPK file size: 63 KiB (old), 63 KiB (new), 0 bytes (No change) AlphaExpand to see flavor specificsUniversal APKAPK file size: 11 MiB (old), 11 MiB (new), 8188 bytes (Added) APK download size (estimated): 10 MiB (old), 10 MiB (new), 8072 bytes (Added) Method count: 116054 (old), 116247 (new), 193 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5784 (old), 5784 (new), 0 (No change)
Lesson assets: 111 (old), 111 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 11 MiB (old), 11 MiB (new), 8188 bytes (Added) Configuration hdpiAPK file size: 43 KiB (old), 43 KiB (new), 0 bytes (No change) Configuration ldpiAPK file size: 44 KiB (old), 44 KiB (new), 0 bytes (No change) Configuration mdpiAPK file size: 38 KiB (old), 38 KiB (new), 0 bytes (No change) Configuration tvdpiAPK file size: 73 KiB (old), 73 KiB (new), 0 bytes (No change) Configuration xhdpiAPK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change) Configuration xxhdpiAPK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change) Configuration xxxhdpiAPK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change) BetaExpand to see flavor specificsUniversal APKAPK file size: 11 MiB (old), 11 MiB (new), 8404 bytes (Added) APK download size (estimated): 10 MiB (old), 10 MiB (new), 6236 bytes (Added) Method count: 116060 (old), 116253 (new), 193 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5784 (old), 5784 (new), 0 (No change)
Lesson assets: 111 (old), 111 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 11 MiB (old), 11 MiB (new), 8408 bytes (Added) Configuration hdpiAPK file size: 43 KiB (old), 43 KiB (new), 0 bytes (No change) Configuration ldpiAPK file size: 44 KiB (old), 44 KiB (new), 0 bytes (No change) Configuration mdpiAPK file size: 38 KiB (old), 38 KiB (new), 0 bytes (No change) Configuration tvdpiAPK file size: 73 KiB (old), 73 KiB (new), 0 bytes (No change) Configuration xhdpiAPK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change) Configuration xxhdpiAPK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change) Configuration xxxhdpiAPK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change) GaExpand to see flavor specificsUniversal APKAPK file size: 11 MiB (old), 11 MiB (new), 8532 bytes (Added) APK download size (estimated): 10 MiB (old), 10 MiB (new), 6030 bytes (Added) Method count: 116060 (old), 116253 (new), 193 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5784 (old), 5784 (new), 0 (No change)
Lesson assets: 111 (old), 111 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 11 MiB (old), 11 MiB (new), 8536 bytes (Added) Configuration hdpiAPK file size: 43 KiB (old), 43 KiB (new), 0 bytes (No change) Configuration ldpiAPK file size: 44 KiB (old), 44 KiB (new), 0 bytes (No change) Configuration mdpiAPK file size: 38 KiB (old), 38 KiB (new), 0 bytes (No change) Configuration tvdpiAPK file size: 73 KiB (old), 73 KiB (new), 0 bytes (No change) Configuration xhdpiAPK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change) Configuration xxhdpiAPK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change) Configuration xxxhdpiAPK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change) |
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 @adhiamboperes! There just seems to be one small comment left. Feel free to address and resolve it on your own before submitting. I can take another pass if you need me to, but I don't expect that to be necessary.
@@ -70,14 +70,13 @@ class ProfileTestHelper @Inject constructor( | |||
* | |||
* @returns the [AsyncResult] designating the result of attempting to log into the admin profile |
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.
It seems the KDoc needs to be updated with the recent changes.
app/src/sharedTest/java/org/oppia/android/app/splash/SplashActivityTest.kt
Outdated
Show resolved
Hide resolved
It looks like |
Hi @adhiamboperes, 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! |
Explanation
Fix Part of #4938: Configure profile new creation and migration of existing profiles.
When Onboarding V2 is Enabled:
Sole Learner Onboarding
Once the learner has created a profile, and have landed on the introduction screen, the profile is marked as
started_profile_oboarding
, and a corresponding event log is added.This configuration facilitates the user resuming onboarding, if they didn't complete it the first time round.
After selecting the audio language, the profile is logged in, and routed to the home screen.
On the home screen, the profile is updated to indicate
completed_profile_oboarding
and 3 events are expected for the first time login flow, in order:The App Onboarding Completed event is only logged for the first profile on the device, while the Profile Onboarding Completed event is logged for every profile on first login.
Supervisor Profile Onboarding
From the Profile Type screen, the supervisor flow launches the profile chooser screen, showing the Admin profile, which on click launches the homescreen.
The same 3 events as above are expected for the first time login flow.
Login Routing
Returning users should be routed to an appropriate landing page as follows:
A sole learner profile will be routed directly to their home screen
Returning admin profiles and non-solo learner profiles will always be routed to the profile selection screen
A sole learner who started, but did not finish onboarding would be routed to the Introduction Screen.
Returning sole and none-sole learners created when the feature flag was disabled, would be directed to the onboarding screen. Profile migration happens in place when profiles are fetched by the controller.
Profile Creation and Migration
For migration purposes, the
getProfile()
function has been updated to compute theprofileType
field when the feature flag is enabled. Existing Admin profiles will be migrated to have the SUPERVISOR type, existing Admin profiles with no pins set will be migrated to have the SOLE_LEARNER type while the remaining accounts will be of the ADDITIONAL_LEARNER type. New profiles created will also contain the respective enum type based on the intended categorization.Flag off then on:
device-2024-06-21-073957.webm
Flag on then off:
device-2024-06-21-074114.webm
Misc
ProfileTestHelper
Has been modified to create a sole, pinless admin profile.DeprecationController
are purely visual to make the code more readable.ClassroomListFragmentTest
required refactor to support toggling multiple feature flags.Profile Onboarding Events
Essential Checklist