-
Notifications
You must be signed in to change notification settings - Fork 44
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
Add support for Android view capturing in Session Replay #559
Add support for Android view capturing in Session Replay #559
Conversation
...replay/android/src/main/kotlin/com/datadog/reactnative/sessionreplay/ReactViewGroupMapper.kt
Outdated
Show resolved
Hide resolved
...replay/android/src/main/kotlin/com/datadog/reactnative/sessionreplay/ReactViewGroupMapper.kt
Outdated
Show resolved
Hide resolved
...replay/android/src/main/kotlin/com/datadog/reactnative/sessionreplay/ReactViewGroupMapper.kt
Outdated
Show resolved
Hide resolved
...e-session-replay/android/src/main/kotlin/com/datadog/reactnative/sessionreplay/ColorUtils.kt
Outdated
Show resolved
Hide resolved
...ssion-replay/android/src/test/kotlin/com/datadog/reactnative/sessionreplay/ColorUtilsTest.kt
Outdated
Show resolved
Hide resolved
Can you add screenshots of the nigthly app to see what it looks like? Also I don't see anything around the |
c9faa9d
to
65f5785
Compare
...replay/android/src/main/kotlin/com/datadog/reactnative/sessionreplay/ReactViewGroupMapper.kt
Outdated
Show resolved
Hide resolved
65f5785
to
38c508a
Compare
9a76ff7
to
c63ffcb
Compare
c63ffcb
to
d380eb8
Compare
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.
Works for me, I'd like to have an extra approval from a member of the Android SDK team as well.
...e-session-replay/android/src/main/kotlin/com/datadog/reactnative/sessionreplay/ColorUtils.kt
Outdated
Show resolved
Hide resolved
...e-session-replay/android/src/main/kotlin/com/datadog/reactnative/sessionreplay/ColorUtils.kt
Outdated
Show resolved
Hide resolved
...replay/android/src/main/kotlin/com/datadog/reactnative/sessionreplay/ReactViewGroupMapper.kt
Outdated
Show resolved
Hide resolved
d380eb8
to
65b3d02
Compare
I refactored three files -> ColorUtils, ColorUtilsTest and ReactViewGroupMapper. The changes were quite extensive so could you please review those three again? Basically, I separated opacity and color alpha entirely as concepts and implemented a simpler method to calculate the rgba from the color int. I also removed the recursion for the opacity, because this logic is not used on the native side and the solution will either have to be on the player side, or on the native side perhaps will require an rfc |
ff6e7e9
to
c12e0da
Compare
c12e0da
to
2874bf0
Compare
c81eb1e
to
b3ff8d9
Compare
...e-session-replay/android/src/main/kotlin/com/datadog/reactnative/sessionreplay/ColorUtils.kt
Outdated
Show resolved
Hide resolved
...e-session-replay/android/src/main/kotlin/com/datadog/reactnative/sessionreplay/ColorUtils.kt
Outdated
Show resolved
Hide resolved
...e-session-replay/android/src/main/kotlin/com/datadog/reactnative/sessionreplay/ColorUtils.kt
Outdated
Show resolved
Hide resolved
...e-session-replay/android/src/main/kotlin/com/datadog/reactnative/sessionreplay/ColorUtils.kt
Outdated
Show resolved
Hide resolved
...replay/android/src/main/kotlin/com/datadog/reactnative/sessionreplay/ReactViewGroupMapper.kt
Show resolved
Hide resolved
...replay/android/src/main/kotlin/com/datadog/reactnative/sessionreplay/ReactViewGroupMapper.kt
Outdated
Show resolved
Hide resolved
039b17e
to
7bed2b7
Compare
What does this PR do?
Adds support for capturing Android views in Session Replay. Views are supported with the opacity prop or where specifying the opacity through a color with alpha (e.g. FF000000)
Support for border width and color, and for corner radius.
emulator:
replay:
With border and rounded corners.
emulator:
replay:
With parent with 10% opacity:
emulator
replay
Motivation
Part of the effort to add Session Replay to React Native.
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)