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

🐛 fix frustration animation in session replay #1999

Conversation

BenoitZugmeyer
Copy link
Member

@BenoitZugmeyer BenoitZugmeyer commented Feb 6, 2023

Motivation

Frustration records used to reference MouseInteraction/Click records. Since Click Actions are now generated based on mouseup events, we broke this reference. There is no MouseInteraction/PointerUp record that Frustration can reference.

Changes

This commit is a quick fix. It changes how we are generating MouseInteraction/MouseUp records: instead of listening to mouseup DOM events, we now listen to pointerup events, allowing Frustration records to reference MouseInteraction/MouseUp records.

This works on the player side without any modification.

In the context of supporting Mobile Session Replay, we introduced PointerInteraction records used by the Mobile SDKs in place of MouseInteraction. In the future, it would be great to replace MouseInteraction by PointerInteraction in the Browser SDK so we have an uniform way to convey such interaction. This would cleanly solve the issue since we would have PointerInteraction/Up records that we could reference from Frustration records.

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

@codecov-commenter
Copy link

codecov-commenter commented Feb 6, 2023

Codecov Report

Merging #1999 (67ad27b) into main (a4d336c) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1999      +/-   ##
==========================================
- Coverage   93.50%   93.49%   -0.02%     
==========================================
  Files         145      145              
  Lines        5515     5515              
  Branches     1258     1258              
==========================================
- Hits         5157     5156       -1     
- Misses        358      359       +1     
Impacted Files Coverage Δ
packages/rum/src/domain/record/observers.ts 81.86% <100.00%> (ø)
...s/rum-core/src/domain/contexts/pageStateHistory.ts 80.48% <0.00%> (-12.20%) ⬇️
...rum-core/src/domain/contexts/foregroundContexts.ts 96.92% <0.00%> (+6.15%) ⬆️

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

Frustration records used to reference MouseInteraction/Click records.
Since Click Actions are now generated based on mouseup events, we broke
this reference. There is no MouseInteraction/PointerUp record that
Frustration can reference.

This commit is a quick fix. It changes how we are generating
MouseInteraction/MouseUp records: instead of listening to mouseup DOM
events, we now listen to pointerup events, allowing Frustration records
to reference MouseInteraction/MouseUp records.

This works on the player side without any modification.

In the context of supporting Mobile Session Replay, we introduced
`PointerInteraction` records used by the Mobile SDKs in place of
`MouseInteraction`. In the future, it would be great to replace
`MouseInteraction` by `PointerInteraction` in the Browser SDK so we have
an uniform way to convey such interaction. This would cleanly solve the
issue since we would have `PointerInteraction/Up` records that we could
reference from `Frustration` records.
@BenoitZugmeyer BenoitZugmeyer force-pushed the benoit/frustration-signals--fix-replay-frustration-animation branch from 92794a8 to 864ff6c Compare February 6, 2023 15:53
@BenoitZugmeyer BenoitZugmeyer marked this pull request as ready for review February 6, 2023 16:06
@BenoitZugmeyer BenoitZugmeyer requested review from a team as code owners February 6, 2023 16:06
@N-Boutaib N-Boutaib requested a review from a team February 6, 2023 16:33
@BenoitZugmeyer BenoitZugmeyer merged commit 4fd5ebe into main Feb 7, 2023
@BenoitZugmeyer BenoitZugmeyer deleted the benoit/frustration-signals--fix-replay-frustration-animation branch February 7, 2023 13:16
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