-
Notifications
You must be signed in to change notification settings - Fork 528
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 #565: Domain on-boarding flag #574
Conversation
@rt4914 & @BenHenning The new SplashActivity tests similar like HomeActivity have some issue in generating DaggerSplashActivityTest_TestApplicationComponent and blocked further not able to work on testing because of the same. PTAL |
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.
I believe that this PR has been assigned just to check the overview approach. (I am assuming this keeping in mind that the PR has not been self reviewed and there are a lot of nit changes).
Can you please update this code, because I think we do not need any change in files related to UserApphistory
.
@rt4914 PTAL on this. |
Okay i merged and resolved conflicts |
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.
Please check the comments. Also, I suggest using on-board
in comments instead of onBoard
to make it consistent.
app/src/main/java/org/oppia/app/onBoarding/OnBoardingActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/onBoarding/OnBoardingActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/onBoarding/OnBoardingActivityPresenter.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/onBoarding/OnBoardingActivityPresenter.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/app/splash/SplashActivityTest.kt
Outdated
Show resolved
Hide resolved
domain/src/main/java/org/oppia/domain/OnboardingFlowController.kt
Outdated
Show resolved
Hide resolved
domain/src/main/java/org/oppia/domain/OnboardingFlowController.kt
Outdated
Show resolved
Hide resolved
domain/src/main/java/org/oppia/domain/OnboardingFlowController.kt
Outdated
Show resolved
Hide resolved
domain/src/test/java/org/oppia/domain/OnboardingFlowControllerTest.kt
Outdated
Show resolved
Hide resolved
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.
LGTM, Just one comment.
app/src/main/java/org/oppia/app/onboarding/OnBoardingActivity.kt
Outdated
Show resolved
Hide resolved
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.
Sorry that this might cause a delay, but can you actually split this into 2 PRs? I think it would be a bit easier to follow & review if there was a first PR implementing just the domain controller & its tests, and a follow-up PR that's based on the first which introduces the initial activity/fragment that connects into that domain layer.
I think this is a general pattern we should use moving forward since it helps keep reviews focused on specific layers rather than reviewers needing to understand vertical implementations. This helps improve reviewing correctness and test coverage since reviewing domain layer code is quite different than frontend UI code, and more complex examples of vertically implemented features can easily reach into the thousands of lines of code.
FYI @rt4914 & @veena14cs as well for future PRs.
@BenHenning In that case, lets just keep this as single PR which implements the domain layer as I already have a PR #558 which works on low-fi, so once this domain layer code is approved and merged in develop, I can just update #558 such that it uses domain layer code and implements everything. |
|
Explanation
Onboarding flow should be visible only once irrespective of learner profile. Introduced domain layer code to control this feature.
Oppia app now showing On-boarding on initial app open, and directly to choose profile page upon returning to the app. Both of these states are also properly retained across configuration changes due to Dagger not leading to activities trying to recreate their dependent controllers.
From a testing side, testcase for OnboardingFlowControllerTest is introduced to test OnboardingFlowController.
Also this added new SplashActivity tests which rely on sleeping rather than idling resource similar like HomeActivity.
Checklist