Skip to content

Conversation

@hassaanelgarem
Copy link
Contributor

Closes #19450

Description

This PR builds on #19782 and #19785 and implements analytics tracking for the menu card

Testing Instructions

  1. Go to JetpackBrandingMenuCardPresenter.swift line 123
  2. Change the value of secondsInDay to any small value, 1, for example
  3. Run the app
  4. Make sure that only the "Jetpack Features Removal Phase Three" flag is enabled from the debug menu
  5. Kill the app
  6. Launch the app
  7. The menu card should be displayed
  8. Check logs for the event remove_feature_card_displayed
  9. Tap anywhere on the card to display the overlay
  10. Check logs for the event remove_feature_card_tapped
  11. Dismiss the overlay
  12. Tap on the learn more button
  13. Check logs for the event remove_feature_card_link_tapped
  14. Dismiss the web view
  15. Tap on the ellipsis button
  16. Check logs for the event remove_feature_card_menu_accessed
  17. Tap on "Remind me later"
  18. Check logs for the event remove_feature_card_remind_later_tapped
  19. Wait for the duration to pass (If you set secondsInDay to 1, then wait for 7 seconds)
  20. Kill and relaunch the app
  21. The menu card should be displayed
  22. Tap on the ellipsis button
  23. Tap on "Hide this"
  24. Check logs for the event remove_feature_card_hide_tapped

Regression Notes

  1. Potential unintended areas of impact
    N/A

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

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

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes.
  • 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.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Dec 16, 2022

You can test the changes in Jetpack from this Pull Request by:
  • Clicking here or scanning the QR code below to access App Center
  • Then installing the build number pr19786-5baf666 on your iPhone

If you need access to App Center, please ask a maintainer to add you.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Dec 16, 2022

You can test the changes in WordPress from this Pull Request by:
  • Clicking here or scanning the QR code below to access App Center
  • Then installing the build number pr19786-5baf666 on your iPhone

If you need access to App Center, please ask a maintainer to add you.

Copy link
Contributor

@momo-ozawa momo-ozawa 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 described, but the unit tests in JetpackBrandingMenuCardPresenterTests are failing because the phase doesn't get updated properly

private let persistenceStore: UserPersistentRepository
private let featureFlagStore: RemoteFeatureFlagStore
private let currentDateProvider: CurrentDateProvider
private let phase: JetpackFeaturesRemovalCoordinator.GeneralPhase
Copy link
Contributor

Choose a reason for hiding this comment

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

The unit tests for this class are failing because the phase doesn't get updated when you do remoteFeatureFlagsStore.removalPhaseX = true

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now that I think about this, other than the tests, if the phase changes, we'll have to refresh the presenter to carry the correct value. So given that, I think it's best to revert this change altogether.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in 9dc4c28
Let me know what you think!

Copy link
Contributor

Choose a reason for hiding this comment

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

So given that, I think it's best to revert this change altogether.

Agreed!

Base automatically changed from task/19450-phase-3-card-actions to trunk December 19, 2022 19:32
@hassaanelgarem hassaanelgarem merged commit d504a59 into trunk Dec 20, 2022
@hassaanelgarem hassaanelgarem deleted the task/19450-phase-3-card-analytics branch December 20, 2022 12:27
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.

Jetpack Focus: Add Jetpack features card to the Menu screen

4 participants