Fix: Channel name truncation visibility #3166#3168
Fix: Channel name truncation visibility #3166#3168Rahulchaudharyji2 wants to merge 1 commit intoRocketChat:masterfrom
Conversation
WalkthroughA new hover tooltip mechanism is added to Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 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 |
|
This needs to be fixed on the core repo. I moved the issue there. |
Description
This PR addresses issue RocketChat/Rocket.Chat#38316 where long channel names in the sidebar are truncated without a way to view the full name.
It implements a solution using
bash src/injected.tsto inject abash mouseoverevent listener. This listener detects if an element with a class containing "title" (like sidebar items) is truncatedbash (scrollWidth > clientWidth). If so, it adds a native browserbash titleattribute, displaying the full text in a tooltip on hover.Logic
bash mouseoveronbash document.body(delegated).- Condition:
bash title.bash titleattribute tobash innerText.Tasks
Verified tooltips appear for truncated sidebar items.
Verified tooltips do NOT appear for long chat messages.
Issue
Closes RocketChat/Rocket.Chat#38316
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.