-
Notifications
You must be signed in to change notification settings - Fork 527
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Part of #4938: Language Selection Config and New Profile Creation…
… Flow (#5457) <!-- READ ME FIRST: Please fill in the explanation section below and check off every point from the Essential Checklist! --> ## Explanation Fixes Part of #4938: Modifies the profile creation flow and sets the app/audio language selection during onboarding. ### Default Profile Creation A default empty profile is created when the Onboarding screen is opened for the first time. This is necessary to provide a ProfileId to use when saving the selected app language. Because this will be the first profile on the app in onboarding v2, it is an admin. Provisions have been made so that, should the user exit the app before completing the onboarding flow, this profile will be fetched, to prevent multiple profile creation. ### App Language Selection The language selector will be shown to the user on initial app launch, or if profile onboarding is not complete. - There will be a pre-filled language option based on the locale of the device when the app is installed. If the locale is unsupported, English will be the default selection. - A user can select any preferred supported app language from the dropdown list. - The existing language functionality/behavior will be retained. Tests have been added to verify these requirements, and efforts have been made to ensure language selection persists on configuration change. I noticed during testing that failure to do this resulted in an unpleasant UX. ### Profile Nickname and Picture The "Create profile Screen" has been repurposed to update the default profile instead, providing the remaining profile properties(ProfileType, name, avatar) Checks have been added to check for profile creation errors, consistent with the legacy flow. A new function has been added to the ProfileManagementController to allow for batch update of these fields, and corresponding tests have been added. ### Audio Language Selection The final step of onboarding is the audio language selection, and there will be a pre-filled language selectionas follows: - Selected app language(from first onboarding screen) if available as audio language. (Audio language need not be completed) - Otherwise (if available as audio language), audio language of the administrator account -- this will be added downstream in M3, as it only impacts additional learners. - Otherwise (if available as audio language), device language. - Else, English. There have been some incidental changes in AudioLanguageFragment and OptionsFragment, and their related tests due to sharing of the classes between the existing screens and the new screens. ### ProfileTestHelper.kt A new function, and related tests, have been added to create a default profile to be used in tests. ## Essential Checklist <!-- Please tick the relevant boxes by putting an "x" in them. --> - [x] 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: ...".) - [x] Any changes to [scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets) files have their rationale included in the PR explanation. - [x] The PR follows the [style guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide). - [x] The PR does not contain any unnecessary code changes from Android Studio ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)). - [x] The PR is made from a branch that's **not** called "develop" and is up-to-date with "develop". - [x] The PR is **assigned** to the appropriate reviewers ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)). ## For UI-specific PRs only The screen recordings are in [this drive location](https://drive.google.com/drive/folders/1CXTAALPgpCKfekOQKjRFTb5G2fPgWkRt?usp=sharing), since github does not support webm. --------- Co-authored-by: Ben Henning <[email protected]>
- Loading branch information
1 parent
eb16e59
commit 95699f9
Showing
65 changed files
with
2,270 additions
and
252 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.