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-96] Ignore frustrations on clicks resulting in scrolls #2669

Conversation

N-Boutaib
Copy link
Contributor

@N-Boutaib N-Boutaib commented Mar 25, 2024

Motivation

Currently, click on scrollbars, or more generally clicks resulting in page or element scrolling, are reported as dead_clicks or rage_clicks (if more than three clicks occurred).
This behaviour is misleading since those clicks did result in a change, which is the scrolling. Therefore, they shouldn't result in a frustration signal.

Changes

  • Add an event listener over scroll and report it to userActivity
  • Ignore clicks with scroll user activity from being reported as dead_clicks and rage_clicks

Warning

Clicks on scrollbar that do not result in a scroll event will still be reported as frustrations.

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

Copy link

cit-pr-commenter bot commented Mar 25, 2024

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫% Status
Rum 156.30 kB 156.45 kB +0.09%
Logs 55.28 kB 55.28 kB 0.00%
Rum Slim 101.86 kB 102.01 kB +0.14%
Worker 25.21 kB 25.21 kB 0.00%

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 71.42857% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 92.88%. Comparing base (5b2a992) to head (98e2005).
Report is 1 commits behind head on main.

Files Patch % Lines
...s/rum-core/src/domain/action/listenActionEvents.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2669      +/-   ##
==========================================
- Coverage   92.91%   92.88%   -0.03%     
==========================================
  Files         239      239              
  Lines        6943     6947       +4     
  Branches     1519     1520       +1     
==========================================
+ Hits         6451     6453       +2     
- Misses        492      494       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@N-Boutaib N-Boutaib force-pushed the najib.boutaib/RUM-96-ignore-frustrations-on-clicks-leading-to-scrolls branch from 98e2005 to 4a9e65d Compare March 25, 2024 13:15
@N-Boutaib N-Boutaib force-pushed the najib.boutaib/RUM-96-ignore-frustrations-on-clicks-leading-to-scrolls branch from 71226c9 to d9eb534 Compare March 26, 2024 15:17
@N-Boutaib N-Boutaib marked this pull request as ready for review March 27, 2024 09:23
@N-Boutaib N-Boutaib requested a review from a team as a code owner March 27, 2024 09:23
@N-Boutaib N-Boutaib changed the title [RUM-96] Ignore frustrations on clicks resulting in scrolls 🐛 [RUM-96] Ignore frustrations on clicks resulting in scrolls Mar 27, 2024
packages/rum-core/test/createFakeClick.ts Outdated Show resolved Hide resolved
@N-Boutaib N-Boutaib merged commit b4ed826 into main Mar 28, 2024
17 checks passed
@N-Boutaib N-Boutaib deleted the najib.boutaib/RUM-96-ignore-frustrations-on-clicks-leading-to-scrolls branch March 28, 2024 12:52
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.

4 participants