Skip to content

Commit 0e84191

Browse files
authored
fix: fix reply border style (#2197)
* fix: fix reply border * chore: revert move of MessageRepliesAvatars * chore: revert styling * chore: update snapshot * chore: remove margin * chore: update snapshot
1 parent f559a0f commit 0e84191

File tree

3 files changed

+14
-21
lines changed

3 files changed

+14
-21
lines changed

package/src/components/Message/MessageSimple/MessageReplies.tsx

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { ColorValue, Platform, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
2+
import { ColorValue, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
33

44
import {
55
MessageContextValue,
@@ -28,15 +28,9 @@ const styles = StyleSheet.create({
2828
},
2929
leftMessageRepliesCurve: {
3030
borderBottomLeftRadius: 16,
31-
borderRightColor: 'transparent',
32-
...Platform.select({
33-
android: {
34-
borderRightWidth: 0,
35-
},
36-
}),
31+
borderRightWidth: 0,
3732
},
3833
messageRepliesCurve: {
39-
borderTopColor: 'transparent',
4034
borderTopWidth: 0,
4135
borderWidth: 1,
4236
height: 16,
@@ -46,16 +40,11 @@ const styles = StyleSheet.create({
4640
fontSize: 12,
4741
fontWeight: '700',
4842
paddingBottom: 5,
49-
paddingLeft: 8,
43+
paddingHorizontal: 8,
5044
},
5145
rightMessageRepliesCurve: {
5246
borderBottomRightRadius: 16,
53-
borderLeftColor: 'transparent',
54-
...Platform.select({
55-
android: {
56-
borderLeftWidth: 0,
57-
},
58-
}),
47+
borderLeftWidth: 0,
5948
},
6049
});
6150

@@ -112,7 +101,7 @@ const MessageRepliesWithContext = <
112101
return (
113102
<View style={styles.curveContainer}>
114103
{alignment === 'left' && (
115-
<View testID='message-replies-left'>
104+
<View style={styles.curveContainer} testID='message-replies-left'>
116105
{!noBorder && (
117106
<View
118107
style={[
@@ -166,7 +155,7 @@ const MessageRepliesWithContext = <
166155
</Text>
167156
</TouchableOpacity>
168157
{alignment === 'right' && (
169-
<View testID='message-replies-right'>
158+
<View style={styles.curveContainer} testID='message-replies-right'>
170159
<MessageRepliesAvatars alignment={alignment} message={message} />
171160
{!noBorder && (
172161
<View

package/src/components/Message/MessageSimple/MessageRepliesAvatars.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const MessageRepliesAvatarsWithContext = <
5454
<View
5555
style={[
5656
styles.avatarContainer,
57-
alignment === 'right' ? { marginLeft: 8, ...rightAvatarsContainer } : leftAvatarsContainer,
57+
alignment === 'right' ? rightAvatarsContainer : leftAvatarsContainer,
5858
]}
5959
>
6060
{avatars.map((user, i) => (

package/src/components/Message/MessageSimple/__tests__/__snapshots__/MessageReplies.test.js.snap

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ exports[`MessageReplies should render message replies 1`] = `
99
}
1010
>
1111
<View
12+
style={
13+
Object {
14+
"flexDirection": "row",
15+
}
16+
}
1217
testID="message-replies-left"
1318
>
1419
<View
@@ -18,15 +23,14 @@ exports[`MessageReplies should render message replies 1`] = `
1823
"borderColor": undefined,
1924
},
2025
Object {
21-
"borderTopColor": "transparent",
2226
"borderTopWidth": 0,
2327
"borderWidth": 1,
2428
"height": 16,
2529
"width": 16,
2630
},
2731
Object {
2832
"borderBottomLeftRadius": 16,
29-
"borderRightColor": "transparent",
33+
"borderRightWidth": 0,
3034
},
3135
Object {},
3236
]
@@ -73,7 +77,7 @@ exports[`MessageReplies should render message replies 1`] = `
7377
"fontSize": 12,
7478
"fontWeight": "700",
7579
"paddingBottom": 5,
76-
"paddingLeft": 8,
80+
"paddingHorizontal": 8,
7781
},
7882
Object {
7983
"color": "#005FFF",

0 commit comments

Comments
 (0)