From 67f59fcfbec5e19746bb65d9c850ba9945353d5c Mon Sep 17 00:00:00 2001 From: Djorkaeff Alexandre Date: Tue, 28 Apr 2020 11:07:53 -0300 Subject: [PATCH 1/5] [FIX] Big names overflow --- app/views/RoomActionsView/index.js | 2 +- app/views/RoomInfoView/styles.js | 8 ++++++-- app/views/RoomsListView/Header/Header.android.js | 5 +++-- app/views/RoomsListView/Header/Header.ios.js | 2 +- app/views/RoomsListView/ServerDropdown.js | 4 ++-- app/views/SidebarView/SidebarItem.js | 2 +- 6 files changed, 14 insertions(+), 9 deletions(-) diff --git a/app/views/RoomActionsView/index.js b/app/views/RoomActionsView/index.js index 21dc281f0f..e933cf13f7 100644 --- a/app/views/RoomActionsView/index.js +++ b/app/views/RoomActionsView/index.js @@ -495,7 +495,7 @@ class RoomActionsView extends React.Component { numberOfLines={1} theme={theme} /> - {room.t === 'd' && } + {room.t === 'd' && } {!item.disabled && } diff --git a/app/views/RoomInfoView/styles.js b/app/views/RoomInfoView/styles.js index fe82ca7c43..ed6b1d9788 100644 --- a/app/views/RoomInfoView/styles.js +++ b/app/views/RoomInfoView/styles.js @@ -16,28 +16,32 @@ export default StyleSheet.create({ justifyContent: 'center' }, avatarContainer: { - height: 240, + minHeight: 240, flexDirection: 'column', alignItems: 'center', justifyContent: 'center', marginBottom: 20 }, avatarContainerDirectRoom: { - height: 320 + paddingVertical: 16, + minHeight: 320 }, avatar: { marginHorizontal: 10 }, roomTitleContainer: { paddingTop: 20, + marginHorizontal: 16, alignItems: 'center' }, roomTitle: { fontSize: 20, + ...sharedStyles.textAlignCenter, ...sharedStyles.textMedium }, roomUsername: { fontSize: 18, + ...sharedStyles.textAlignCenter, ...sharedStyles.textRegular }, roomTitleRow: { diff --git a/app/views/RoomsListView/Header/Header.android.js b/app/views/RoomsListView/Header/Header.android.js index b40a9442d7..33ba0b4b97 100644 --- a/app/views/RoomsListView/Header/Header.android.js +++ b/app/views/RoomsListView/Header/Header.android.js @@ -16,7 +16,8 @@ const styles = StyleSheet.create({ }, button: { flexDirection: 'row', - alignItems: 'center' + alignItems: 'center', + marginRight: 64 }, server: { fontSize: 20, @@ -68,7 +69,7 @@ const Header = React.memo(({ {connecting ? {I18n.t('Connecting')} : null} {isFetching ? {I18n.t('Updating')} : null} - {serverName} + {serverName} - {serverName} + {serverName} diff --git a/app/views/RoomsListView/ServerDropdown.js b/app/views/RoomsListView/ServerDropdown.js index f91c20bd8c..6c6e7d043c 100644 --- a/app/views/RoomsListView/ServerDropdown.js +++ b/app/views/RoomsListView/ServerDropdown.js @@ -196,8 +196,8 @@ class ServerDropdown extends Component { ) } - {item.name || item.id} - {item.id} + {item.name || item.id} + {item.id} {item.id === server ? : null} diff --git a/app/views/SidebarView/SidebarItem.js b/app/views/SidebarView/SidebarItem.js index 0b2b8d2bc2..7959438c28 100644 --- a/app/views/SidebarView/SidebarItem.js +++ b/app/views/SidebarView/SidebarItem.js @@ -21,7 +21,7 @@ const Item = React.memo(({ {left} - + {text} From c506c1d6110f1ba6a6c9cb81ff620b6fc564fb8b Mon Sep 17 00:00:00 2001 From: Djorkaeff Alexandre Date: Tue, 28 Apr 2020 11:53:16 -0300 Subject: [PATCH 2/5] [FIX] Message time Co-authored-by: devyaniChoubey --- .../__snapshots__/Storyshots.test.js.snap | 3077 +++++++---------- app/containers/message/User.js | 11 +- 2 files changed, 1309 insertions(+), 1779 deletions(-) diff --git a/__tests__/__snapshots__/Storyshots.test.js.snap b/__tests__/__snapshots__/Storyshots.test.js.snap index 2fa6d10612..d48c956746 100644 --- a/__tests__/__snapshots__/Storyshots.test.js.snap +++ b/__tests__/__snapshots__/Storyshots.test.js.snap @@ -3804,39 +3804,32 @@ exports[`Storyshots Message list message 1`] = ` onStartShouldSetResponder={[Function]} style={ Object { + "alignItems": "center", + "flex": 1, + "flexDirection": "row", "opacity": 1, } } > - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. - - + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. + - - - diego.mello - - + diego.mello + - + Diego Mello - Diego Mello - - @ - diego.mello - + @ + diego.mello - + - + Diego Mello - Diego Mello - - @ - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. - + ] + } + > + @ + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. - + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + Array [ + Object { + "backgroundColor": "transparent", + "fontFamily": "System", + "fontSize": 16, + "fontWeight": "500", + "lineHeight": 22, + }, + Object { + "color": "#0d0e12", + }, + ] + } + > + diego.mello + - - - diego.mello - - + diego.mello + - - - Diego Mello - - + Diego Mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + Array [ + Object { + "backgroundColor": "transparent", + "fontFamily": "System", + "fontSize": 16, + "fontWeight": "500", + "lineHeight": 22, + }, + Object { + "color": "#0d0e12", + }, + ] + } + > + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + Array [ + Object { + "backgroundColor": "transparent", + "fontFamily": "System", + "fontSize": 16, + "fontWeight": "500", + "lineHeight": 22, + }, + Object { + "color": "#0d0e12", + }, + ] + } + > + diego.mello + - - - rocket.cat - - + rocket.cat + - - - diego.mello - - + diego.mello + - - - rocket.cat - - + rocket.cat + - - - diego.mello - - + diego.mello + - - - rocket.cat - - + rocket.cat + - - - diego.mello - - + Array [ + Object { + "backgroundColor": "transparent", + "fontFamily": "System", + "fontSize": 16, + "fontWeight": "500", + "lineHeight": 22, + }, + Object { + "color": "#0d0e12", + }, + ] + } + > + diego.mello + - - - rocket.cat - - + rocket.cat + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + Array [ + Object { + "backgroundColor": "transparent", + "fontFamily": "System", + "fontSize": 16, + "fontWeight": "500", + "lineHeight": 22, + }, + Object { + "color": "#0d0e12", + }, + ] + } + > + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + Array [ + Object { + "backgroundColor": "transparent", + "fontFamily": "System", + "fontSize": 16, + "fontWeight": "500", + "lineHeight": 22, + }, + Object { + "color": "#0d0e12", + }, + ] + } + > + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + Array [ + Object { + "backgroundColor": "transparent", + "fontFamily": "System", + "fontSize": 16, + "fontWeight": "500", + "lineHeight": 22, + }, + Object { + "color": "#0d0e12", + }, + ] + } + > + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + Array [ + Object { + "backgroundColor": "transparent", + "fontFamily": "System", + "fontSize": 16, + "fontWeight": "500", + "lineHeight": 22, + }, + Object { + "color": "#0d0e12", + }, + ] + } + > + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + Array [ + Object { + "backgroundColor": "transparent", + "fontFamily": "System", + "fontSize": 16, + "fontWeight": "500", + "lineHeight": 22, + }, + Object { + "color": "#0d0e12", + }, + ] + } + > + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + - - - diego.mello - - + diego.mello + navToRoomInfo(navParam)} + style={styles.titleContainer} disabled={author._id === user.id} > - - - {alias || username} - {aliasUsername} - - + + {alias || username} + {aliasUsername} + {time} { hasError && } From b8cfebf40736d9a661f60d410ebbe496812bd7cb Mon Sep 17 00:00:00 2001 From: Djorkaeff Alexandre Date: Thu, 30 Apr 2020 14:55:35 -0300 Subject: [PATCH 3/5] [FIX] Some alignments --- app/views/RoomActionsView/index.js | 2 +- app/views/RoomActionsView/styles.js | 4 +++- app/views/RoomView/Header/Header.js | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/views/RoomActionsView/index.js b/app/views/RoomActionsView/index.js index 163c114580..5bf17b2a0a 100644 --- a/app/views/RoomActionsView/index.js +++ b/app/views/RoomActionsView/index.js @@ -478,7 +478,7 @@ class RoomActionsView extends React.Component { > {t === 'd' && member._id ? : null } - + {room.t === 'd' ? {room.fname} : ( diff --git a/app/views/RoomActionsView/styles.js b/app/views/RoomActionsView/styles.js index 8021dfb2a3..fe38567daf 100644 --- a/app/views/RoomActionsView/styles.js +++ b/app/views/RoomActionsView/styles.js @@ -43,9 +43,11 @@ export default StyleSheet.create({ roomTitleContainer: { flex: 1 }, + roomTitlePadding: { + paddingRight: 16 + }, roomTitle: { fontSize: 16, - paddingRight: 16, ...sharedStyles.textMedium }, roomDescription: { diff --git a/app/views/RoomView/Header/Header.js b/app/views/RoomView/Header/Header.js index 2a668f0ede..d9b527550a 100644 --- a/app/views/RoomView/Header/Header.js +++ b/app/views/RoomView/Header/Header.js @@ -35,6 +35,7 @@ const styles = StyleSheet.create({ alignItems: 'center' }, subtitle: { + marginRight: -16, ...sharedStyles.textRegular, fontSize: 12 }, From 01e7a191099fd4efe288d22fb5dbcf6c0a23363b Mon Sep 17 00:00:00 2001 From: Djorkaeff Alexandre Date: Wed, 6 May 2020 09:14:29 -0300 Subject: [PATCH 4/5] fix user item overflow --- app/presentation/UserItem.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/presentation/UserItem.js b/app/presentation/UserItem.js index bb37108bfa..1f536af063 100644 --- a/app/presentation/UserItem.js +++ b/app/presentation/UserItem.js @@ -23,7 +23,8 @@ const styles = StyleSheet.create({ textContainer: { flex: 1, flexDirection: 'column', - justifyContent: 'center' + justifyContent: 'center', + marginRight: 15 }, name: { fontSize: 17, From ed94aa53b249cb581c087353b6f67af48ca3a331 Mon Sep 17 00:00:00 2001 From: Djorkaeff Alexandre Date: Fri, 8 May 2020 12:02:03 -0300 Subject: [PATCH 5/5] some adjustments --- app/views/RoomActionsView/styles.js | 1 + app/views/RoomsListView/ServerDropdown.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/RoomActionsView/styles.js b/app/views/RoomActionsView/styles.js index fe38567daf..93079c1d89 100644 --- a/app/views/RoomActionsView/styles.js +++ b/app/views/RoomActionsView/styles.js @@ -55,6 +55,7 @@ export default StyleSheet.create({ ...sharedStyles.textRegular }, roomTitleRow: { + paddingRight: 16, flexDirection: 'row', alignItems: 'center' } diff --git a/app/views/RoomsListView/ServerDropdown.js b/app/views/RoomsListView/ServerDropdown.js index 3e69b956a0..8c90a99980 100644 --- a/app/views/RoomsListView/ServerDropdown.js +++ b/app/views/RoomsListView/ServerDropdown.js @@ -211,8 +211,8 @@ class ServerDropdown extends Component { ) } - {item.name || item.id} - {item.id} + {item.name || item.id} + {item.id} {item.id === server ? : null}