Skip to content

Commit

Permalink
Merge pull request #14304 from Expensify/cmartins-alignBaseline
Browse files Browse the repository at this point in the history
Fix display name and date alignment
  • Loading branch information
luacmartins authored Jan 30, 2023
2 parents 5571e81 + ac94ca3 commit 83371f7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
9 changes: 8 additions & 1 deletion src/pages/home/report/ReportActionItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ class ReportActionItem extends Component {
/>
);
} else {
const message = _.last(lodashGet(this.props.action, 'message', [{}]));
const isAttachment = _.has(this.props.action, 'isAttachment')
? this.props.action.isAttachment
: ReportUtils.isReportMessageAttachment(message);
children = (
<ShowContextMenuContext.Provider
value={{
Expand All @@ -168,7 +172,10 @@ class ReportActionItem extends Component {
>
{!this.props.draftMessage
? (
<ReportActionItemMessage action={this.props.action} />
<ReportActionItemMessage
action={this.props.action}
style={(!this.props.displayAsGroup && isAttachment) ? [styles.mt2] : undefined}
/>
) : (
<ReportActionItemMessageEdit
action={this.props.action}
Expand Down
6 changes: 1 addition & 5 deletions src/styles/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -1320,25 +1320,21 @@ const styles = {
fontSize: variables.fontSizeNormal,
fontWeight: fontWeightBold,
lineHeight: variables.lineHeightXLarge,
paddingBottom: 4,
...wordBreak.breakWord,
},

chatItemMessageHeaderTimestamp: {
flexShrink: 0,
color: themeColors.textSupporting,
fontSize: variables.fontSizeSmall,
height: 24,
lineHeight: variables.lineHeightXLarge,
paddingTop: 2,
},

chatItemMessage: {
color: themeColors.text,
fontSize: variables.fontSizeNormal,
fontFamily: fontFamily.EXP_NEUE,
lineHeight: variables.lineHeightXLarge,
marginTop: -2,
marginBottom: -2,
maxWidth: '100%',
cursor: 'auto',
...whiteSpace.preWrap,
Expand Down

0 comments on commit 83371f7

Please sign in to comment.