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

RUM-721 treat scroll on non scrollable view as tap #1622

Merged
merged 4 commits into from
Sep 19, 2023

Conversation

xgouchet
Copy link
Member

What does this PR do?

A brief description of the change being made with this pull request.

Motivation

What inspired you to submit this pull request?

Additional Notes

Anything else we should know when reviewing?

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)

@codecov-commenter
Copy link

codecov-commenter commented Sep 18, 2023

Codecov Report

Merging #1622 (f3c6383) into develop (206dcd2) will decrease coverage by 0.05%.
Report is 2 commits behind head on develop.
The diff coverage is 83.33%.

@@             Coverage Diff             @@
##           develop    #1622      +/-   ##
===========================================
- Coverage    83.57%   83.52%   -0.05%     
===========================================
  Files          452      452              
  Lines        15652    15661       +9     
  Branches      2324     2326       +2     
===========================================
- Hits         13081    13080       -1     
- Misses        1950     1955       +5     
- Partials       621      626       +5     
Files Changed Coverage Δ
...essionreplay/internal/recorder/LayerDrawableExt.kt 100.00% <ø> (ø)
...ernal/instrumentation/gestures/GesturesListener.kt 93.06% <83.33%> (-0.28%) ⬇️

... and 25 files with indirect coverage changes

mariusc83
mariusc83 previously approved these changes Sep 18, 2023
@xgouchet xgouchet force-pushed the xgouchet/RUM-721/detect_scrolling_tap branch from 3dd49a3 to 1a96e81 Compare September 18, 2023 11:26
@xgouchet xgouchet force-pushed the xgouchet/RUM-721/detect_scrolling_tap branch from 1a96e81 to ed67bed Compare September 18, 2023 11:49
@@ -336,6 +337,17 @@ tasks.register("printSdkDebugRuntimeClasspath") {
result += File(androidJarFilePath.joinToString(File.separator))
}

val envSdkHome = System.getenv("ANDROID_SDK_ROOT")
Copy link
Member Author

Choose a reason for hiding this comment

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

This ensures that in CI (where no local.properties file exists) we still include the android.jar for type resolution.

@@ -280,7 +300,8 @@ internal class GesturesListener(

private fun isScrollableView(view: View): Boolean {
return ScrollingView::class.java.isAssignableFrom(view.javaClass) ||
AbsListView::class.java.isAssignableFrom(view.javaClass)
AbsListView::class.java.isAssignableFrom(view.javaClass) ||
ScrollView::class.java.isAssignableFrom(view.javaClass)
Copy link
Member Author

Choose a reason for hiding this comment

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

This one was missing from our supported Views

@xgouchet xgouchet marked this pull request as ready for review September 18, 2023 11:57
@xgouchet xgouchet requested a review from a team as a code owner September 18, 2023 11:57
@xgouchet xgouchet changed the title Update shared static analysis pipeline RUM-721 treat scroll on non scrollable view as tap Sep 18, 2023
@xgouchet xgouchet requested a review from mariusc83 September 18, 2023 15:26
mariusc83
mariusc83 previously approved these changes Sep 19, 2023
Copy link
Member

@mariusc83 mariusc83 left a comment

Choose a reason for hiding this comment

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

Nicely done

0xnm
0xnm previously approved these changes Sep 19, 2023
Copy link
Member

@0xnm 0xnm left a comment

Choose a reason for hiding this comment

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

lgtm! I've added few suggestions.


if (downTarget == upTarget && downTarget != null) {
Copy link
Member

Choose a reason for hiding this comment

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

I would suggest to use === operator here to highlight that we want exactly same instance by reference (because who knows, maybe it will be some View which redefines equals).

GesturesListener.SCROLL_DIRECTION_RIGHT
]
)
fun `M send a tap rum event if target is a non scrollabld`(
Copy link
Member

Choose a reason for hiding this comment

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

typo here, should be scrollable (I don't have suggestion button available, because reviewing individual commit)

jonathanmos
jonathanmos previously approved these changes Sep 19, 2023
@xgouchet xgouchet merged commit 85087f3 into develop Sep 19, 2023
@xgouchet xgouchet deleted the xgouchet/RUM-721/detect_scrolling_tap branch September 19, 2023 11:46
@xgouchet
Copy link
Member Author

This fixes #1389

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.

5 participants