Skip to content

Jetpack focus: Show full screen overlay for Jetpack Features#17432

Merged
AjeshRPai merged 45 commits intotrunkfrom
issue/17330-jetpack-focus-create-generic-fullscreen-overlay
Nov 22, 2022
Merged

Jetpack focus: Show full screen overlay for Jetpack Features#17432
AjeshRPai merged 45 commits intotrunkfrom
issue/17330-jetpack-focus-create-generic-fullscreen-overlay

Conversation

@AjeshRPai
Copy link
Copy Markdown
Contributor

@AjeshRPai AjeshRPai commented Nov 7, 2022

Fixes #17330 and #17333

This PR adds a feature-specific overlay for the Feature Removal Phase one. Screenshot of the feature-specific overlays is shown below in dark as well light mode.

Stats Notifications Reader
Screenshot_20221108-041659 Screenshot_20221108-041907 (1) Screenshot_20221108-041913
Screenshot_20221108-041638 Screenshot_20221108-041810 Screenshot_20221108-130130

Known issues and Improvements

  • The UI in landscape mode will be taken up in a separate PR
  • Analytics and tracking will be taken up in a separate PR
  • The logic for showing overlay in Site creation will be taken up in a separate PR

Testing Instructions

1. Make sure that the Overlay is not shown

  1. If Phase one is not started yet
  • Launch the WordPress app with a WP site and navigate to Stats/Reader/Notifications
  • Verify that the feature overlay is not shown
  1. If the site is a Self-hosted site

  2. No shown on the Jetpack app

2. Jetpack overlay is shown when Phase one is started

The logic for testing whether the overlay is shown according to feature-specific overlay frequency or global-specific overlay frequency is implemented in JetpackFeatureRemovalOverlayUtilTest.

  • Launch WordPress app and go to My Site -> App Settings -> Debug settings -> enable jp_removal_one
  • Close app and Launch the app again

Stats

  1. Navigate to Stats either through dashboard/widget/notifications

  2. Verify that the feature-specific overlay is shown

  3. Turn on dark mode

  4. Verify that the overlay is shown in Dark mode

  5. Click on Try the new jetpack app button

  6. Verify that the user is redirected to the Jetpack app on the play store

  7. Navigate to Stats either through dashboard/widget/notifications

  8. Verify that the feature-specific overlay is shown

  9. Click on Continue to Stats button

  10. Notice that the overlay is dismissed and Stats are visible

Notifications feature

  1. Navigate to the Notifications tab either through the dashboard/system notifications

  2. Verify that the feature-specific overlay is shown

  3. Turn on dark mode

  4. Verify that the overlay is shown in Dark mode

  5. Click on Try the new jetpack app button

  6. Verify that the user is redirected to the Jetpack app on the play store

  7. Navigate to the Notifications tab either through the dashboard/notifications

  8. Verify that the feature-specific overlay is shown

  9. Click on Continue to Notifications button

  10. Notice that the overlay is dismissed and Notifications are visible

Reader

  1. Navigate to Reader either through the dashboard/notifications

  2. Verify that the feature-specific overlay is shown

  3. Turn on dark mode

  4. Verify that the overlay is shown in Dark mode

  5. Click on Try the new jetpack app button

  6. Verify that the user is redirected to the Jetpack app on the play store

  7. Navigate to Reader either through the dashboard/notifications

  8. Verify that the feature-specific overlay is shown

  9. Click on Continue to Reader button

  10. Notice that the overlay is dismissed and Notifications are visible

3. Make sure that the Unit tests logic is correct

Regression Notes

  1. Potential unintended areas of impact
    Overlay is not shown properly

  2. What I did to test those areas of impact (or what existing automated tests I relied on)
    Manual testing and Automated tests

  3. What automated tests I added (or what prevented me from doing so)
    Added unit tests in JetpackFeatureRemovalOverlayUtilTest, ReaderViewModelTest and StatsViewModelTest

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@AjeshRPai AjeshRPai added this to the 21.2 milestone Nov 7, 2022
@AjeshRPai AjeshRPai self-assigned this Nov 7, 2022
@wpmobilebot
Copy link
Copy Markdown
Contributor

wpmobilebot commented Nov 7, 2022

Jetpack📲 You can test these changes on Jetpack by downloading jetpack-installable-build-pr17432-eb837a0.apk
💡 Scan this QR code with your Android phone to download and install the APK directly on it.
AppJetpack
Build FlavorJalapeno
Build TypeDebug
Commiteb837a0
Note: This installable build uses the JalapenoDebug build flavor, and does not support Google Login.

@wpmobilebot
Copy link
Copy Markdown
Contributor

wpmobilebot commented Nov 7, 2022

WordPress📲 You can test these changes on WordPress by downloading wordpress-installable-build-pr17432-eb837a0.apk
💡 Scan this QR code with your Android phone to download and install the APK directly on it.
AppWordPress
Build FlavorJalapeno
Build TypeDebug
Commiteb837a0
Note: This installable build uses the JalapenoDebug build flavor, and does not support Google Login.

