Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix display name and date alignment #14304

Merged
merged 15 commits into from
Jan 30, 2023
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 @@ -1316,25 +1316,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