Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notifications add tracks events for inline actions #20182

Conversation

mkevins
Copy link
Contributor

@mkevins mkevins commented Feb 14, 2024

Fixes #20040

Description

This PR adds missing tracks events for notification inline actions. It should have been included in #20040, but it is written generally to address the tracking for all inline actions on notifications.


To Test:

  • Log in to the Jetpack app (with an account containing various notifications)
  • Tap the notifications tab
  • Scroll to a notification for a post like
  • Expect to see a share icon
  • Tap the share icon
  • Expect the share activity to launch
  • Expect the event to be tracked:

Logcat:

🔵 Tracked: notifications_inline_action_tapped, Properties: {\"inline_action\":\"SharePostButtonTapped\"}"

Regression Notes

  1. Potential unintended areas of impact

Notifications

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

Manual testing

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

More refactoring is needed to add unit tests.


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.

Testing Checklist:

  • WordPress.com sites and self-hosted Jetpack sites.
  • Portrait and landscape orientations.
  • Light and dark modes.
  • Fonts: Larger, smaller and bold text.
  • High contrast.
  • Talkback.
  • Languages with large words or with letters/accents not frequently used in English.
  • Right-to-left languages. (Even if translation isn’t complete, formatting should still respect the right-to-left layout)
  • Large and small screen sizes. (Tablet and smaller phones)
  • Multi-tasking: Split screen and Pop-up view. (Android 10 or higher)

@mkevins mkevins added this to the 24.3 milestone Feb 14, 2024
@mkevins mkevins requested review from antonis and jarvislin February 14, 2024 06:35
@mkevins mkevins changed the base branch from trunk to feature/notifications_refresh_p1 February 14, 2024 06:35
@wpmobilebot
Copy link
Contributor

Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr20182-70bb7ba
Commit70bb7ba
Direct Downloadjetpack-prototype-build-pr20182-70bb7ba.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr20182-70bb7ba
Commit70bb7ba
Direct Downloadwordpress-prototype-build-pr20182-70bb7ba.apk
Note: Google Login is not supported on these builds.

Copy link
Contributor

@antonis antonis left a comment

Choose a reason for hiding this comment

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

Great work @mkevins 👍
The code looks good and the event is tracked as expected 🎉

🔵 Tracked: notifications_inline_action_tapped, Properties: {\"inline_action\":\"SharePostButtonTapped\"}"

I think the above is more simpler than the jpandroid_notification_row_share_action from the spec (pc8HXX-1ua-p2) and can better support all the inline actions. I open a thread (p1707897223221329-slack-C06BWNSR02K) to update the spec with this approach.

Also left a suggestion for the detekt issue.

…/NotificationsListViewModel.kt


Fixes detekt issue
@dangermattic
Copy link
Collaborator

1 Warning
⚠️ This PR is assigned to the milestone 24.3. This milestone is due in less than 4 days.
Please make sure to get it merged by then or assign it to a milestone with a later deadline.

Generated by 🚫 Danger

…fications-add-tracks-event

# Conflicts:
#	WordPress/src/main/java/org/wordpress/android/ui/notifications/NotificationsListViewModel.kt
@antonis antonis merged commit 4131e88 into feature/notifications_refresh_p1 Feb 15, 2024
5 of 6 checks passed
@antonis antonis deleted the issue/20040-notifications-add-tracks-event branch February 15, 2024 13:39
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.

🤖 Share an own published post
4 participants