Jetpack Focus: Open web links with Jetpack - Update App pref setting#17514
Jetpack Focus: Open web links with Jetpack - Update App pref setting#17514
Conversation
…pack app setting. Add helper method for enableDisableOpenWithJetpackComponents'
|
|||||||||||
| 💡 Scan this QR code with your Android phone to download and install the APK directly on it. | ||
| App | WordPress | |
| Build Flavor | Jalapeno | |
| Build Type | Debug | |
| Commit | f39db35 | |
|
|||||||||||
| 💡 Scan this QR code with your Android phone to download and install the APK directly on it. | ||
| App | Jetpack | |
| Build Flavor | Jalapeno | |
| Build Type | Debug | |
| Commit | f39db35 | |
| try { | ||
| mOpenWebLinksWithJetpackHelper.enableDisableOpenWithJetpackComponents(newValue); | ||
| } catch (Exception e) { | ||
| ToastUtils.showToast( | ||
| getActivity(), | ||
| (newValue ? R.string.preference_open_web_links_with_jetpack_setting_change_enable_error | ||
| : R.string.preference_open_web_links_with_jetpack_setting_change_disable_error), | ||
| ToastUtils.Duration.LONG); | ||
| AppLog.e(AppLog.T.UTILS, "Unable to enable or disable open with Jetpack components ", e); | ||
| } | ||
| } |
There was a problem hiding this comment.
Since this can fail, wonder if we should AppPrefs.setIsOpenWebLinksWithJetpack here based on the success/fail result. Since the feature is disabled behind a feature flag we can also address this in one of the upcoming PRs in case you think what I said makes sense 🙇 .
develric
left a comment
There was a problem hiding this comment.
Thanks for the PR and the detailed test steps (super straightforward to follow 🙇 )! Works as described and code LGTM. Just left a comment inline (let me know if it makes sense, and we can address also in subsequent PRs since all is behind a FF for now). I'll wait for the minor checkstyle issue to be fixed and your follow up, but for all the rest this is good to land 👍 !
…ter it is determined if we could change the component setting
develric
left a comment
There was a problem hiding this comment.
Thanks for the changes 🙇 ! I'm merging it 👍 !


Parent #17494
This PR changes the way the
DeepLinkOpenWebLinksWithJetpackHelperdetermines when to show the overlay. Instead of relying on the activity component to be enabled, a new app pref was added to manage the value. Also included in this PR is the logic to enable/disable the actual deep link component. A future PR will add the functionality to update the setting based on the overlay yes/no response.This setting is only visible:
Note: had to comment out the following unused methods to pass ci checks. This will be uncommented in the next PR.
setOpenWebLinksWithJetpackOverlayLastShownTimestampTo test:
##Test: Setting is not shown when Feature Flag is enabled and JP is not installed##
##Test: Setting is not shown when Feature Flag is disabled and JP is not installed##
##Test: Setting is not shown within the JP app when FF is enabled##
##Test: Setting is shown within the WP app when FF is enabled and JP is installed##
Regression Notes
Potential unintended areas of impact
The app showing shows when it shouldn't
What I did to test those areas of impact (or what existing automated tests I relied on)
Manual and unit testing
What automated tests I added (or what prevented me from doing so)
Add new tests to
DeepLinkOpenWebLinksWithJetpackHelperTestPR submission checklist:
RELEASE-NOTES.txtif necessary.