fix(fuselage): username truncate in system msg with long topics#1850
fix(fuselage): username truncate in system msg with long topics#1850juliajforesti merged 7 commits intoRocketChat:mainfrom
Conversation
Add flex-shrink: 0 to MessageNameContainer to prevent it from shrinking when MessageSystemBody (topic text) is long. This ensures usernames always display fully without truncation. Fixes #38234
🦋 Changeset detectedLatest commit: 1c688c6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
juliajforesti
left a comment
There was a problem hiding this comment.
hey @dodaa08 !
thanks for your contribution :)
can you please add that story case to the MessageSystem.stories ?
Sure, let me do that. |
@juliajforesti I've added the story case, let me know if anything else is needed. |
juliajforesti
left a comment
There was a problem hiding this comment.
What happens if the user has a reeeealy long name though? 🤔
Like in the first ss in the PR, the topic will truncate more... |
|
Ok, we're moving forward with this approach - it's more important to display the complete name. Since you added a story, you'll have to update the snapshots |
got it! |
|
CI snapshot test is still failing, did you update it? |
Yeah, let me check it again |
The Name in Snap didn't match the one in the story, I locally generated it after adding a big name so, hoping it to pass now. |
|
Thanks @juliajforesti ! |


Proposed changes (including videos or screenshots)
When a system message contains a long room topic, the username gets truncated. This happens because the
MessageNameContainercomponent shrinks to accommodate the long topic text in the flex layout.Before: Username was truncated when channel topic was long
After: Username displays fully without truncation, topic text wraps naturally
Tested with a demo Storybook component to verify the fix works correctly
ref : RocketChat/Rocket.Chat#38236
Added
flex-shrink: 0to theMessageNameContainerstyle (&__name-containerinMessages.styles.scss) to prevent it from shrinking when theMessageSystemBody(topic text) is long.Issue(s)
Fixes RocketChat/Rocket.Chat#38234
COMM-121
Further comments
flex-shrink: 0prevents theMessageNameContainerfrom shrinking in the flex layout when theMessageSystemBody(topic text) is long. This ensures the username always displays fully, while the topic text can still wrap naturally.This fix is applied to the
MessageNameContainercomponent which is used in both regular messages and system messages. The change follows the same pattern used for&__timewhich also hasflex-shrink: 0to prevent truncation.