-
Notifications
You must be signed in to change notification settings - Fork 577
Fix #482: Remove default admin for onboarding V2 (3/12) #5968
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: create-admin-intro
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. |
Coverage ReportResultsNumber of files assessed: 8 Passing coverageFiles with passing code coverage
Exempted coverageFiles exempted from coverage
|
|
@BenHenning, PTAL. This is probably the smallest PR in the entire project 😁. |
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! Just a few comments--PTAL.
app/src/main/java/org/oppia/android/app/profile/ProfileLoginFragmentPresenter.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/android/app/profile/ProfileLoginFragmentPresenter.kt
Show resolved
Hide resolved
|
Reminder check the checkboxes on the PR description as well. Other than that, super cool to see an issue from 2019 get resolved! :D |
|
@BenHenning, PTAL. |
Coverage ReportResultsNumber of files assessed: 9 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. |
|
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. |
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! This LGTM.
|
Unassigning @BenHenning since they have already approved the PR. |
|
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 #482
In the legacy onboarding flow, the admin profile is hardcoded into the profile chooser screen. In V2 of the onboarding flow, an admin user creates their profile during onboarding. This makes the hardcoded profile redundant, and this PR removes it.
Main Changes
Gating
addProfile()profileManagementController.addProfile()is now gated behind theenableOnboardingFlowV2flag.Cleanup of
profileNicknameprofileNicknameargument (introduced in a previous PR to ensure the created profile had the correct display name) is no longer needed.Fix for App Data Reset Edge Case
resetOnboardingStatehas been added inAppStartupStateController.ktto reset the onboarding state.Considered Approaches
There were multiple possible solutions for handling the reset logic:
(a) UI-Layer Reset
alreadyOnboardedApptofalseand call the function in the UI layer.ProfileLoginFragmentTest.kt.(b) Domain-Layer Reset
alreadyOnboardedApptofalseinsideprofileManagementController.deleteAllProfiles().deleteAllProfiles().(c) Refactor to Remove
alreadyOnboardedAppenableAppAndOsDeprecationfeature flag.onboardingFlowStore, adding complexity.Option (a) was chosen because it:
Essential Checklist
For UI-specific PRs only