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

🐛 [RUMF-1344] try to improve document scrolling element handling #1688

Merged
merged 3 commits into from
Aug 11, 2022

Conversation

bcaudan
Copy link
Contributor

@bcaudan bcaudan commented Aug 11, 2022

Motivation

Following #1680, some telemetry events show that some documents seems to lack scrolling element:

  • specific debug log: 'unable to find document scrolling element'
  • error on setting null as a weak map key

I have not been able to reproduce the behavior while going on available customer pages.

Changes

  • access document.scrollingElement only on document scroll
  • try to fallback on document.documentElement
  • improve logging

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

@bcaudan bcaudan requested review from a team as code owners August 11, 2022 13:46
@codecov-commenter
Copy link

codecov-commenter commented Aug 11, 2022

Codecov Report

Merging #1688 (0c65a8d) into main (1a8d1cf) will decrease coverage by 0.30%.
The diff coverage is 19.04%.

@@            Coverage Diff             @@
##             main    #1688      +/-   ##
==========================================
- Coverage   90.75%   90.45%   -0.31%     
==========================================
  Files         128      128              
  Lines        4739     4755      +16     
  Branches     1059     1065       +6     
==========================================
  Hits         4301     4301              
- Misses        438      454      +16     
Impacted Files Coverage Δ
...s/rum/src/domain/record/elementsScrollPositions.ts 41.37% <19.04%> (-50.93%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@liywjl liywjl left a comment

Choose a reason for hiding this comment

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

Unit tests might be worth adding

@bcaudan bcaudan merged commit fba33d2 into main Aug 11, 2022
@bcaudan bcaudan deleted the bcaudan/scroll-telemetry-2 branch August 11, 2022 15:03
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