Skip to content

Commit

Permalink
RUM-6316: Remove Session Replay button mapper border
Browse files Browse the repository at this point in the history
  • Loading branch information
ambushwork committed Sep 24, 2024
1 parent 26c28e2 commit 420154c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,6 @@ internal class ButtonMapper(
asyncJobStatusCallback: AsyncJobStatusCallback,
internalLogger: InternalLogger
): List<MobileSegment.Wireframe> {
return super.map(view, mappingContext, asyncJobStatusCallback, internalLogger).map {
if (it is MobileSegment.Wireframe.TextWireframe &&
it.shapeStyle == null && it.border == null
) {
// we were not able to resolve the background for this button so just add a border
it.copy(border = MobileSegment.ShapeBorder(BLACK_COLOR, 1))
} else {
it
}
}
}

companion object {
internal const val BLACK_COLOR = "#000000ff"
return super.map(view, mappingContext, asyncJobStatusCallback, internalLogger)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,7 @@ internal abstract class ButtonMapperTest : BaseAsyncBackgroundWireframeMapperTes
height = fakeViewGlobalBounds.height,
clip = null,
shapeStyle = null,
border = MobileSegment.ShapeBorder(
color = "#000000ff",
width = 1L
),
border = null,
text = expectedPrivacyCompliantText(""),
textStyle = MobileSegment.TextStyle(
family = TextViewMapper.SANS_SERIF_FAMILY_NAME,
Expand Down

0 comments on commit 420154c

Please sign in to comment.