Skip to content

Commit

Permalink
revert TaskHeader multiline display changes
Browse files Browse the repository at this point in the history
  • Loading branch information
akinwale committed Jun 6, 2023
1 parent 2defd1d commit 361b998
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
5 changes: 1 addition & 4 deletions src/components/MenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ const defaultProps = {
shouldStackHorizontally: false,
avatarSize: undefined,
shouldBlockSelection: false,
shouldShowMultilineTitle: false,
hoverAndPressStyle: [],
furtherDetails: '',
furtherDetailsIcon: undefined,
Expand All @@ -80,11 +79,9 @@ const MenuItem = (props) => {
props.icon ? styles.ml3 : undefined,
props.shouldShowBasicTitle ? undefined : styles.textStrong,
props.interactive && props.disabled ? {...styles.disabledText, ...styles.userSelectNone} : undefined,
props.shouldShowMultilineTitle ? undefined : styles.pre,
styles.ltr,
props.shouldShowHeaderTitle ? styles.textHeadlineH1 : undefined,
isDeleted ? styles.offlineFeedback.deleted : undefined,
props.shouldShowMultilineTitle ? styles.flexWrap : undefined,
],
props.titleStyle,
);
Expand Down Expand Up @@ -173,7 +170,7 @@ const MenuItem = (props) => {
{Boolean(props.title) && (
<Text
style={titleTextStyle}
numberOfLines={props.shouldShowMultilineTitle ? 0 : 1}
numberOfLines={1}
>
{convertToLTR(props.title)}
</Text>
Expand Down
1 change: 0 additions & 1 deletion src/components/TaskHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ function TaskHeader(props) {
description={props.translate('newTaskPage.description')}
onPress={() => Navigation.navigate(ROUTES.getTaskReportDescriptionRoute(props.report.reportID))}
disabled={!isOpen}
shouldShowMultilineTitle
/>
</View>
);
Expand Down
3 changes: 0 additions & 3 deletions src/components/menuItemPropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,6 @@ const propTypes = {

/** An icon to display under the main item */
furtherDetailsIcon: PropTypes.oneOfType([PropTypes.elementType, PropTypes.string]),

/** Flag to indicate whether or not the title should be displayed using multiple lines. */
shouldShowMultilineTitle: PropTypes.bool,
};

export default propTypes;

0 comments on commit 361b998

Please sign in to comment.