Skip to content

Do not merge - Only here to trigger build for testing Overlay frequency logic in the PR #17475

Closed
AjeshRPai wants to merge 12 commits intotrunkfrom
issue/17330-jetpack-focus-create-generic-fullscreen-overlay-testing
Closed

Do not merge - Only here to trigger build for testing Overlay frequency logic in the PR #17475
AjeshRPai wants to merge 12 commits intotrunkfrom
issue/17330-jetpack-focus-create-generic-fullscreen-overlay-testing

Conversation

@AjeshRPai
Copy link
Copy Markdown
Contributor

@AjeshRPai AjeshRPai commented Nov 17, 2022

Part of #17330

This PR is for testing the overlay frequency logic introduced as part of the #17432.

To test:

Regression Notes

  1. Potential unintended areas of impact

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

  3. What automated tests I added (or what prevented me from doing so)

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.

…rlay' into issue/17330-jetpack-focus-create-generic-fullscreen-overlay-testing
…rlay' into issue/17330-jetpack-focus-create-generic-fullscreen-overlay-testing

# Conflicts:
#	WordPress/src/main/java/org/wordpress/android/ui/jetpackoverlay/JetpackFeatureRemovalOverlayUtil.kt
…rlay' into issue/17330-jetpack-focus-create-generic-fullscreen-overlay-testing
@AjeshRPai AjeshRPai self-assigned this Nov 17, 2022
@AjeshRPai AjeshRPai changed the title Issue/17330 jetpack focus create generic fullscreen overlay testing Do not merge - Only here to trigger build for testing Overlay frequency in #17330 Nov 17, 2022
@AjeshRPai AjeshRPai changed the title Do not merge - Only here to trigger build for testing Overlay frequency in #17330 Do not merge - Only here to trigger build for testing Overlay frequency logic in the PR https://github.com/wordpress-mobile/WordPress-Android/pull/17432 Nov 17, 2022
@AjeshRPai AjeshRPai changed the title Do not merge - Only here to trigger build for testing Overlay frequency logic in the PR https://github.com/wordpress-mobile/WordPress-Android/pull/17432 Do not merge - Only here to trigger build for testing Overlay frequency logic in the [PR](https://github.com/wordpress-mobile/WordPress-Android/pull/17432) Nov 17, 2022
@AjeshRPai AjeshRPai changed the title Do not merge - Only here to trigger build for testing Overlay frequency logic in the [PR](https://github.com/wordpress-mobile/WordPress-Android/pull/17432) Do not merge - Only here to trigger build for testing Overlay frequency logic in the PR Nov 17, 2022
@wpmobilebot
Copy link
Copy Markdown
Contributor

wpmobilebot commented Nov 17, 2022

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

@wpmobilebot
Copy link
Copy Markdown
Contributor

wpmobilebot commented Nov 17, 2022

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

@AjeshRPai AjeshRPai requested a review from JB184351 November 17, 2022 18:44
setFeatureAccessedOn(3, JetpackOverlayConnectedFeature.STATS)
setFeatureAccessedOn(2, JetpackOverlayConnectedFeature.NOTIFICATIONS)
setFeatureAccessedOn(4, JetpackOverlayConnectedFeature.READER)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@JB184351 you can comment out or change the values on these lines to test the frequency logic.

Let me know if you need any additional info

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Awesome, thank you! Will do that today!

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I'm trying to change the values but I don't see it applying, I'm not used to running Android Studio so maybe I'm doing something wrong there, but should running the app again apply the code changes? I'm seeing different options that might enable these changes. @AjeshRPai

Copy link
Copy Markdown
Contributor Author

@AjeshRPai AjeshRPai Nov 17, 2022

Choose a reason for hiding this comment

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

Hey @JB184351

but should running the app again apply the code changes?

I am sorry for not giving you more info.

When u want to change the values. You might have to run the app by

  1. commenting the lines from 118-120
  2. uncomment the line 123 // jetpackFeatureOverlayShownTracker.clear()
  3. run the app.

This will clear all the values. Then to change the values(when the feature was last accessed) , do the reverse.

  1. Uncomment lines from 118-120
  2. Comment line 123

You can comment or uncomment the code by putting "//" before each line.

Let me know if you want more information or any help with it

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ok, I tried this uncommenting line 123 for when trying to change values but I get this error trying to run the app.
Screen Shot 2022-11-17 at 1 30 16 PM

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@JB184351 So sorry for that. Sometimes I make stupid mistakes. 😅 . I removed the jetpackFeatureOverlayShownTracker.clear() by mistake on this branch when I removed it from the Original PR. I have added it again with this commit.

Please take a pull of the changes

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ok I pulled it, so if I wanted to change the time to 2 minutes would I just changed the constant on line 22 to 120000L? Like this? private const val ONE_DAY_TIME_IN_MILLIS = 120000L? Though it looks like it's taking the current system time into account when making the calculation as well. @AjeshRPai. Sorry for all the questions 😅

Copy link
Copy Markdown
Contributor Author

@AjeshRPai AjeshRPai Nov 17, 2022

Choose a reason for hiding this comment

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

Sorry for all the questions

No worries Justin.

So In Android, we have kept the frequency of the overlay logic in days. So it's not possible to check the overlay logic using Minutes/Seconds logic as in IOS. What we can do here is to change the date on which the overlay was last shown.

The first parameter in setFeatureAccessedOn is the no of days elapsed since the feature overlay was shown). So 3 means, it's been 3 days since the feature was accessed. This way when the app launches(the feature-specific overlay for the first phase is 2 days)the feature-specific overlay should be shown as per our requirements.

setFeatureAccessedOn(3(days since overlay was shown), JetpackOverlayConnectedFeature.STATS(feature which was accessed)) setFeatureAccessedOn(2, JetpackOverlayConnectedFeature.NOTIFICATIONS) setFeatureAccessedOn(4, JetpackOverlayConnectedFeature.READER)

Let me know if this makes sense/ if you need any additional info.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

mmm ok, so how would I change it to be only 1 day? Would I just change this variable val featureAccessedMockedTimeinMillis = (System.currentTimeMillis() - (noOfDaysPastFeatureAccessed * ONE_DAY_TIME_IN_MILLIS)) to val featureAccessedMockedTimeinMillis = (System.currentTimeMillis() - (ONE_DAY_TIME_IN_MILLIS))?

Base automatically changed from issue/17330-jetpack-focus-create-generic-fullscreen-overlay to trunk November 22, 2022 18:17
@AjeshRPai
Copy link
Copy Markdown
Contributor Author

Closing this PR as this PR was only for testing #17432. #17432 has been approved and merged

@AjeshRPai AjeshRPai closed this Nov 22, 2022
@AjeshRPai AjeshRPai deleted the issue/17330-jetpack-focus-create-generic-fullscreen-overlay-testing branch November 23, 2022 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants