Skip to content

RUM-6197: Add ImageSemanticsNodeMapper to support image role for SR#2322

Merged
ambushwork merged 1 commit into
feature/sr_composefrom
yl/compose/semantics-poc
Oct 17, 2024
Merged

RUM-6197: Add ImageSemanticsNodeMapper to support image role for SR#2322
ambushwork merged 1 commit into
feature/sr_composefrom
yl/compose/semantics-poc

Conversation

@ambushwork

@ambushwork ambushwork commented Oct 14, 2024

Copy link
Copy Markdown
Member

What does this PR do?

Add ImageSemanticsNodeMapper to support image role for SR

  • Support Icon and Image composable for the vector resources.
  • Support Coil AsyncImage for the network image
  • Add function in DefaultImageWireframeHelper function to directly resolve bitmap to wireframe.

Motivation

RUM-6197

Known issue

  • No all the painters are supported.
  • Background or clip by the modifiers are not supported yet.

Demo

Sample App Screen Session Replay
Screenshot 2024-10-14 at 11 40 03 Screenshot 2024-10-14 at 11 40 03

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)

@codecov-commenter

codecov-commenter commented Oct 14, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 50.65789% with 75 lines in your changes missing coverage. Please review.

Project coverage is 69.39%. Comparing base (a0a5cf8) to head (00a17a3).
Report is 2 commits behind head on feature/sr_compose.

Files with missing lines Patch % Lines
...rnal/mappers/semantics/ImageSemanticsNodeMapper.kt 1.92% 51 Missing ⚠️
...y/compose/internal/reflection/ComposeReflection.kt 50.00% 0 Missing and 9 partials ⚠️
...ay/internal/recorder/resources/ResourceResolver.kt 68.75% 3 Missing and 2 partials ⚠️
...compose/internal/mappers/ComposeWireframeMapper.kt 0.00% 3 Missing ⚠️
...rnal/mappers/semantics/SemanticsWireframeMapper.kt 76.92% 2 Missing and 1 partial ⚠️
.../recorder/resources/DefaultImageWireframeHelper.kt 94.74% 1 Missing and 1 partial ⚠️
...ndroid/sessionreplay/utils/ImageWireframeHelper.kt 33.33% 2 Missing ⚠️
Additional details and impacted files
@@                  Coverage Diff                   @@
##           feature/sr_compose    #2322      +/-   ##
======================================================
- Coverage               69.56%   69.39%   -0.17%     
======================================================
  Files                     751      752       +1     
  Lines                   27806    27941     +135     
  Branches                 4745     4780      +35     
======================================================
+ Hits                    19343    19389      +46     
- Misses                   7118     7197      +79     
- Partials                 1345     1355      +10     
Files with missing lines Coverage Δ
...d/sessionreplay/compose/internal/data/UiContext.kt 83.33% <100.00%> (+3.33%) ⬆️
...l/mappers/semantics/AbstractSemanticsNodeMapper.kt 87.50% <ø> (ø)
...nal/mappers/semantics/ButtonSemanticsNodeMapper.kt 90.00% <100.00%> (ø)
...ernal/mappers/semantics/TextSemanticsNodeMapper.kt 48.53% <100.00%> (ø)
...nternal/recorder/mapper/CheckableTextViewMapper.kt 60.00% <100.00%> (-1.82%) ⬇️
...replay/internal/recorder/mapper/ImageViewMapper.kt 92.11% <100.00%> (ø)
...lay/internal/recorder/mapper/SwitchCompatMapper.kt 92.45% <100.00%> (ø)
...order/mapper/BaseAsyncBackgroundWireframeMapper.kt 95.00% <100.00%> (ø)
.../recorder/resources/DefaultImageWireframeHelper.kt 95.08% <94.74%> (-0.12%) ⬇️
...ndroid/sessionreplay/utils/ImageWireframeHelper.kt 50.00% <33.33%> (-10.00%) ⬇️
... and 5 more

... and 31 files with indirect coverage changes

@ambushwork
ambushwork force-pushed the yl/compose/semantics-poc branch from b2e330c to 830ef53 Compare October 14, 2024 10:41
@ambushwork
ambushwork marked this pull request as ready for review October 14, 2024 11:52
@ambushwork
ambushwork requested review from a team as code owners October 14, 2024 11:52
@ambushwork
ambushwork force-pushed the yl/compose/semantics-poc branch from 830ef53 to f263f00 Compare October 14, 2024 14:10

@mariusc83 mariusc83 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Overall it looks clean, I am a bit worried about these reflection calls and we should pay attention at the obfuscation. I had few questions there.

@ambushwork
ambushwork force-pushed the yl/compose/semantics-poc branch from f263f00 to 967ae47 Compare October 15, 2024 09:16
@ambushwork
ambushwork force-pushed the yl/compose/semantics-poc branch 3 times, most recently from fc3fe09 to 4949327 Compare October 15, 2024 14:53
jonathanmos
jonathanmos previously approved these changes Oct 15, 2024
@ambushwork
ambushwork force-pushed the yl/compose/semantics-poc branch from 918955f to 00a17a3 Compare October 15, 2024 16:02
@ambushwork
ambushwork merged commit 680b7c9 into feature/sr_compose Oct 17, 2024
@ambushwork
ambushwork deleted the yl/compose/semantics-poc branch October 17, 2024 08:04
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