Skip to content

Commit

Permalink
Merge pull request #53041 from twilight2294/patch-9
Browse files Browse the repository at this point in the history
Fix: Room name displayed truncated on header and details when using long name
  • Loading branch information
chiragsalian authored Nov 26, 2024
2 parents eb1534f + 98eec71 commit 4dbd937
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 @@ -342,6 +342,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 @@ -444,6 +447,7 @@ function MenuItem(
shouldShowSelectedItemCheck = false,
onHideTooltip,
shouldIconUseAutoWidthStyle = false,
shouldBreakWord = false,
}: MenuItemProps,
ref: PressableRef,
) {
Expand All @@ -469,6 +473,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={0}
shouldBreakWord
/>
</View>
</OfflineWithFeedback>
Expand Down

0 comments on commit 4dbd937

Please sign in to comment.