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: Long display name not being wrapped #3830

Merged
merged 4 commits into from
Jul 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/pages/home/report/ReportActionItemFragment.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,16 @@ const propTypes = {
/** Does this fragment belong to a reportAction that has not yet loaded? */
loading: PropTypes.bool,

/** Should this fragment be contained in a single line? */
isSingleLine: PropTypes.bool,

...windowDimensionsPropTypes,
};

const defaultProps = {
isAttachment: false,
loading: false,
isSingleLine: false,
tooltipText: '',
};

Expand Down Expand Up @@ -79,9 +83,10 @@ class ReportActionItemFragment extends React.PureComponent {
);
case 'TEXT':
return (
<Tooltip text={tooltipText}>
<Tooltip text={tooltipText} containerStyle={styles.w100}>
<Text
selectable
numberOfLines={this.props.isSingleLine ? 1 : undefined}
style={[styles.chatItemMessageHeaderSender]}
>
{Str.htmlDecode(fragment.text)}
Expand Down
1 change: 1 addition & 0 deletions src/pages/home/report/ReportActionItemSingle.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ const ReportActionItemSingle = ({
tooltipText={action.actorEmail}
isAttachment={action.isAttachment}
isLoading={action.loading}
isSingleLine
/>
))}
<ReportActionItemDate timestamp={action.timestamp} />
Expand Down