-
Notifications
You must be signed in to change notification settings - Fork 576
Fix Part of #4938: Create Admin Onboarding Intro(2/12) #5839
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
base: develop
Are you sure you want to change the base?
Conversation
# Conflicts: # app/src/main/res/values/styles.xml
Coverage ReportResultsNumber of files assessed: 23 Passing coverageFiles with passing code coverage
Exempted coverageFiles exempted from coverage
|
|
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. |
# Conflicts: # app/src/main/AndroidManifest.xml # 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/profile/ProfileChooserActivityPresenter.kt # app/src/main/res/values/strings.xml # model/src/main/proto/screens.proto # utility/src/main/java/org/oppia/android/util/logging/EventBundleCreator.kt
|
Thanks for your initial review @subhajitxyz! I addressed your comments. However, there have been a lot of refactors since your review, and I appreciate that you might not have time to review a second time due to being on a break. @BenHenning, PTAL. |
|
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. |
|
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. |
|
Apologies--will try to look at this early next week. Feel free to send me more chained PRs as well if that helps. |
|
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. |
BenHenning
left a comment
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! Took a full pass and had just a few comments--PTAL.
| if (enableOnboardingFlowV2.value) { | ||
| when { | ||
| profileType == ProfileType.SUPERVISOR && profile.numberOfLogins == 1 -> { | ||
| // Supervisors end profile onboarding on the profiles list screen, but they do |
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.
| // Supervisors end profile onboarding on the profiles list screen, but they do | |
| // Supervisors end profile onboarding on the profiles list screen, but they do |
Small nit.
| import androidx.compose.ui.unit.dp | ||
| import kotlin.math.sin | ||
|
|
||
| /** Adds a bezier curve background to a view. */ |
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.
Slight nit maybe, but is this actually a bezier curve? It appears to be a sine wave, instead.
| ProfileType.SUPERVISOR -> launchProfileChooserScreen() | ||
| else -> {} | ||
| } | ||
| else -> launchOnboardingActivity() |
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.
Perhaps we should combine them together so that the else cases are impossible? I do worry a bit about the else cases since they would make the user stuck, I think.
| @@ -0,0 +1,7 @@ | |||
| <layout xmlns:android="http://schemas.android.com/apk/res/android"> | |||
| <androidx.compose.ui.platform.ComposeView | |||
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.
For this & app/src/main/res/layout/admin_intro_activity.xml these should be two-space indented.
| @Test | ||
| fun testIntroFragment_onLaunch_landscapeMode_allViewsAreCorrectlyDisplayed() { | ||
| launch(AdminIntroActivity::class.java).use { | ||
| onView(ViewMatchers.isRoot()).perform(orientationLandscape()) |
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.
This test should start in landscape using a qualifier rather than rotating (since rotating isn't 100% reliable in Robolectric).
Also, shouldn't this verify that the step count isn't visible since that's orientation-specific logic?
|
Unassigning @BenHenning since the review is done. |
|
Hi @adhiamboperes, it looks like some changes were requested on this pull request by @BenHenning. PTAL. Thanks! |
Explanation
Fixes part of #4938
This PR creates the introduction screen, where the user is informed about what it means to be an admin.
In #5378, the "I am a parent/Teacher" option previously routed to the profiles list screen, since admin onboarding had not yet been implemented. In this PR, the option leads to the admin creating their profile nickname, followed by viewing the newly introduced introduction screen. The steps are ordered this way for consistency with the learner onboarding flow.
In #5387, supervisor profile onboarding was marked as started on the profile type screen and ended on the home screen. This workaround has now been updated so that supervisor onboarding starts on the introduction screen (similar to the learner flow). This means that if the user abandons onboarding at this point, they will resume the flow from the introduction screen when they reopen the app. Admin onboarding is marked as completed on the profile chooser screen.
This PR also ensures that the onboarding event logs are refactored accordingly, and tests have been updated to verify the refactor.
Additionally,
testFragment_profileTypeArgumentMissing_showsUnknownProfileTypeError()has been removed fromCreateProfileFragmentTest.ktbecause this condition will never be hit, due to a new check that verifiesProfileTypeis not null when aCreateProfileActivityintent is created.Essential Checklist
For UI-specific PRs only
If your PR includes UI-related changes, then: