Skip to content

RUM-9309: Add ActionTrackingStrategy Interface to decouple find view logic#2573

Merged
ambushwork merged 1 commit into
feature/actions-trackingfrom
yl/track-actions/add-strategy-interface
Apr 1, 2025
Merged

RUM-9309: Add ActionTrackingStrategy Interface to decouple find view logic#2573
ambushwork merged 1 commit into
feature/actions-trackingfrom
yl/track-actions/add-strategy-interface

Conversation

@ambushwork

Copy link
Copy Markdown
Member

What does this PR do?

Prior to this PR, GesturesListener is coupled with Android View framework to find a target view of user interaction, making it difficult to extend to Jetpack Compose.

To make the Jetpack compose view finding possible within GesturesListener, this PR adds an interface called ActionTrackingStrategy, and move all the Android View framework logic from GestureListener into the AndroidActionTrackingStrategy implementation. This change makes GesturesListener agnostic about the view framework, prepares for the Compose actions tracking integration

Motivation

RUM-9309

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@ambushwork
ambushwork force-pushed the yl/track-actions/add-strategy-interface branch 3 times, most recently from f7200e8 to 74a86c6 Compare March 31, 2025 15:00
@ambushwork
ambushwork marked this pull request as ready for review March 31, 2025 15:06
@ambushwork
ambushwork requested review from a team as code owners March 31, 2025 15:06
@ambushwork
ambushwork force-pushed the yl/track-actions/add-strategy-interface branch from 74a86c6 to ce33c49 Compare March 31, 2025 15:23
0xnm
0xnm previously approved these changes Apr 1, 2025
@ambushwork
ambushwork dismissed stale reviews from 0xnm and aleksandr-gringauz via 26d59ac April 1, 2025 07:29
@ambushwork
ambushwork force-pushed the yl/track-actions/add-strategy-interface branch 2 times, most recently from 26d59ac to 20d35be Compare April 1, 2025 07:47
@ambushwork
ambushwork changed the base branch from develop to feature/actions-tracking April 1, 2025 07:53
jonathanmos
jonathanmos previously approved these changes Apr 1, 2025
0xnm
0xnm previously approved these changes Apr 1, 2025
mariusc83
mariusc83 previously approved these changes Apr 1, 2025
@ambushwork
ambushwork dismissed stale reviews from mariusc83, 0xnm, and jonathanmos via 019fe4c April 1, 2025 08:55
@ambushwork
ambushwork force-pushed the yl/track-actions/add-strategy-interface branch from 20d35be to 019fe4c Compare April 1, 2025 08:55
0xnm
0xnm previously approved these changes Apr 1, 2025
@ambushwork
ambushwork force-pushed the yl/track-actions/add-strategy-interface branch from 019fe4c to 4efc5e4 Compare April 1, 2025 09:02
@codecov-commenter

codecov-commenter commented Apr 1, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.68293% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.16%. Comparing base (8464f0f) to head (4efc5e4).

Files with missing lines Patch % Lines
...ernal/instrumentation/gestures/GesturesListener.kt 83.33% 0 Missing and 4 partials ⚠️
...entation/gestures/AndroidActionTrackingStrategy.kt 96.43% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@                     Coverage Diff                      @@
##           feature/actions-tracking    #2573      +/-   ##
============================================================
- Coverage                     70.31%   70.16%   -0.15%     
============================================================
  Files                           804      806       +2     
  Lines                         30196    30212      +16     
  Branches                       5050     5050              
============================================================
- Hits                          21230    21197      -33     
- Misses                         7587     7610      +23     
- Partials                       1379     1405      +26     
Files with missing lines Coverage Δ
...lin/com/datadog/android/rum/tracking/ViewTarget.kt 100.00% <100.00%> (ø)
...entation/gestures/AndroidActionTrackingStrategy.kt 96.43% <96.43%> (ø)
...ernal/instrumentation/gestures/GesturesListener.kt 91.35% <83.33%> (-2.49%) ⬇️

... and 26 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ambushwork
ambushwork merged commit 9aa11a6 into feature/actions-tracking Apr 1, 2025
@ambushwork
ambushwork deleted the yl/track-actions/add-strategy-interface branch April 1, 2025 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants