-
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 #4452, #4453, #4454, #4445, #4446, #4447, #4448: Add spotlight functionality #4699
Fix #4452, #4453, #4454, #4445, #4446, #4447, #4448: Add spotlight functionality #4699
Conversation
…)"" This reverts commit 912c357.
…b.com/JishnuGoyal/oppia-android into some-additional-small-fixes Conflicts: app/src/main/java/org/oppia/android/app/spotlight/SpotlightFragment.kt
…b.com/JishnuGoyal/oppia-android into some-additional-small-fixes
Some additional small fixes
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 @JishnuGoyal! Took another pass. Nearly all comments have been resolved.
I ran HomeActivityTest on Espresso, and here are the results (only testHomeActivity_configChange_promotedCard_storyNameIsCorrect is failing aside from tablet tests):
I also tried running SpotlightFragmentTest, but it hangs on Espresso. I didn't run any of the other suites due to my phone being very low on power.
Besides the above, I think all that's otherwise left is making sure we finalize the UI of the spotlights. Let's make sure to wrap that up before the PR is approved/merged.
app/src/main/java/org/oppia/android/app/player/audio/AudioFragmentPresenter.kt
Show resolved
Hide resolved
app/src/main/java/org/oppia/android/app/spotlight/SpotlightFragment.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/android/app/testing/SpotlightFragmentTestActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/android/app/topic/TopicFragmentPresenter.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/android/app/spotlight/SpotlightFragment.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/android/app/spotlight/SpotlightFragment.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/android/app/player/audio/AudioFragmentPresenter.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.
Approving to unblock you but one comment is pending from my earlier conversation.
testOnboardingFragment_checkDefaultSlide_clickSkipButton_shiftsToLastSlide appears to be a new failure in OnboardingFragmentTest. There are a few new potential failures in TopicFragmentTest. 35/50 tests failed in ExplorationActivityTest. Honestly, I don't think we can really rely on these tests much, so I think more stock needs to be put into the new test suite (SpotlightFragmentTest) rather than existing test suites which may be flaky and/or already failing. |
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.
Couple of nits, PTAL @JishnuGoyal.
app/src/sharedTest/java/org/oppia/android/app/spotlight/SpotlightFragmentTest.kt
Outdated
Show resolved
Hide resolved
utility/src/main/java/org/oppia/android/util/platformparameter/PlatformParameterConstants.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/android/app/testing/SpotlightFragmentTestActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/android/app/testing/SpotlightFragmentTestActivity.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.
Thanks @JishnuGoyal. PR LGTM, but please make sure to add screenshots & videos as discussed to the PR description.
Thanks, @BenHenning added a link to the screenshots and videos required. |
Explanation
Demo of the functionality introduced:
spotlightdemo.mp4
fixes #4452
fixes #4453
fixes #4454
fixes #4455
fixes #4456
fixes #4457
fixes #4458
fixes #4459
Update: The finalised design decisions for the spotlights have been resolved by this PR: #4763 (check screenshots and sample videos here) and tracked by issue #4764
This PR introduces the SpotlightFragment into the codebase, which is essentially a powerful, robust API that can highlight or 'spotlight' certain parts of the UI to create an onboarding experience for the same. We introduce the Spotlight library into the codebase handles the highlighting of certain elements on screen. The work done in this PR augments the functionality of the library, by dynamically adding arrows and hints which create an over-all Spotlight onboarding experience to the app, beautifully surfacing some functionalities of the app to a new user.
We also work on making sure that the spotlight is only shown to a user only once - the protocol buffers are used to save which spotlight has already been seen.
The purpose of this PR is to introduce an API that the future contributors can use to seamlessly integrate spotlights onto UI elements as and when needed, with minimal coding.
This PR also implements spotlights for the onboarding, home, topic and exploration screens that are required at this time.
For accessibility, the content descriptions of all the elements on which spotlights are required today are updated. If talkback is turned on, the spotlights will not show up.
The entire spotlight functionality is also gated behind a feature flag. This entire PR is backed by tests.
Essential Checklist