RUM-8906: Improve StateListDrawable support in session replay#2531
Merged
aleksandr-gringauz merged 2 commits intoMar 7, 2025
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #2531 +/- ##
===========================================
- Coverage 70.04% 69.99% -0.05%
===========================================
Files 797 797
Lines 29990 29992 +2
Branches 5018 5019 +1
===========================================
- Hits 21004 20990 -14
- Misses 7583 7599 +16
Partials 1403 1403
🚀 New features to boost your workflow:
|
aleksandr-gringauz
force-pushed
the
aleksandr-gringauz/rum-8906/improve-statelistdrawable-support
branch
from
March 7, 2025 13:25
ac0f57d to
f9f9395
Compare
0xnm
approved these changes
Mar 7, 2025
0xnm
left a comment
Member
There was a problem hiding this comment.
lgtm code-wise, but it would be nice to have another pair of eyes from SR folks to check Drawable logic handling.
Member
|
LGTM, well done! |
ambushwork
approved these changes
Mar 7, 2025
aleksandr-gringauz
deleted the
aleksandr-gringauz/rum-8906/improve-statelistdrawable-support
branch
March 7, 2025 14:29
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?
Now
LegacyDrawableToColorMapperattempts to capture the color of theStateListDrawableinstead of logging an error and returningnull. Now for example if aButtoncontains aStateListDrawableas its background the drawable will be properly captured in session replay in case it contains<shape>items.demo [internal]:
before - https://mobile-integration.datadoghq.com/rum/replay/sessions/42b5235f-634d-4312-aeea-aa0086934210?seed=f99dff80-5d8f-4525-b85a-272b546575ac&ts=1741350614133
after - https://mobile-integration.datadoghq.com/rum/replay/sessions/3bfeecaa-e265-4f89-9e1f-3948ec72bd3e?seed=fc287316-ecbe-4d62-af59-4c51bcc0e82c&ts=1741350708487
Motivation
Properly capture the color of
StateListDrawableif its child color can be captured.Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)