RUMM-2806 Drop the covered wireframes only if top ones have a background#1198
Conversation
a97e155 to
cc0004b
Compare
| } | ||
| } | ||
|
|
||
| private fun MobileSegment.Wireframe.hasBackground(): Boolean { |
There was a problem hiding this comment.
what if the background is transparent?
There was a problem hiding this comment.
Good catch, I am going to filter those out also.
There was a problem hiding this comment.
👍 or semi-transparent. On iOS we recently added isTranslucent for similar use case, which also takes view's alpha (opacity) into account. It doesn't yet check the background color's alpha, but remains extensible in that direction (e.g. a background of #FF000099 should be considered translucent).
There was a problem hiding this comment.
yup I modified it in order to just consider alpha FF in the color and 1f in the ShapeStyle opacity. Any other wireframe with any alpha value will be not considered as overlay.
Codecov Report
@@ Coverage Diff @@
## feature/sdkv2 #1198 +/- ##
=================================================
- Coverage 83.38% 83.36% -0.02%
=================================================
Files 356 356
Lines 11987 11985 -2
Branches 2061 2061
=================================================
- Hits 9995 9991 -4
- Misses 1357 1358 +1
- Partials 635 636 +1
|
0dc18c5 to
ae7a05f
Compare
a7148b4 to
63123ae
Compare
| } | ||
| topWireframes.forEach { | ||
| if (it.bounds().isCovering(wireframeBounds)) { | ||
| if (it.bounds().isCovering(wireframeBounds) && it.isNotTranslucent()) { |
There was a problem hiding this comment.
Nitpicking here, maybe using isOpaque would avoid having to handle the negation when thinking at the logic
63123ae to
b3f7083
Compare
What does this PR do?
Before we were filtering out all the overlayed wireframes no matter if the top ones were having a solid background or not. This creates a problem because if the removed wireframe is actual the one that gives the main background in a View we will be loosing the contrast in the replay and will make some elements invisible (e.g. texts).
In order to fix this we are now only considering as valid overlays the wireframes that also have a solid backround.
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)