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 #4072 and Fix Part of #4938: Revised profile chooser UI #5468

Open
wants to merge 402 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
402 commits
Select commit Hold shift + click to select a range
bcc2cbf
Add tests for migrated login routes
adhiamboperes Jun 17, 2024
6c1a28f
Add tests for migrated login routes
adhiamboperes Jun 17, 2024
822e1fb
Log onboarding started event
adhiamboperes Jun 17, 2024
d71ed56
Update test initialization for onboarding v2 off
adhiamboperes Jun 17, 2024
1e9c136
Update test initialization for onboarding v2 off
adhiamboperes Jun 17, 2024
72624f5
Merge branch 'develop' into new-onboarding-screen
adhiamboperes Jun 17, 2024
13d9ac5
Merge branch 'new-onboarding-screen' into onboarding-profile-type-screen
adhiamboperes Jun 17, 2024
f0d0c57
Merge branch 'onboarding-profile-type-screen' into create-profile-screen
adhiamboperes Jun 17, 2024
199447d
Merge branch 'create-profile-screen' into onboarding-learner-intro-sc…
adhiamboperes Jun 17, 2024
a0fc7d6
Merge branch 'onboarding-learner-intro-screen' into onboarding-audio-…
adhiamboperes Jun 17, 2024
9c2e1d6
Merge branch 'onboarding-audio-language-screen' into onboarding-profi…
adhiamboperes Jun 17, 2024
485dc54
Replace Lifecycle.State check with activity.isFinishing
adhiamboperes Jun 18, 2024
33624d7
Flatten layout
adhiamboperes Jun 19, 2024
2b10f80
Resolve merge conflicts
adhiamboperes Jun 19, 2024
1ade253
Merge branch 'onboarding-profile-type-screen' into create-profile-screen
adhiamboperes Jun 19, 2024
49586cc
Adjust profile picture prompt
adhiamboperes Jun 19, 2024
2d5d438
Add assertions for image loaded
adhiamboperes Jun 19, 2024
41dea0b
Replace Lifecycle.State check with activity.isFinishing
adhiamboperes Jun 19, 2024
e6a1b24
Addressed reviewer comments
adhiamboperes Jun 19, 2024
85081cc
Merge branch 'create-profile-screen' into onboarding-learner-intro-sc…
adhiamboperes Jun 19, 2024
4e91b89
Merge branch 'onboarding-learner-intro-screen' into onboarding-audio-…
adhiamboperes Jun 19, 2024
66f8fac
Fix tests
adhiamboperes Jun 19, 2024
c10ba82
Fix failing tests
adhiamboperes Jun 19, 2024
c386024
Add missing test initialization
adhiamboperes Jun 19, 2024
0b74249
Merge branch 'onboarding-audio-language-screen' into onboarding-profi…
adhiamboperes Jun 19, 2024
db36244
Fix merge conflict
adhiamboperes Jun 19, 2024
35a839e
Add missing bazel dependency
adhiamboperes Jun 19, 2024
59c4665
Complete login migration route tests
adhiamboperes Jun 20, 2024
ab36c03
Fix tests/flows broken by changes
adhiamboperes Jun 20, 2024
c327be9
Add tests for end profile onboarding event log
adhiamboperes Jun 20, 2024
fccac67
Add tests for profile creation errors
adhiamboperes Jun 20, 2024
4cd3918
General cleanup
adhiamboperes Jun 21, 2024
2c33188
General cleanup
adhiamboperes Jun 21, 2024
026ff1d
Revert breaking change
adhiamboperes Jun 21, 2024
7304449
Add kdoc
adhiamboperes Jun 21, 2024
2cb0469
Fix static check failures
adhiamboperes Jun 21, 2024
c32d2e9
Fix failing event log events
adhiamboperes Jun 21, 2024
cb8b21e
Fix failing app deprecation tests
adhiamboperes Jun 22, 2024
c827a68
Refactor the app startup state
adhiamboperes Jun 23, 2024
5a570b2
Fix event logs
adhiamboperes Jun 23, 2024
381c883
Revert changes to app init
adhiamboperes Jun 24, 2024
bdcf5c1
Enforce v2 onboarding flow
adhiamboperes Jun 24, 2024
0a59cfc
Enforce conditional profile exit for sole learner
adhiamboperes Jun 24, 2024
5ee3a20
Revert unnecessary test file changes
adhiamboperes Jun 24, 2024
df789ea
Fix proto field case
adhiamboperes Jun 24, 2024
a1b0964
Fix SplashActivityTests
adhiamboperes Jun 24, 2024
1bb7508
Merge branch 'develop' into onboarding-profile-type-screen
adhiamboperes Jun 24, 2024
6e0401f
Update test_file_exemptions to the new format
adhiamboperes Jun 24, 2024
2f84098
Fix indent
adhiamboperes Jun 24, 2024
d979d1b
Merge branch 'onboarding-profile-type-screen' into create-profile-screen
adhiamboperes Jun 24, 2024
2d83378
Update test_file_exemptions
adhiamboperes Jun 24, 2024
3f5c8c2
Merge branch 'create-profile-screen' into onboarding-learner-intro-sc…
adhiamboperes Jun 24, 2024
e3565b5
Address reviewer comment
adhiamboperes Jun 24, 2024
3641559
Merge branch 'onboarding-learner-intro-screen' into onboarding-audio-…
adhiamboperes Jun 24, 2024
b19014c
Address reviewer comments
adhiamboperes Jun 24, 2024
2412618
Populate the language dropdown list
adhiamboperes Jun 25, 2024
8d8ab17
Merge branch 'onboarding-audio-language-screen' into onboarding-profi…
adhiamboperes Jun 25, 2024
61a7724
Fix test file exemption path
adhiamboperes Jun 25, 2024
5512216
Add missing bazel dep
adhiamboperes Jun 25, 2024
a0fe5c6
Add dropdown view id
adhiamboperes Jun 25, 2024
2bf2eda
Hook up app language options
adhiamboperes Jun 26, 2024
04acfa9
Merge branch 'develop' into onboarding-profile-type-screen
adhiamboperes Jun 30, 2024
223150b
Replace png images with svgs
adhiamboperes Jun 30, 2024
90428af
Add exemptions for new svgs
adhiamboperes Jun 30, 2024
e248fb1
Pull upstream and fix conflicts
adhiamboperes Jun 30, 2024
9fd9fbc
Change default avatar bg in v2
adhiamboperes Jun 30, 2024
2ec249d
Fix profile prompt background
adhiamboperes Jun 30, 2024
988ab47
Merge branch 'develop' into create-profile-screen
adhiamboperes Jun 30, 2024
af6ed95
Fix deprecated api
adhiamboperes Jun 30, 2024
53e7b9b
Merge branch 'create-profile-screen' into onboarding-learner-intro-sc…
adhiamboperes Jun 30, 2024
05d02c3
Fix kdoc
adhiamboperes Jun 30, 2024
ce9660d
Merge branch 'create-profile-screen' into onboarding-learner-intro-sc…
adhiamboperes Jun 30, 2024
ce46838
Merge remote-tracking branch 'upstream/onboarding-learner-intro-scree…
adhiamboperes Jun 30, 2024
86416a1
Fix test_file_exemption
adhiamboperes Jun 30, 2024
b3b7d6c
Merge branch 'develop' into onboarding-audio-language-screen
adhiamboperes Jul 1, 2024
29eb9d5
Replace ConstraintLayout with FrameLayout
adhiamboperes Jul 1, 2024
fbe6ac3
Add dropdown view id
adhiamboperes Jun 25, 2024
264f827
Hook up app language options
adhiamboperes Jun 26, 2024
320fc14
Create language dropdown list and the default selection
adhiamboperes Jul 2, 2024
d96d29e
Make otter graphic respond to rtl layouts
adhiamboperes Jul 2, 2024
9073e8c
Add mechanisms to check if a default profile exists: wip
adhiamboperes Jul 2, 2024
31fb8f5
Pass the created profileId and update profile details
adhiamboperes Jul 2, 2024
d65b9f8
Refactored IntroFragment arguments to proto, and decorated with the p…
adhiamboperes Jul 2, 2024
cf138ab
Prime AudioLanguageActivity to receive a profileId args
adhiamboperes Jul 2, 2024
b0e47c9
Fix merge conflicts
adhiamboperes Jul 3, 2024
866fff4
Refactor to the new central hasProtoExtra
adhiamboperes Jul 3, 2024
8d96257
Remove redundant non-null assertion
adhiamboperes Jul 3, 2024
470a476
Fix duplicating default profile creation
adhiamboperes Jul 5, 2024
89d5c67
Bind audiolanguage pre-selection to the dropdown
adhiamboperes Jul 5, 2024
c901f9d
Fix persist selection on config change
adhiamboperes Jul 5, 2024
b71d6bd
Setup audio language pre-selection logic
adhiamboperes Jul 5, 2024
682355d
Fix lint errors
adhiamboperes Jul 5, 2024
185d8d4
Cleanup language selection and profile creation
adhiamboperes Jul 9, 2024
a0884c8
Fix missing kdocs
adhiamboperes Jul 9, 2024
efe460e
Update profile error message view
adhiamboperes Jul 11, 2024
0be7286
Refactor IntroActivity intent creation
adhiamboperes Jul 11, 2024
8508ea5
Update intent tests to reflect new intent extras
adhiamboperes Jul 11, 2024
beb6f7c
Add tests for language switching
adhiamboperes Jul 11, 2024
e653a7b
Add helper for creating a default empty profile
adhiamboperes Jul 11, 2024
4d2c48d
Update updateNewProfileDetails() kdocs
adhiamboperes Jul 11, 2024
002cc38
Helper for creating the default empty profile in tests
adhiamboperes Jul 11, 2024
eff4cbb
Tests for the new profile update api
adhiamboperes Jul 11, 2024
d6423c2
Additional tests for the profile creation flow
adhiamboperes Jul 11, 2024
7730225
Add tests for language selection
adhiamboperes Jul 11, 2024
af11961
Fix missing kdoc
adhiamboperes Jul 11, 2024
4d81441
Fix self-review pass issues.
adhiamboperes Jul 12, 2024
d08df8b
Exempt OnboardingFragmentTest from locale checks
adhiamboperes Jul 12, 2024
0932981
Fix failing tests
adhiamboperes Jul 12, 2024
d76307b
Revert conflicting/already implemented UI layer code
adhiamboperes Jul 12, 2024
844c0e2
Temporary comments
adhiamboperes Jul 12, 2024
9ba0b9b
Merge branch 'onboarding-language-domain-config' into onboarding-prof…
adhiamboperes Jul 12, 2024
36f3cf6
Fix leftover refactor issue
adhiamboperes Jul 12, 2024
de5783c
Complete the sole learner onboarding flow
adhiamboperes Jul 15, 2024
fc85e9d
Update admin profile profileType in v2
adhiamboperes Jul 15, 2024
7564eba
Merge branch 'onboarding-language-domain-config' into onboarding-prof…
adhiamboperes Jul 15, 2024
56f668a
Destroy onboarding activities after onboarding completed.
adhiamboperes Jul 15, 2024
7a97741
Fix failing SplashActivityTests
adhiamboperes Jul 15, 2024
8efa8b9
Fix failing SplashActivityTests + finish migration pathways
adhiamboperes Jul 17, 2024
318334f
Onboard existing learner profiles
adhiamboperes Jul 17, 2024
0bf61cc
Toggle homescreen with multiple classrooms flag
adhiamboperes Jul 17, 2024
b00217a
General cleanup
adhiamboperes Jul 18, 2024
5f01efb
Merge branch 'develop' into onboarding-language-domain-config
adhiamboperes Jul 18, 2024
cd25696
Merge branch 'onboarding-language-domain-config' into onboarding-prof…
adhiamboperes Jul 18, 2024
eb64975
General cleanup
adhiamboperes Jul 18, 2024
e7ee78a
Fix failing test
adhiamboperes Jul 23, 2024
7e0e044
Rename ProfileChooserFragmentPresenter.kt
adhiamboperes Jul 23, 2024
23f9ce0
Separate v1 and 2 impls
adhiamboperes Jul 23, 2024
63e0901
add profile selection resources
adhiamboperes Jul 23, 2024
905834d
Create the new profile selection screen
adhiamboperes Jul 24, 2024
8c0db18
Cleanup UI
adhiamboperes Jul 25, 2024
a18c45c
Add tests
adhiamboperes Jul 25, 2024
f4f652e
Merge branch 'develop' into onboarding-language-domain-config
adhiamboperes Jul 25, 2024
2c7b33f
Add landscape carousel
adhiamboperes Aug 1, 2024
08f67c6
Address part of reviewer comments
adhiamboperes Aug 1, 2024
e942263
Merge branch 'develop' into onboarding-language-domain-config
adhiamboperes Aug 1, 2024
9a8024b
Merge branch 'onboarding-language-domain-config' into onboarding-prof…
adhiamboperes Aug 1, 2024
e67f67b
Fix lint errors
adhiamboperes Aug 1, 2024
ac6b501
Merge branch 'onboarding-language-domain-config' of github.com:oppia/…
adhiamboperes Aug 1, 2024
ef1fd91
Merge branch 'onboarding-language-domain-config' into onboarding-prof…
adhiamboperes Aug 1, 2024
666ad36
Create test suite for TextInputLayoutBindingAdapters
adhiamboperes Aug 5, 2024
9ad283a
Address more reviewer comments.
adhiamboperes Aug 5, 2024
ee841fa
Merge branch 'develop' of github.com:oppia/oppia-android into onboard…
adhiamboperes Aug 5, 2024
4e6a2a6
Create test suite for TextInputLayoutBindingAdapters
adhiamboperes Aug 5, 2024
5389819
Address more reviewer comments.
adhiamboperes Aug 5, 2024
4b37f24
Fixed static check failures
adhiamboperes Aug 5, 2024
5503aee
Merge branch 'onboarding-language-domain-config' into onboarding-prof…
adhiamboperes Aug 6, 2024
d62af40
Merge branch 'onboarding-profile-domain-config' into new-profile-choo…
adhiamboperes Aug 6, 2024
0417789
Fix leftover accidental refactor
adhiamboperes Aug 6, 2024
a0fbe95
Fix profile picture upload error
adhiamboperes Aug 6, 2024
3ad68ab
Fix static check failures
adhiamboperes Aug 6, 2024
36de7a5
Fix static check failures
adhiamboperes Aug 6, 2024
294ffd3
Fix bazel build errors
adhiamboperes Aug 7, 2024
da1787b
Fix empty strings assertion
adhiamboperes Aug 12, 2024
3e068bb
Addressed test comments
adhiamboperes Aug 12, 2024
990dc5a
Use proto for app language
adhiamboperes Aug 14, 2024
30cf1db
Refactor language binding logic
adhiamboperes Aug 19, 2024
9193b4a
Allow user to progress on continue clicked.
adhiamboperes Aug 21, 2024
bc140c5
Fix failing test
adhiamboperes Aug 21, 2024
6635c0d
Fix failing audio language tests
adhiamboperes Aug 21, 2024
d604e53
Fix failing profile creation tests
adhiamboperes Aug 21, 2024
622edb3
Temporarily remove failing adapter tests
adhiamboperes Aug 22, 2024
0133cd0
Merge branch 'onboarding-language-domain-config' into onboarding-prof…
adhiamboperes Aug 22, 2024
dcf6ab3
Merge branch 'onboarding-profile-domain-config' into new-profile-choo…
adhiamboperes Aug 22, 2024
bf77525
Rename variables for clarity
adhiamboperes Aug 22, 2024
1f00658
Cleanup PR
adhiamboperes Aug 23, 2024
b684996
Remove kdoc exemption
adhiamboperes Aug 23, 2024
f838bab
Merge branch 'develop' into onboarding-language-domain-config
adhiamboperes Aug 23, 2024
dd03357
Update profile creation exceptions and tests
adhiamboperes Aug 23, 2024
da2fb5f
Properly set up binding adapter tests
adhiamboperes Aug 23, 2024
d982d06
Merge branch 'onboarding-language-domain-config' into onboarding-prof…
adhiamboperes Aug 23, 2024
0fc0078
Fix self review issues
adhiamboperes Aug 23, 2024
7589da6
Remove unused code
adhiamboperes Aug 23, 2024
ded1640
Fix nit
adhiamboperes Aug 23, 2024
b2084e6
Merge branch 'develop' into onboarding-language-domain-config
adhiamboperes Aug 23, 2024
e06d28f
Merge branch 'onboarding-language-domain-config' into onboarding-prof…
adhiamboperes Aug 23, 2024
6cf179f
Remove duplicate exemption
adhiamboperes Aug 23, 2024
7f56064
Merge branch 'onboarding-profile-domain-config' into new-profile-choo…
adhiamboperes Aug 23, 2024
1cc21bb
Remove leftover profile audiolanguage
adhiamboperes Aug 24, 2024
4c578e1
Fix landscape scrolling behaviour
adhiamboperes Aug 27, 2024
99913bb
Fix admin profile creation error
adhiamboperes Aug 27, 2024
982d6f5
Fix broken test
adhiamboperes Aug 27, 2024
f89ed7a
Merge branch 'develop' into onboarding-language-domain-config
adhiamboperes Aug 27, 2024
946c79b
Merge branch 'onboarding-language-domain-config' into onboarding-prof…
adhiamboperes Aug 27, 2024
ca334d6
Integrate classrooms and onboarding
adhiamboperes Aug 27, 2024
831fa1c
Fix Admin profile creation and onboarding
adhiamboperes Aug 27, 2024
b94a0f8
Add missing argument proto
adhiamboperes Aug 27, 2024
5518816
Merge branch 'onboarding-profile-domain-config' into new-profile-choo…
adhiamboperes Aug 27, 2024
b3d6ee3
Update broken tests
adhiamboperes Aug 27, 2024
daea15f
Fix profile migration bugs
adhiamboperes Aug 28, 2024
2de3784
Merge branch 'onboarding-profile-domain-config' into new-profile-choo…
adhiamboperes Aug 28, 2024
34e8da5
Hide step count for additional learners onboarding
adhiamboperes Sep 3, 2024
c249066
Fix profile pic upload issue
adhiamboperes Sep 3, 2024
72f8eb1
Fix failing test
adhiamboperes Sep 4, 2024
0397de7
Fix failing audio language tests
adhiamboperes Sep 4, 2024
9993552
Add test for arabic inTextInputLayoutBindingAdaptersTest
adhiamboperes Sep 9, 2024
dea8c06
Refactor formatting
adhiamboperes Sep 9, 2024
47af3d1
Address reviewer comment
adhiamboperes Sep 9, 2024
cc7147a
Cleanup language selection impl
adhiamboperes Sep 9, 2024
7c713c6
Merge branch 'develop' of github.com:oppia/oppia-android into onboard…
adhiamboperes Sep 9, 2024
063b97a
Address general comments
adhiamboperes Sep 9, 2024
73105a0
Nit
adhiamboperes Sep 10, 2024
fac0a95
Nit
adhiamboperes Sep 10, 2024
1a4d82d
Merge branch 'onboarding-language-domain-config' into onboarding-prof…
adhiamboperes Sep 10, 2024
0ceb9fc
Fix failing tests
adhiamboperes Sep 10, 2024
28d2742
Fix failing tests
adhiamboperes Sep 10, 2024
6ae7968
Merge branch 'onboarding-profile-domain-config' of github.com:oppia/o…
adhiamboperes Sep 10, 2024
6a5634e
remove unused import
adhiamboperes Sep 10, 2024
7d2c1a7
Refactor event log management
adhiamboperes Sep 11, 2024
6d90cd2
Merge branch 'develop' of github.com:oppia/oppia-android into onboard…
adhiamboperes Sep 11, 2024
59df467
Refactor function
adhiamboperes Sep 11, 2024
45719dd
Merge branch 'develop' into onboarding-language-domain-config
adhiamboperes Sep 12, 2024
41c6a68
Merge branch 'develop' into onboarding-language-domain-config
adhiamboperes Sep 16, 2024
9961d00
Merge branch 'develop' into onboarding-language-domain-config
adhiamboperes Oct 1, 2024
4ff4680
Refactor language selection to use supported languages only
adhiamboperes Oct 1, 2024
9d60f13
Merge branch 'onboarding-language-domain-config' of github.com:oppia/…
adhiamboperes Oct 1, 2024
0047916
Merge branch 'onboarding-language-domain-config' into onboarding-prof…
adhiamboperes Oct 4, 2024
e6f821a
Refactor test to use existing eventlog util function
adhiamboperes Oct 8, 2024
21c85a9
Null check and readability improvements
adhiamboperes Oct 8, 2024
6fbea02
Refactor test setup
adhiamboperes Oct 9, 2024
b30dd7e
Merge branch 'develop' of github.com:oppia/oppia-android into onboard…
adhiamboperes Oct 15, 2024
fd3a10c
Fix failing tests
adhiamboperes Oct 15, 2024
a57310e
Fix failing profile chooser tests
adhiamboperes Oct 16, 2024
943aa87
Resolve merge conflicts
adhiamboperes Oct 22, 2024
8d5a78d
Refactor backpress callback
adhiamboperes Oct 22, 2024
b200e0f
Merge branch 'develop' of github.com:oppia/oppia-android into onboard…
adhiamboperes Nov 4, 2024
7a52213
Fix synchronisation issues caused by createEmptyComposeRule()
adhiamboperes Nov 6, 2024
241d58e
Revert formatting changes
adhiamboperes Nov 6, 2024
537b6b9
Refactor callback code
adhiamboperes Nov 6, 2024
4899492
Revert formatting only changes
adhiamboperes Nov 6, 2024
a133e6d
Add missing tests
adhiamboperes Nov 7, 2024
885a193
Pull latest changes
adhiamboperes Nov 7, 2024
ae0b30a
Merge branch 'onboarding-profile-domain-config' into new-profile-choo…
adhiamboperes Nov 7, 2024
8d294c7
Fix merge issues
adhiamboperes Nov 7, 2024
f2b3b83
Merge branch 'onboarding-profile-domain-config' into new-profile-choo…
adhiamboperes Nov 7, 2024
67089ab
Fix lint error
adhiamboperes Nov 7, 2024
c34c134
Fix missing import
adhiamboperes Nov 8, 2024
7b68ee3
Merge branch 'develop' into new-profile-chooser-ui-views
adhiamboperes Nov 29, 2024
b18b6d2
Merge remote-tracking branch 'upstream/develop' into new-profile-choo…
adhiamboperes Nov 29, 2024
26a3fc1
Merge branch 'develop' into new-profile-chooser-ui-views
adhiamboperes Nov 29, 2024
0c7b755
Merge branch 'develop' of github.com:oppia/oppia-android into new-pro…
adhiamboperes Dec 5, 2024
ca44c57
Addressed reviewer comments
adhiamboperes Dec 5, 2024
deca5a2
Addressed more reviewer comments
adhiamboperes Dec 5, 2024
0420039
Addressed more reviewer comments
adhiamboperes Dec 5, 2024
8debfbd
Fix failing test
adhiamboperes Dec 11, 2024
d6dcd68
Fix scroll issue
adhiamboperes Dec 11, 2024
4900d4e
Merge branch 'develop' into new-profile-chooser-ui-views
adhiamboperes Dec 13, 2024
2b66c3b
Merge branch 'develop' of github.com:oppia/oppia-android into new-pro…
adhiamboperes Dec 18, 2024
810817e
Address reviewer comments.
adhiamboperes Dec 18, 2024
204147b
Merge branch 'new-profile-chooser-ui-views' of github.com:oppia/oppia…
adhiamboperes Dec 18, 2024
5159570
Address more reviewer comments
adhiamboperes Dec 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ LISTENERS = [
"src/main/java/org/oppia/android/app/player/state/listener/StateKeyboardButtonListener.kt",
"src/main/java/org/oppia/android/app/player/state/listener/SubmitNavigationButtonListener.kt",
"src/main/java/org/oppia/android/app/policies/RouteToPoliciesListener.kt",
"src/main/java/org/oppia/android/app/profile/ProfileClickListener.kt",
"src/main/java/org/oppia/android/app/profile/RouteToAdminPinListener.kt",
"src/main/java/org/oppia/android/app/profileprogress/ProfilePictureClickListener.kt",
"src/main/java/org/oppia/android/app/profileprogress/RouteToCompletedStoryListListener.kt",
Expand Down Expand Up @@ -233,6 +234,7 @@ VIEW_MODELS_WITH_RESOURCE_IMPORTS = [
"src/main/java/org/oppia/android/app/player/state/itemviewmodel/TextInputViewModel.kt",
"src/main/java/org/oppia/android/app/profile/AddProfileViewModel.kt",
"src/main/java/org/oppia/android/app/profile/PinPasswordViewModel.kt",
"src/main/java/org/oppia/android/app/profile/ProfileItemViewModel.kt",
"src/main/java/org/oppia/android/app/profile/ResetPinViewModel.kt",
"src/main/java/org/oppia/android/app/profileprogress/ProfileProgressViewModel.kt",
"src/main/java/org/oppia/android/app/profileprogress/RecentlyPlayedStorySummaryViewModel.kt",
Expand Down Expand Up @@ -413,6 +415,7 @@ VIEWS_WITH_RESOURCE_IMPORTS = [
"src/main/java/org/oppia/android/app/customview/PromotedStoryCardView.kt",
"src/main/java/org/oppia/android/app/customview/SegmentedCircularProgressView.kt",
"src/main/java/org/oppia/android/app/customview/VerticalDashedLineView.kt",
"src/main/java/org/oppia/android/app/profile/ProfileListView.kt",
"src/main/java/org/oppia/android/app/survey/SurveyMultipleChoiceOptionView.kt",
"src/main/java/org/oppia/android/app/survey/SurveyNpsItemOptionView.kt",
"src/main/java/org/oppia/android/app/utility/ClickableAreasImage.kt",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ class CreateProfileFragmentPresenter @Inject constructor(

val params = IntroActivityParams.newBuilder()
.setProfileNickname(profileName)
.setParentScreen(IntroActivityParams.ParentScreen.CREATE_PROFILE_SCREEN)
.build()

val intent =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ class IntroActivity : InjectableAutoLocalizedAppCompatActivity() {
super.onCreate(savedInstanceState)
(activityComponent as ActivityComponentImpl).inject(this)

val profileNickname =
intent.getProtoExtra(PARAMS_KEY, IntroActivityParams.getDefaultInstance()).profileNickname
val activityParams = intent.getProtoExtra(PARAMS_KEY, IntroActivityParams.getDefaultInstance())
val profileNickname = activityParams.profileNickname

val profileId = intent.extractCurrentUserProfileId()

onboardingLearnerIntroActivityPresenter.handleOnCreate(profileNickname, profileId)
val parentScreen = activityParams.parentScreen

onboardingLearnerIntroActivityPresenter.handleOnCreate(profileNickname, profileId, parentScreen)
}

companion object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
package org.oppia.android.app.onboarding

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.databinding.DataBindingUtil
import org.oppia.android.R
import org.oppia.android.app.activity.ActivityScope
import org.oppia.android.app.model.IntroFragmentArguments
import org.oppia.android.app.model.IntroActivityParams
import org.oppia.android.app.model.ProfileId
import org.oppia.android.databinding.IntroActivityBinding
import org.oppia.android.util.extensions.putProto
import org.oppia.android.util.profile.CurrentUserProfileIdIntentDecorator.decorateWithUserProfileId
import javax.inject.Inject

private const val TAG_LEARNER_INTRO_FRAGMENT = "TAG_INTRO_FRAGMENT"

/** Argument key for bundling the profile nickname. */
const val PROFILE_NICKNAME_ARGUMENT_KEY = "IntroFragment.Arguments"

/** The Presenter for [IntroActivity]. */
@ActivityScope
class IntroActivityPresenter @Inject constructor(
Expand All @@ -25,22 +19,16 @@ class IntroActivityPresenter @Inject constructor(
private lateinit var binding: IntroActivityBinding

/** Handle creation and binding of the [IntroActivity] layout. */
fun handleOnCreate(profileNickname: String, profileId: ProfileId) {
fun handleOnCreate(
profileNickname: String,
profileId: ProfileId,
parentScreen: IntroActivityParams.ParentScreen
) {
binding = DataBindingUtil.setContentView(activity, R.layout.intro_activity)
binding.lifecycleOwner = activity

if (getIntroFragment() == null) {
val introFragment = IntroFragment()

val argumentsProto =
IntroFragmentArguments.newBuilder().setProfileNickname(profileNickname).build()

val args = Bundle().apply {
decorateWithUserProfileId(profileId)
putProto(PROFILE_NICKNAME_ARGUMENT_KEY, argumentsProto)
}

introFragment.arguments = args
val introFragment = IntroFragment.newInstance(profileNickname, profileId, parentScreen)

activity.supportFragmentManager.beginTransaction().add(
R.id.learner_intro_fragment_placeholder,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ import android.view.View
import android.view.ViewGroup
import org.oppia.android.app.fragment.FragmentComponentImpl
import org.oppia.android.app.fragment.InjectableFragment
import org.oppia.android.app.model.IntroActivityParams
import org.oppia.android.app.model.IntroFragmentArguments
import org.oppia.android.app.model.ProfileId
import org.oppia.android.util.extensions.getProto
import org.oppia.android.util.extensions.putProto
import org.oppia.android.util.profile.CurrentUserProfileIdIntentDecorator.decorateWithUserProfileId
import org.oppia.android.util.profile.CurrentUserProfileIdIntentDecorator.extractCurrentUserProfileId
import javax.inject.Inject

Expand All @@ -27,15 +31,19 @@ class IntroFragment : InjectableFragment() {
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
val profileNickname =
val args =
checkNotNull(
arguments?.getProto(
PROFILE_NICKNAME_ARGUMENT_KEY,
INTRO_FRAGMENT_ARGUMENT_KEY,
IntroFragmentArguments.getDefaultInstance()
)
) {
"Expected profileNickname to be included in the arguments for IntroFragment."
}.profileNickname
"Expected IntroFragment to have arguments."
}

val profileNickname = args.profileNickname

val parentScreen = args.parentScreen

val profileId =
checkNotNull(arguments?.extractCurrentUserProfileId()) {
Expand All @@ -46,7 +54,38 @@ class IntroFragment : InjectableFragment() {
inflater,
container,
profileNickname,
profileId
profileId,
parentScreen
)
}

companion object {
/** Argument key for bundling arguments into [IntroFragment] . */
const val INTRO_FRAGMENT_ARGUMENT_KEY = "IntroFragment.Arguments"

/**
* Creates a new instance of a IntroFragment.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* Creates a new instance of a IntroFragment.
* Creates a new instance of an [IntroFragment].

Slight doc rewording suggestion.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated.

*
* @param profileNickname the nickname associated with this learner profile
* @param parentScreen the parent screen opening this [IntroFragment] instance
* @return a new instance of [IntroFragment]
*/
fun newInstance(
profileNickname: String,
profileId: ProfileId,
parentScreen: IntroActivityParams.ParentScreen
): IntroFragment {
val argumentsProto =
IntroFragmentArguments.newBuilder()
.setProfileNickname(profileNickname)
.setParentScreen(parentScreen)
.build()
return IntroFragment().apply {
arguments = Bundle().apply {
putProto(INTRO_FRAGMENT_ARGUMENT_KEY, argumentsProto)
decorateWithUserProfileId(profileId)
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.Fragment
import org.oppia.android.R
import org.oppia.android.app.model.AudioLanguage
import org.oppia.android.app.model.IntroActivityParams
import org.oppia.android.app.model.ProfileId
import org.oppia.android.app.options.AudioLanguageActivity
import org.oppia.android.app.translation.AppLanguageResourceHandler
Expand All @@ -29,7 +30,8 @@ class IntroFragmentPresenter @Inject constructor(
inflater: LayoutInflater,
container: ViewGroup?,
profileNickname: String,
profileId: ProfileId
profileId: ProfileId,
parentScreen: IntroActivityParams.ParentScreen
): View {
binding = LearnerIntroFragmentBinding.inflate(
inflater,
Expand All @@ -43,6 +45,10 @@ class IntroFragmentPresenter @Inject constructor(

profileManagementController.markProfileOnboardingStarted(profileId)

if (parentScreen == IntroActivityParams.ParentScreen.PROFILE_CHOOSER_SCREEN) {
binding.onboardingStepsCount?.visibility = View.GONE
}
Comment on lines +48 to +50
Copy link
Member

Choose a reason for hiding this comment

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

Are both possibilities of this conditional covered in intro fragment tests?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added a test for the PROFILE_CHOOSER_SCREEN parent.


binding.onboardingNavigationBack.setOnClickListener {
activity.finish()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,23 @@ import android.view.View
import android.view.ViewGroup
import org.oppia.android.app.fragment.FragmentComponentImpl
import org.oppia.android.app.fragment.InjectableFragment
import org.oppia.android.app.model.Profile
import org.oppia.android.util.platformparameter.EnableOnboardingFlowV2
import org.oppia.android.util.platformparameter.PlatformParameterValue
import javax.inject.Inject

/** Fragment that allows user to select a profile or create new ones. */
class ProfileChooserFragment : InjectableFragment(), RouteToAdminPinListener {
class ProfileChooserFragment : InjectableFragment(), RouteToAdminPinListener, ProfileClickListener {
@Inject
lateinit var profileChooserFragmentPresenterV1: ProfileChooserFragmentPresenterV1

@Inject
lateinit var profileChooserFragmentPresenter: ProfileChooserFragmentPresenter

@Inject
@field:EnableOnboardingFlowV2
lateinit var enableOnboardingFlowV2: PlatformParameterValue<Boolean>

override fun onAttach(context: Context) {
super.onAttach(context)
(fragmentComponent as FragmentComponentImpl).inject(this)
Expand All @@ -24,10 +34,22 @@ class ProfileChooserFragment : InjectableFragment(), RouteToAdminPinListener {
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
return profileChooserFragmentPresenter.handleCreateView(inflater, container)
return if (enableOnboardingFlowV2.value) {
profileChooserFragmentPresenter.handleCreateView(inflater, container)
} else {
profileChooserFragmentPresenterV1.handleCreateView(inflater, container)
}
}

override fun routeToAdminPin() {
profileChooserFragmentPresenter.routeToAdminPin()
if (enableOnboardingFlowV2.value) {
profileChooserFragmentPresenter.routeToAdminPin()
} else {
profileChooserFragmentPresenterV1.routeToAdminPin()
}
}

override fun onProfileClicked(profile: Profile) {
profileChooserFragmentPresenter.onProfileClick(profile)
}
}
Loading
Loading