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-1379] heatmaps: enable descendant combined selectors #1811

Merged

Conversation

BenoitZugmeyer
Copy link
Member

@BenoitZugmeyer BenoitZugmeyer commented Nov 7, 2022

Motivation

After experimenting with #1741 , we chose to keep only one of the two experiments.

Changes

This PR promote the experimental selector as the default one, and does a bit of cleanup and redesign.

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

@BenoitZugmeyer BenoitZugmeyer marked this pull request as ready for review November 7, 2022 18:12
@BenoitZugmeyer BenoitZugmeyer requested a review from a team as a code owner November 7, 2022 18:12
@BenoitZugmeyer BenoitZugmeyer changed the title ⚗️✨ [RUMF-1379] replay: enable descendant combined selectors ⚗️✨ [RUMF-1379] heatmaps: enable descendant combined selectors Nov 8, 2022
When the element is the only one from its type within its siblings, the
`getTagNameSelector` strategy used in
UNIQUE_AMONG_CHILDREN_SELECTOR_GETTERS will succeed and
`uniqueSelectorAmongChildren` will be defined.

Thus,`getPositionSelector` will only be used when the tag name is not
unique, so we don't need to check for tag name unicity again. This logic
has been removed.

Finally, we don't need to use `getTagNameSelector` once again, since
`getPositionSelector` will always return a selector. This useless call
has been removed.
@amortemousque
Copy link
Collaborator

👏 praise: ‏Very good job on this whole topic!

@codecov-commenter
Copy link

Codecov Report

Merging #1811 (520f269) into main (ee460d6) will increase coverage by 0.06%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1811      +/-   ##
==========================================
+ Coverage   93.15%   93.22%   +0.06%     
==========================================
  Files         130      130              
  Lines        5057     5049       -8     
  Branches     1131     1127       -4     
==========================================
- Hits         4711     4707       -4     
+ Misses        346      342       -4     
Impacted Files Coverage Δ
...mEventsCollection/action/getSelectorFromElement.ts 98.59% <100.00%> (ø)
...in/rumEventsCollection/action/trackClickActions.ts 98.18% <100.00%> (ø)
...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

@BenoitZugmeyer BenoitZugmeyer merged commit 734d3ad into main Nov 9, 2022
@BenoitZugmeyer BenoitZugmeyer deleted the benoit/heatmap--enable-child-compound-selectors branch November 9, 2022 09: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.

5 participants