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

RUMM-2496 SR Correctly handle clipped elements and scrollable lists #1101

Conversation

mariusc83
Copy link
Collaborator

@mariusc83 mariusc83 commented Oct 24, 2022

What does this PR do?

In this PR we are introducing the capability of the SR recorder to add the clipping property to each Wireframe whenever it is outside of any of its parents bounds. The following updates where added:

  • the WireframeClip optional property was added into the Wireframe and WireframeUpdate SR schemas
  • SR recorder keeps track of all the parents when resolving an element in the tree to a Node
  • when processing the tree of Nodes into a List<Wireframe> we keep track of the parents for each of the Wireframe and we are computing the WireframeClip property. This will solve also the issue when a Wireframe is rendered inside a ScrollableList
  • when excluding the completely overlayed Wireframe we take into account also the clipping dimensions

Motivation

What inspired you to submit this pull request?

Additional Notes

Anything else we should know when reviewing?

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@mariusc83 mariusc83 force-pushed the mconstantin/rumm-2496/correctly-handle-the-scrollable-lists branch 3 times, most recently from 1e56f89 to 2f869d3 Compare October 24, 2022 13:47
@xgouchet xgouchet added the size-large This PR is large sized label Oct 24, 2022
@mariusc83 mariusc83 force-pushed the mconstantin/rumm-2496/correctly-handle-the-scrollable-lists branch from 2f869d3 to 346ba51 Compare October 24, 2022 14:05
@mariusc83 mariusc83 self-assigned this Oct 24, 2022
@mariusc83 mariusc83 marked this pull request as ready for review October 24, 2022 14:16
@mariusc83 mariusc83 requested a review from a team as a code owner October 24, 2022 14:16
@mariusc83 mariusc83 force-pushed the mconstantin/rumm-2496/correctly-handle-the-scrollable-lists branch 3 times, most recently from c9cba70 to 7dfe501 Compare October 24, 2022 14:59
@codecov-commenter
Copy link

codecov-commenter commented Oct 24, 2022

Codecov Report

Merging #1101 (7dfe501) into feature/sdkv2 (ef329c2) will increase coverage by 0.07%.
The diff coverage is 89.72%.

@@                Coverage Diff                @@
##           feature/sdkv2    #1101      +/-   ##
=================================================
+ Coverage          82.53%   82.60%   +0.07%     
=================================================
  Files                347      350       +3     
  Lines              11183    11244      +61     
  Branches            1834     1851      +17     
=================================================
+ Hits                9229     9287      +58     
- Misses              1391     1399       +8     
+ Partials             563      558       -5     
Impacted Files Coverage Δ
...droid/sessionreplay/processor/SnapshotProcessor.kt 93.68% <ø> (-0.07%) ⬇️
.../com/datadog/android/sessionreplay/utils/Bounds.kt 0.00% <0.00%> (ø)
...g/android/sessionreplay/processor/NodeFlattener.kt 93.33% <83.33%> (+2.03%) ⬆️
...atadog/android/sessionreplay/recorder/ViewUtils.kt 84.62% <84.62%> (ø)
...android/sessionreplay/recorder/SnapshotProducer.kt 82.61% <92.86%> (+4.48%) ⬆️
...ndroid/sessionreplay/processor/MobileSegmentExt.kt 100.00% <100.00%> (ø)
...ndroid/sessionreplay/processor/MutationResolver.kt 86.90% <100.00%> (+0.77%) ⬆️
.../android/sessionreplay/processor/WireframeUtils.kt 100.00% <100.00%> (ø)
...com/datadog/android/sessionreplay/recorder/Node.kt 75.00% <100.00%> (+8.33%) ⬆️
...ssionreplay/recorder/mapper/ViewWireframeMapper.kt 88.46% <100.00%> (ø)
... and 8 more

Copy link
Contributor

@0xnm 0xnm left a comment

Choose a reason for hiding this comment

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

Looks great (and big!). I've left some questions/comments.

@mariusc83 mariusc83 force-pushed the mconstantin/rumm-2496/correctly-handle-the-scrollable-lists branch from 7dfe501 to aacb470 Compare October 25, 2022 13:59
@mariusc83 mariusc83 force-pushed the mconstantin/rumm-2496/correctly-handle-the-scrollable-lists branch from aacb470 to b6e3d2e Compare October 25, 2022 14:02
@mariusc83 mariusc83 requested a review from 0xnm October 25, 2022 14:11
@mariusc83 mariusc83 force-pushed the mconstantin/rumm-2496/correctly-handle-the-scrollable-lists branch from b6e3d2e to 0edde83 Compare October 25, 2022 14:19
@mariusc83 mariusc83 merged commit cf4a6b9 into feature/sdkv2 Oct 26, 2022
@mariusc83 mariusc83 deleted the mconstantin/rumm-2496/correctly-handle-the-scrollable-lists branch October 26, 2022 15:53
@xgouchet xgouchet added this to the 1.16.0 milestone Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size-large This PR is large sized
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants