From 53bcc262c580dc988dd8b9adfc447954181e6aa4 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Fri, 13 Jan 2023 14:11:59 -0700 Subject: [PATCH 01/12] align baseline --- src/styles/styles.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/styles.js b/src/styles/styles.js index 71fed02015b4..f8351b225f92 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -1308,7 +1308,7 @@ const styles = { }, chatItemMessageHeader: { - alignItems: 'center', + alignItems: 'baseline', display: 'flex', flexDirection: 'row', flexWrap: 'nowrap', From f79aa03e3187fa50e2d36aa9ec81ec065b22a8bb Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Fri, 13 Jan 2023 14:42:19 -0700 Subject: [PATCH 02/12] use correct height and padding for date --- src/styles/styles.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/styles/styles.js b/src/styles/styles.js index f8351b225f92..fbdb61d434d8 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -1308,7 +1308,7 @@ const styles = { }, chatItemMessageHeader: { - alignItems: 'baseline', + alignItems: 'center', display: 'flex', flexDirection: 'row', flexWrap: 'nowrap', @@ -1328,8 +1328,9 @@ const styles = { flexShrink: 0, color: themeColors.textSupporting, fontSize: variables.fontSizeSmall, - height: 24, + height: 20, lineHeight: variables.lineHeightXLarge, + paddingBottom: 4, }, chatItemMessage: { From e55a4472f33278391ad08b2116a76a6e27fa37ae Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Thu, 19 Jan 2023 15:52:05 -0700 Subject: [PATCH 03/12] rm height --- src/styles/styles.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/styles/styles.js b/src/styles/styles.js index 27c187c92317..fc50572c5608 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -1320,7 +1320,7 @@ const styles = { fontSize: variables.fontSizeNormal, fontWeight: fontWeightBold, lineHeight: variables.lineHeightXLarge, - paddingBottom: 4, + height: variables.lineHeightXLarge, ...wordBreak.breakWord, }, @@ -1328,9 +1328,6 @@ const styles = { flexShrink: 0, color: themeColors.textSupporting, fontSize: variables.fontSizeSmall, - height: 20, - lineHeight: variables.lineHeightXLarge, - paddingBottom: 4, }, chatItemMessage: { From fe68b028bfa7c77bc0b7ee75aa6eb886c6b0dc02 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Fri, 20 Jan 2023 13:25:19 -0700 Subject: [PATCH 04/12] add lineheight --- src/styles/styles.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/styles/styles.js b/src/styles/styles.js index fc50572c5608..2d1837aa7056 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -1328,6 +1328,7 @@ const styles = { flexShrink: 0, color: themeColors.textSupporting, fontSize: variables.fontSizeSmall, + lineHeight: variables.lineHeightXLarge, }, chatItemMessage: { From a2246fe5771ff5b53602766ec40700167a2baaa6 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Mon, 23 Jan 2023 13:53:23 -0700 Subject: [PATCH 05/12] update styles --- src/styles/styles.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/styles/styles.js b/src/styles/styles.js index e74488687f38..a0f68112bb2d 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -1319,7 +1319,6 @@ const styles = { fontSize: variables.fontSizeNormal, fontWeight: fontWeightBold, lineHeight: variables.lineHeightXLarge, - height: variables.lineHeightXLarge, ...wordBreak.breakWord, }, @@ -1327,7 +1326,8 @@ const styles = { flexShrink: 0, color: themeColors.textSupporting, fontSize: variables.fontSizeSmall, - lineHeight: variables.lineHeightXLarge, + paddingTop: 4, + lineHeight: variables.lineHeightNormal, }, chatItemMessage: { From c2620aee8fc24a94e9b451e6d28958e78f0a6808 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Mon, 23 Jan 2023 14:03:26 -0700 Subject: [PATCH 06/12] rm negative margin from messages --- src/styles/styles.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/styles/styles.js b/src/styles/styles.js index a0f68112bb2d..1e7fa0510a1a 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -1335,8 +1335,6 @@ const styles = { fontSize: variables.fontSizeNormal, fontFamily: fontFamily.EXP_NEUE, lineHeight: variables.lineHeightXLarge, - marginTop: -2, - marginBottom: -2, maxWidth: '100%', cursor: 'auto', ...whiteSpace.preWrap, From fd35c68c825ac61e3a1e7c3db378977f0e043742 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Mon, 23 Jan 2023 15:07:47 -0700 Subject: [PATCH 07/12] add padding to single images --- src/pages/home/report/ReportActionItem.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index f4a871078ed8..d5a41dc7ee0a 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -168,7 +168,10 @@ class ReportActionItem extends Component { > {!this.props.draftMessage ? ( - + ) : ( Date: Mon, 23 Jan 2023 15:35:43 -0700 Subject: [PATCH 08/12] fix console error --- src/pages/home/report/ReportActionItem.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index d5a41dc7ee0a..dfb1cb85d66e 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -170,7 +170,7 @@ class ReportActionItem extends Component { ? ( ) : ( Date: Mon, 23 Jan 2023 16:00:04 -0700 Subject: [PATCH 09/12] use margin --- src/pages/home/report/ReportActionItem.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index dfb1cb85d66e..2731c5664cba 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -170,7 +170,7 @@ class ReportActionItem extends Component { ? ( ) : ( Date: Mon, 23 Jan 2023 16:09:13 -0700 Subject: [PATCH 10/12] get isAttachment from server --- src/pages/home/report/ReportActionItem.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index 2731c5664cba..b7cc2b7572fe 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -145,6 +145,10 @@ class ReportActionItem extends Component { */ renderItemContent(hovered = false) { let children; + const message = _.last(lodashGet(this.props.action, 'message', [{}])); + const isAttachment = _.has(this.props.action, 'isAttachment') + ? this.props.action.isAttachment + : ReportUtils.isReportMessageAttachment(message); if (this.props.action.actionName === CONST.REPORT.ACTIONS.TYPE.IOU) { children = ( ) : ( Date: Mon, 23 Jan 2023 16:09:53 -0700 Subject: [PATCH 11/12] move logic to conditional --- src/pages/home/report/ReportActionItem.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index b7cc2b7572fe..3c9b82dbd883 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -145,10 +145,6 @@ class ReportActionItem extends Component { */ renderItemContent(hovered = false) { let children; - const message = _.last(lodashGet(this.props.action, 'message', [{}])); - const isAttachment = _.has(this.props.action, 'isAttachment') - ? this.props.action.isAttachment - : ReportUtils.isReportMessageAttachment(message); if (this.props.action.actionName === CONST.REPORT.ACTIONS.TYPE.IOU) { children = ( ); } else { + const message = _.last(lodashGet(this.props.action, 'message', [{}])); + const isAttachment = _.has(this.props.action, 'isAttachment') + ? this.props.action.isAttachment + : ReportUtils.isReportMessageAttachment(message); children = ( Date: Thu, 26 Jan 2023 17:13:24 -0700 Subject: [PATCH 12/12] adjust margins --- src/styles/styles.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/styles/styles.js b/src/styles/styles.js index 437ed2bf39e8..6b086e8154d4 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -1323,8 +1323,7 @@ const styles = { flexShrink: 0, color: themeColors.textSupporting, fontSize: variables.fontSizeSmall, - paddingTop: 4, - lineHeight: variables.lineHeightNormal, + paddingTop: 2, }, chatItemMessage: {