Skip to content

Jetpack Focus: Show open web links with Jetpack Overlay from deep link intent receiver#17532

Merged
develric merged 22 commits intotrunkfrom
issue/17494-open-weblinks-with-jetpack-dialog
Nov 24, 2022
Merged

Jetpack Focus: Show open web links with Jetpack Overlay from deep link intent receiver#17532
develric merged 22 commits intotrunkfrom
issue/17494-open-weblinks-with-jetpack-dialog

Conversation

@zwarm
Copy link
Copy Markdown
Contributor

@zwarm zwarm commented Nov 24, 2022

Parent #17494

This PR shows the Open web links with Jetpack Overlay screen Only from Deep Link Intent. Launching from ReaderPostPagerActivity may possibly be handled in a separate PR, as it's quite a bit more complicated (It's not a Hilt activity/vm situation)

In this PR are the following modifications:

  • Changed DeepLinkIntentReceiverActivity to a HiltEntryPoint
  • Changed DeepLinkIntentReceiverViewModel to a HiltViewModel
  • Include support for "Open Web Links with Jetpack" into the JetpackFeatureFullScreenOverlay fragment/viewmodel, as well as supporting classes (build ui/content state)
  • Add new strings - copy tbd
  • Add methods to AppPrefs\AppPrefsWrapper for setting the overlayShown timestamp
  • Add new NavigationAction

To test:
Pre: Download the links_helper.zip file from this #17495

Test: Ensure that deep links are handled as normal

  • Uninstall all previous versions of JP & WP
  • Install the WP apk from this PR and login
  • Enable the pre-alpha app to handle verified web links links. On a pixel device you will find this under Open By Default > Tap + Add Link > Check all three checkboxes and then click Add.
  • Open the links_helper.html in a browser
  • Tap on the "WordPress.com Stats 1234" link
  • ✅ Verify that the WordPress app was launched
  • Navigate back to the links_helper.html
  • Tap on the "Wordpress Navigations" link under the Prealpha Version Links
  • ✅ Verify that the WordPress app was launched

Test: Ensure that overlay is shown and dismiss works

  • Go to My Site -> Me -> App Settings -> Debug settings.
  • Enable open_web_lnks_with_jetpack_flow and restart the app
  • Navigate to Me -> App Settings
  • Disable the Open web links with Jetpack setting if it is showing
  • Open the links_helper.html in a browser
  • Tap on the "WordPress.com Stats 1234" link
  • ✅ Verify that the Open Web Links with Jetpack overlay is shown
  • Tap the Continue with Jetpack link
  • ✅ Verify that the overlay is dismissed and you are deep linked into the stat view

Test: Ensure that overlay is shown and close works

  • Follow the steps in "Test: Ensure that overlay is shown and dismiss works", stopping after the first verify
  • Tap the "X' to close the overlay
  • ✅ Verify that the overlay is dismissed and you are deep linked into the stat view

Test: Ensure that you are forwarded to Jetpack and app setting has been set properly

  • Download, install and log in to the JP app from this PR
  • Launch WP
  • Open the links_helper.html in a browser
  • Tap on the "WordPress.com Stats 1234" link
  • ✅ Verify that the Open Web Links with Jetpack overlay is shown
  • STOP HERE -> Enable the pre-alpha JP app to handle verified web links links. On a pixel device you will find this under Open By Default > Tap + Add Link > Check all three checkboxes and then click Add.
  • Go back to the WP app
  • Tap the "open with Jetpack" button to close the overlay and forward the user to JP
  • ✅ Verify that the overlay is dismissed and you are deep linked into the JP stat view
  • Navigate to Me -> App Settings
  • ✅ Verify the "Open web links with Jetpack" setting is enabled

Test: Ensure that values are cleared on logout & components are enabled

  • Uninstall all JP and WP apps
  • Install WP from this PR
  • Launch & Login to WP app
  • Enable the pre-alpha app to handle verified web links links. On a pixel device you will find this under Open By Default > Tap + Add Link > Check all three checkboxes and then click Add.
  • Go to My Site -> Me -> App Settings -> Debug settings.
  • Enable open_web_lnks_with_jetpack_flow and restart the app
  • Navigate to Me -> App Settings
  • Enable the Open web links with Jetpack setting
  • Navigate to Me
  • Log out of WordPress.com
  • Log back in
  • Navigate to Me -> App Settings
  • ✅ Verify the "Open web links with Jetpack" setting is disabled
  • Open the links_helper.html in a browser
  • Tap on the "WordPress.com Stats 1234" link
  • ✅ Verify that the Open Web Links with Jetpack overlay is shown

Regression Notes

  1. Potential unintended areas of impact
    The overlay is not shown

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

  3. What automated tests I added (or what prevented me from doing so)
    Hooked into existing overlay logic

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.

@zwarm zwarm requested a review from develric November 24, 2022 16:15
@zwarm zwarm self-assigned this Nov 24, 2022
@zwarm zwarm added this to the 21.3 milestone Nov 24, 2022
@wpmobilebot
Copy link
Copy Markdown
Contributor

wpmobilebot commented Nov 24, 2022

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

@wpmobilebot
Copy link
Copy Markdown
Contributor

wpmobilebot commented Nov 24, 2022

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

@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Nov 24, 2022

Warnings
⚠️ This PR is assigned to a milestone which is closing in less than 4 days Please, make sure to get it merged by then or assign it to a later expiring milestone
⚠️ PR has more than 300 lines of code changing. Consider splitting into smaller PRs if possible.

Generated by 🚫 dangerJS

@zwarm zwarm marked this pull request as ready for review November 24, 2022 18:26
Copy link
Copy Markdown
Contributor

@develric develric left a comment

Choose a reason for hiding this comment

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

Works as per steps, and code LGTM. Good job @zwarm 👍 !

@develric develric merged commit a0b025a into trunk Nov 24, 2022
@develric develric deleted the issue/17494-open-weblinks-with-jetpack-dialog branch November 24, 2022 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants