Skip to content

Commit

Permalink
Merge pull request #53553 from twilight2294/patch-14
Browse files Browse the repository at this point in the history
Fix: Room name displayed truncated on header and details when using long name & Limit thread heading to two lines
  • Loading branch information
mjasikowski authored Dec 6, 2024
2 parents 7d42188 + 351b920 commit 7fbac55
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/MenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,9 @@ type MenuItemBaseProps = {

/** Should use auto width for the icon container. */
shouldIconUseAutoWidthStyle?: boolean;

/** Should break word for room title */
shouldBreakWord?: boolean;
};

type MenuItemProps = (IconProps | AvatarProps | NoIcon) & MenuItemBaseProps;
Expand Down Expand Up @@ -457,6 +460,7 @@ function MenuItem(
shouldShowSelectedItemCheck = false,
onHideTooltip,
shouldIconUseAutoWidthStyle = false,
shouldBreakWord = false,
}: MenuItemProps,
ref: PressableRef,
) {
Expand All @@ -482,6 +486,7 @@ function MenuItem(
interactive && disabled ? {...styles.userSelectNone} : {},
styles.ltr,
isDeleted ? styles.offlineFeedback.deleted : {},
shouldBreakWord ? styles.breakWord : {},
],
titleStyle ?? {},
);
Expand Down
2 changes: 2 additions & 0 deletions src/pages/ReportDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,8 @@ function ReportDetailsPage({policies, report, route, reportMetadata}: ReportDeta
description={!shouldDisableRename ? roomDescription : ''}
furtherDetails={chatRoomSubtitle && !isGroupChat ? additionalRoomDetails : ''}
onPress={() => Navigation.navigate(ROUTES.REPORT_SETTINGS_NAME.getRoute(report.reportID, backTo))}
numberOfLinesTitle={isThread ? 2 : 0}
shouldBreakWord
/>
</View>
</OfflineWithFeedback>
Expand Down

0 comments on commit 7fbac55

Please sign in to comment.