1.Updates the Jetpack overlay xml name
2.Adds the click logic to jetpack overlay
1. Updates Jetpack connected feature enum class
2. Adds Overlay screen type to keep track of which screen to be shown
3. Updates the References of Screen type in viewmodel and tests
4. Adds logic for storing the timestamp in which the feature was shown
…llscreen-overlay

# Conflicts:
#	WordPress/src/main/res/values/strings.xml
Copy link
Copy Markdown
Contributor

@zwarm zwarm left a comment

Choose a reason for hiding this comment

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

👋 @AjeshRPai - I took a first pass at the code and have a few small comments. I need to dig in deeper into the "shown" logic and dates. I'll give that a go during my next review, but wanted to give you enough to keep moving.

I'm impressed with the work so far. 👏 ❤️

See below for preliminary comments

  • Should .idea/checkstyle-idea.xml be checked in or should this be removed from the PR?
  • Nit: Run a reformat code on the android:id="@+id/caption" TextView in jetpack_feature_removal_overlay
  • In JetpackFeatureFullScreenOverlayFragment how do you feel about replacing
    private val binding get() = _binding!!.
    with
    private val binding get() = _binding ?: throw NullPointerException("_binding cannot be null")
    to eliminate the double bang (!!)
  • Also in JetpackFeatureFullScreenOverlayFragment, wdyt about making the rtlLayout fun name a little bit clearer. The fun is not only checking the rtl is true/false, but also is setting the layoutDirection of the view. BTW: There is a RtlUtils that has a static method called isRtl. Hard to test without a wrapper and may not be worth it to change, but just thought I'd mention it.
  • In JetpackBrandingUtils - I don't think you added any changes other than the "," at the end of the private val analyticsTrackerWrapper: AnalyticsTrackerWrapper,. Did you intend to add something here? If not, want to revert this file.

@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Nov 17, 2022

Warnings
⚠️ PR has more than 300 lines of code changing. Consider splitting into smaller PRs if possible.

Generated by 🚫 dangerJS

@AjeshRPai AjeshRPai added 1 and removed 1 labels Nov 17, 2022
@AjeshRPai
Copy link
Copy Markdown
Contributor Author

@JB184351 @shaunandrews @zwarm 👋🏼

👀 This PR is ready for a re-review now. I have

  • Removed the swipe to dismiss logic
  • Added the dismiss button
  • Removed the testing logic

@JB184351
In order to test the overlay frequency logic you can use the Draft PR - #17475

In addition to the PR, the tests for the frequency logic exist in the class JetpackFeatureRemovalOverlayUtilTest

cc:@zwarm

@AjeshRPai AjeshRPai requested a review from zwarm November 18, 2022 07:04
@shaunandrews
Copy link
Copy Markdown

With the "X" close button added, I noticed that it doesn't line up with the rest of the screen:

CleanShot 2022-11-18 at 14 13 20@2x


I also looked a little closer at the colors for the button, and it seems they're using a lighter green which produces a contrast issue:

CleanShot 2022-11-18 at 14 12 05@2x

In the designs we're using jetpack-green-50 (#8710) for the greens.

@enejb
Copy link
Copy Markdown
Contributor

enejb commented Nov 18, 2022

@AjeshRPai jetpack-green-50 has a hex value of #008710

@AjeshRPai
Copy link
Copy Markdown
Contributor Author

AjeshRPai commented Nov 21, 2022

@shaunandrews Thanks for reviewing the PR.

@enejb Thanks for providing the jetpack-green-50 values.

I have updated the UI with

  • Aligning the close button with the rest of the screen

Screenshot_20221121-145122

  • Updated the colour of the Primary button and the text in the secondary button jetpack-green-50
Secondary button text colour Primary button colour background
Screenshot_20221121-150338 Screenshot_20221121-150345

Commit - 1ce8fe5

In case anyone is wondering how I checked the alignment and colour of the elements in the UI - I am using this app on my physical device to check the alignment and colour of the elements as shown on the screenshot.

Copy link
Copy Markdown
Contributor

@zwarm zwarm left a comment

Choose a reason for hiding this comment

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

@AjeshRPai - with the exception of landscape mode, all is working as expected.
I ran all the unit tests + manual testing on a device (WP & JP)

Thanks for all the great work 👍

@osullivanchris
Copy link
Copy Markdown

Alignment and color looks good in the updated screenshots, thanks @AjeshRPai 👍

…llscreen-overlay

# Conflicts:
#	WordPress/src/main/res/values/strings.xml
@AjeshRPai AjeshRPai enabled auto-merge November 22, 2022 18:01
@AjeshRPai AjeshRPai merged commit 5434beb into trunk Nov 22, 2022
@AjeshRPai AjeshRPai deleted the issue/17330-jetpack-focus-create-generic-fullscreen-overlay branch November 22, 2022 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Jetpack [Status] Needs Design Review A designer needs to sign off on the implemented design.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Jetpack Focus: Create a generic fullscreen overlay

8 participants