-
Notifications
You must be signed in to change notification settings - Fork 64
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-1613 Add mapper interface for traversing all children #1684
Conversation
0838ea9
to
74f29b3
Compare
Codecov Report
@@ Coverage Diff @@
## develop #1684 +/- ##
===========================================
+ Coverage 83.73% 83.79% +0.06%
===========================================
Files 459 459
Lines 15778 15781 +3
Branches 2354 2355 +1
===========================================
+ Hits 13211 13223 +12
+ Misses 1938 1933 -5
+ Partials 629 625 -4
|
...rc/main/kotlin/com/datadog/android/sessionreplay/internal/recorder/mapper/WireframeMapper.kt
Outdated
Show resolved
Hide resolved
9c42246
to
bd90c68
Compare
traversalStrategy = if (mapper is NonExhaustiveTypeMapper) { | ||
TraversalStrategy.TRAVERSE_ALL_CHILDREN |
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.
Note
I'm confused about the naming of the interface: It says the mapper is Non exhaustive, but it would imply using a TRAVERSE_ALL_CHILDREN
strategy. Can we be a bit more explicit about what is being non exhaustive here?
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.
Until now we've referred to mappers that return a node whenever they map to a specific class as being "exhaustive", and so the naming follows from this. How about "TraverseAllChildrenMapper"?
a839f65
to
0ca6379
Compare
0ca6379
to
8147727
Compare
What does this PR do?
Add an internal interface for mappers that need to traverse all children during tree traversal.
Motivation
This interface is to be used by React Native for traversing RN view groups, as preparation for implementing Session Replay there.
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)