RUM:4717: Improve CheckableTextViewMapper#2115
Merged
ambushwork merged 1 commit intoJul 2, 2024
Merged
Conversation
ambushwork
force-pushed
the
yl/improve-checkbox-mapper
branch
from
June 28, 2024 08:54
229a205 to
2f59c04
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/session-replay/compound-button-mappers #2115 +/- ##
=================================================================================
Coverage ? 69.05%
=================================================================================
Files ? 700
Lines ? 26209
Branches ? 4416
=================================================================================
Hits ? 18098
Misses ? 6899
Partials ? 1212
|
0xnm
approved these changes
Jul 2, 2024
0xnm
left a comment
Member
There was a problem hiding this comment.
lgtm. Although I don't have a deep knowledge of SR, so a review from someone else who is closer to the Session Replay topic than I am is preferable.
Member
Author
Agree, @xgouchet @jonathanmos do you want to take a look at this? |
ambushwork
force-pushed
the
yl/improve-checkbox-mapper
branch
from
July 2, 2024 08:00
2f59c04 to
e3e842a
Compare
jonathanmos
reviewed
Jul 2, 2024
ambushwork
force-pushed
the
yl/improve-checkbox-mapper
branch
2 times, most recently
from
July 2, 2024 09:46
8ffda54 to
fa4d075
Compare
ambushwork
force-pushed
the
yl/improve-checkbox-mapper
branch
from
July 2, 2024 10:03
fa4d075 to
79dce7f
Compare
jonathanmos
approved these changes
Jul 2, 2024
xgouchet
approved these changes
Jul 3, 2024
This file contains hidden or 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
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.
What does this PR do?
Summary
This PR improves the session replay
CheckableTextViewMapper, tries to generate the wireframes which are much closer to the real UI elements.Since
CheckableTextViewMapperis a base class of the other mappers, following UI components are affected in session replay:Main changes in the PR:
CheckableWireFrameMapper, mergeresolveCheckedCheckable()andresolveNotCheckedCheckable()functions into one functionresolveCheckable, because we don't generate differentShapeWireframefor the "checked" or "not checked" states, instead, we retrieve the drawable to generateImageWireframe.CheckableTextViewMapper, Inside the implementation ofresolveCheckablewe try to retrieve the drawable of "checked" and "not checked", and then set theColorStateListof the view on the drawable to have the correct tint.CheckableCompoundButton, the bounds is adjusted for the drawable rendering,getCheckableDrawableis implemented to retrieve the drawable for anyCompoundButtonCheckedTextViewgetCheckableDrawableis implemented to retrieve the drawable forCheckedTextView.ShapeWireframeis correctly generated, we only need to test thatImageWireFrameHelper.createImageWireframeis called.Demo
Motivation
Additional Notes
Remain issue
CompoundButtonMapperfor the version under 23Review checklist (to be filled by reviewers)