From 674bfe2e4e74149dd25a6ceab7e80b7ae085f23c Mon Sep 17 00:00:00 2001 From: Rutika Pawar <183392827+twilight2294@users.noreply.github.com> Date: Sun, 24 Nov 2024 23:04:15 +0530 Subject: [PATCH 1/5] do not truncate report name for room and groups --- src/pages/ReportDetailsPage.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/ReportDetailsPage.tsx b/src/pages/ReportDetailsPage.tsx index 8bf3da6e33e0..e6f8b14cbb99 100644 --- a/src/pages/ReportDetailsPage.tsx +++ b/src/pages/ReportDetailsPage.tsx @@ -744,6 +744,7 @@ 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} /> From 861b1a9ce9849a63e0f46e7cb0881bc4f0a23130 Mon Sep 17 00:00:00 2001 From: Rutika Pawar <183392827+twilight2294@users.noreply.github.com> Date: Sun, 24 Nov 2024 23:06:29 +0530 Subject: [PATCH 2/5] breakline if word doesn't fit the screen on title --- src/components/MenuItem.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/MenuItem.tsx b/src/components/MenuItem.tsx index 7fb5533fd172..fb2639e41c0f 100644 --- a/src/components/MenuItem.tsx +++ b/src/components/MenuItem.tsx @@ -469,6 +469,7 @@ function MenuItem( interactive && disabled ? {...styles.userSelectNone} : {}, styles.ltr, isDeleted ? styles.offlineFeedback.deleted : {}, + styles.breakWord, ], titleStyle ?? {}, ); From faa437791178894d662434a7df4bd82bdfa5f7b8 Mon Sep 17 00:00:00 2001 From: Rutika Pawar <183392827+twilight2294@users.noreply.github.com> Date: Sun, 24 Nov 2024 23:15:00 +0530 Subject: [PATCH 3/5] fix prettier --- src/components/MenuItem.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/MenuItem.tsx b/src/components/MenuItem.tsx index fb2639e41c0f..3463e930f1b9 100644 --- a/src/components/MenuItem.tsx +++ b/src/components/MenuItem.tsx @@ -469,7 +469,7 @@ function MenuItem( interactive && disabled ? {...styles.userSelectNone} : {}, styles.ltr, isDeleted ? styles.offlineFeedback.deleted : {}, - styles.breakWord, + styles.breakWord, ], titleStyle ?? {}, ); From fd6e7389fcfe11e28ce4f60b4d6bbdaee3315bad Mon Sep 17 00:00:00 2001 From: Rutika Pawar <183392827+twilight2294@users.noreply.github.com> Date: Tue, 26 Nov 2024 15:06:08 +0530 Subject: [PATCH 4/5] add conditional prop --- src/components/MenuItem.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/MenuItem.tsx b/src/components/MenuItem.tsx index 3463e930f1b9..c809e1b050bd 100644 --- a/src/components/MenuItem.tsx +++ b/src/components/MenuItem.tsx @@ -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; @@ -444,6 +447,7 @@ function MenuItem( shouldShowSelectedItemCheck = false, onHideTooltip, shouldIconUseAutoWidthStyle = false, + shouldBreakWord = false, }: MenuItemProps, ref: PressableRef, ) { @@ -469,7 +473,7 @@ function MenuItem( interactive && disabled ? {...styles.userSelectNone} : {}, styles.ltr, isDeleted ? styles.offlineFeedback.deleted : {}, - styles.breakWord, + shouldBreakWord ? styles.breakWord : {}, ], titleStyle ?? {}, ); From 98eec71b5ae7c3438b1333a755382c3e841ee37f Mon Sep 17 00:00:00 2001 From: Rutika Pawar <183392827+twilight2294@users.noreply.github.com> Date: Tue, 26 Nov 2024 15:06:33 +0530 Subject: [PATCH 5/5] pass shouldBreakWord prop --- src/pages/ReportDetailsPage.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/ReportDetailsPage.tsx b/src/pages/ReportDetailsPage.tsx index e6f8b14cbb99..b498fcd37e36 100644 --- a/src/pages/ReportDetailsPage.tsx +++ b/src/pages/ReportDetailsPage.tsx @@ -745,6 +745,7 @@ function ReportDetailsPage({policies, report, route, reportMetadata}: ReportDeta furtherDetails={chatRoomSubtitle && !isGroupChat ? additionalRoomDetails : ''} onPress={() => Navigation.navigate(ROUTES.REPORT_SETTINGS_NAME.getRoute(report.reportID, backTo))} numberOfLinesTitle={0} + shouldBreakWord />