fix: prevent username truncation in system messages with long topics#38236
fix: prevent username truncation in system messages with long topics#38236dodaa08 wants to merge 1 commit intoRocketChat:developfrom
Conversation
…s to fix user name truncation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
WalkthroughA CSS styling adjustment that prevents the MessageNameContainer from shrinking in flex layouts by setting Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #38236 +/- ##
===========================================
- Coverage 70.66% 70.65% -0.02%
===========================================
Files 3135 3135
Lines 108592 108592
Branches 19555 19542 -13
===========================================
- Hits 76740 76724 -16
- Misses 29845 29861 +16
Partials 2007 2007
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
dougfabris
left a comment
There was a problem hiding this comment.
Thanks for the contribution 🚀
As you can see this component lives in fuselage which is our components library.
The correct fix should be done there, would you up to raise a PR fixing this property there?
Sure, let me take a look! |
Hi, I have added a PR fixing this issue in Fuselage Repo. |
|
Thanks for the contribution 🚀 |
Proposed changes (including videos or screenshots)
When a system message contains a long room topic, the username gets truncated, This happens because the MessageNameContainer component shrinks to accommodate the long topic text in the flex layout.
Added flexShrink: 0 to the MessageNameContainer style in SystemMessage.tsx to prevent it from shrinking when the topic text is long.
Issue(s)
Fixes #38234COMM-121
Steps to test or reproduce
Further comments
FlexShrink: 0 to the MessageNameContainer prevents it from shrinking in the flex layout when the MessageSystemBody (topic text) is long. This ensures the username always displays fully, while the topic text can still wrap naturally.