-
Notifications
You must be signed in to change notification settings - Fork 144
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-1297] frustration signals: track input changes #1603
Merged
BenoitZugmeyer
merged 8 commits into
main
from
benoit/frustration-signals--track-input-change
Jun 28, 2022
Merged
[RUMF-1297] frustration signals: track input changes #1603
BenoitZugmeyer
merged 8 commits into
main
from
benoit/frustration-signals--track-input-change
Jun 28, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ee96a62
to
3731db3
Compare
987264e
to
02a6df1
Compare
Codecov Report
@@ Coverage Diff @@
## main #1603 +/- ##
==========================================
+ Coverage 90.89% 90.92% +0.02%
==========================================
Files 126 126
Lines 4603 4615 +12
Branches 1029 1033 +4
==========================================
+ Hits 4184 4196 +12
Misses 419 419
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
Base automatically changed from
benoit/frustration-signals--track-selection-change-2
to
main
June 22, 2022 15:20
133efa0
to
d1e9ac4
Compare
The `listenActionEvents` will track more user activities than just selection changes. This commit does some groundwork to allow multiple user activities. It takes the future "input" constraint into account by using a function to get the user interaction a bit after the click occurs.
d1e9ac4
to
ed16a61
Compare
There will be more event listeners in the future, let's factorize the way we stop them.
ed16a61
to
bc5024f
Compare
bcaudan
approved these changes
Jun 27, 2022
packages/rum-core/src/domain/rumEventsCollection/action/listenActionEvents.ts
Outdated
Show resolved
Hide resolved
Comment on lines
+179
to
+203
createTest('do not consider a click on a checkbox as "dead_click"') | ||
.withRum({ trackFrustrations: true, enableExperimentalFeatures: ['frustration-signals'] }) | ||
.withBody(html` <input type="checkbox" /> `) | ||
.run(async ({ serverEvents }) => { | ||
const input = await $('input') | ||
await input.click() | ||
await flushEvents() | ||
const actionEvents = serverEvents.rumActions | ||
|
||
expect(actionEvents.length).toBe(1) | ||
expect(actionEvents[0].action.frustration!.type).toEqual([]) | ||
}) | ||
|
||
createTest('do not consider a click to change the value of a "range" input as "dead_click"') | ||
.withRum({ trackFrustrations: true, enableExperimentalFeatures: ['frustration-signals'] }) | ||
.withBody(html` <input type="range" /> `) | ||
.run(async ({ serverEvents }) => { | ||
const input = await $('input') | ||
await input.click({ x: 10 }) | ||
await flushEvents() | ||
const actionEvents = serverEvents.rumActions | ||
|
||
expect(actionEvents.length).toBe(1) | ||
expect(actionEvents[0].action.frustration!.type).toEqual([]) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏 praise: nice!
amortemousque
approved these changes
Jun 27, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Do not consider clicks that trigger an
input
event as dead.Changes
Testing
I have gone over the contributing documentation.