Skip to content

Commit ee41381

Browse files
committed
Revert "fix: styles for message input auto complete input"
This reverts commit 1233260.
1 parent 1233260 commit ee41381

File tree

5 files changed

+15
-22
lines changed

5 files changed

+15
-22
lines changed

package/src/components/AutoCompleteInput/AutoCompleteInput.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ const AutoCompleteInputWithContext = (props: AutoCompleteInputPropsWithContext)
142142
{
143143
color: black,
144144
maxHeight: (textHeight || 17) * numberOfLines,
145-
paddingHorizontal: command ? 4 : 16,
146145
textAlign: I18nManager.isRTL ? 'right' : 'left',
147146
},
148147
inputBox,
@@ -206,7 +205,8 @@ const styles = StyleSheet.create({
206205
flex: 1,
207206
fontSize: 16,
208207
includeFontPadding: false, // for android vertical text centering
209-
paddingVertical: 12,
208+
padding: 0, // removal of default text input padding on android
209+
paddingTop: 0, // removal of iOS top padding for weird centering
210210
textAlignVertical: 'center', // for android vertical text centering
211211
},
212212
});

package/src/components/MessageInput/AttachmentUploadPreviewList.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,10 @@ export const AttachmentUploadPreviewList = (props: AttachmentUploadPreviewListPr
264264
const styles = StyleSheet.create({
265265
attachmentSeparator: {
266266
borderBottomWidth: 1,
267-
marginVertical: 8,
267+
marginBottom: 10,
268268
},
269-
filesFlatList: { maxHeight: FILE_PREVIEW_HEIGHT * 2.5 + 16 },
270-
imagesFlatList: {},
269+
filesFlatList: { marginBottom: 12, maxHeight: FILE_PREVIEW_HEIGHT * 2.5 + 16 },
270+
imagesFlatList: { paddingBottom: 12 },
271271
});
272272

273273
AttachmentUploadPreviewList.displayName =

package/src/components/MessageInput/MessageInput.tsx

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,15 @@ import { AutoCompleteInput } from '../AutoCompleteInput/AutoCompleteInput';
6363
import { CreatePoll } from '../Poll/CreatePollContent';
6464

6565
const styles = StyleSheet.create({
66-
attachmentPreviewListContainer: { paddingTop: 12 },
6766
attachmentSeparator: {
6867
borderBottomWidth: 1,
6968
marginBottom: 10,
7069
},
7170
autoCompleteInputContainer: {
7271
alignItems: 'center',
7372
flexDirection: 'row',
73+
paddingLeft: 16,
74+
paddingRight: 16,
7475
},
7576
composerContainer: {
7677
alignItems: 'center',
@@ -91,7 +92,7 @@ const styles = StyleSheet.create({
9192
optionsContainer: {
9293
flexDirection: 'row',
9394
},
94-
replyContainer: { paddingBottom: 0, paddingHorizontal: 8, paddingTop: 8 },
95+
replyContainer: { paddingBottom: 12, paddingHorizontal: 8 },
9596
sendButtonContainer: {},
9697
suggestionsListContainer: {
9798
position: 'absolute',
@@ -230,7 +231,6 @@ const MessageInputWithContext = (props: MessageInputPropsWithContext) => {
230231
theme: {
231232
colors: { border, grey_whisper, white, white_smoke },
232233
messageInput: {
233-
attachmentPreviewListContainer,
234234
attachmentSelectionBar,
235235
autoCompleteInputContainer,
236236
composerContainer,
@@ -494,6 +494,7 @@ const MessageInputWithContext = (props: MessageInputPropsWithContext) => {
494494
styles.inputBoxContainer,
495495
{
496496
borderColor: grey_whisper,
497+
paddingVertical: command ? 8 : 12,
497498
},
498499
inputBoxContainer,
499500
isFocused ? focusedInputBoxContainer : null,
@@ -504,16 +505,7 @@ const MessageInputWithContext = (props: MessageInputPropsWithContext) => {
504505
<Reply />
505506
</View>
506507
)}
507-
{attachments.length > 0 ? (
508-
<View
509-
style={[
510-
styles.attachmentPreviewListContainer,
511-
attachmentPreviewListContainer,
512-
]}
513-
>
514-
<AttachmentUploadPreviewList />
515-
</View>
516-
) : null}
508+
<AttachmentUploadPreviewList />
517509
{command ? (
518510
<CommandInput disabled={!isOnline} />
519511
) : (

package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2135,6 +2135,7 @@ exports[`Thread should match thread snapshot 1`] = `
21352135
},
21362136
{
21372137
"borderColor": "#ECEBEB",
2138+
"paddingVertical": 12,
21382139
},
21392140
{},
21402141
null,
@@ -2147,6 +2148,8 @@ exports[`Thread should match thread snapshot 1`] = `
21472148
{
21482149
"alignItems": "center",
21492150
"flexDirection": "row",
2151+
"paddingLeft": 16,
2152+
"paddingRight": 16,
21502153
},
21512154
{},
21522155
]
@@ -2168,13 +2171,13 @@ exports[`Thread should match thread snapshot 1`] = `
21682171
"flex": 1,
21692172
"fontSize": 16,
21702173
"includeFontPadding": false,
2171-
"paddingVertical": 12,
2174+
"padding": 0,
2175+
"paddingTop": 0,
21722176
"textAlignVertical": "center",
21732177
},
21742178
{
21752179
"color": "#000000",
21762180
"maxHeight": 85,
2177-
"paddingHorizontal": 16,
21782181
"textAlign": "left",
21792182
},
21802183
{},

package/src/contexts/themeContext/utils/theme.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,6 @@ export type Theme = {
267267
messageInput: {
268268
attachButton: ViewStyle;
269269
attachButtonContainer: ViewStyle;
270-
attachmentPreviewListContainer: ViewStyle;
271270
attachmentSelectionBar: ViewStyle;
272271
attachmentSeparator: ViewStyle;
273272
attachmentUnsupportedIndicator: {
@@ -1082,7 +1081,6 @@ export const defaultTheme: Theme = {
10821081
messageInput: {
10831082
attachButton: {},
10841083
attachButtonContainer: {},
1085-
attachmentPreviewListContainer: {},
10861084
attachmentSelectionBar: {},
10871085
attachmentSeparator: {},
10881086
attachmentUnsupportedIndicator: {

0 commit comments

Comments
 (0)