Skip to content

Commit 453b555

Browse files
authored
fix(rooms): remove redundant hover tooltip on room header title (#1009)
Now that clicking the room header opens a Room Info modal with the full topic and details, the hover tooltip that peeked the topic/JID was duplicating that information. This removes the `Tooltip` wrapper around the header title button and moves its `flex-1 min-w-0` layout classes onto the button itself. The other header buttons (invite, search, occupants) still use `Tooltip`.
1 parent 13e8b49 commit 453b555

2 files changed

Lines changed: 26 additions & 32 deletions

File tree

apps/fluux/src/components/RoomHeader.tsx

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -123,20 +123,18 @@ export function RoomHeader({
123123
size="header"
124124
/>
125125

126-
{/* Name and info — opens Room Info modal; tooltip peeks the full topic */}
127-
<Tooltip content={room.subject?.trim() || room.jid} position="bottom" className="flex-1 min-w-0">
128-
<button
129-
type="button"
130-
onClick={() => setShowInfoModal(true)}
131-
aria-label={`${t('rooms.showRoomInfo', 'Room info')}: ${room.name}`}
132-
className="w-full min-w-0 text-start rounded-md px-1 -mx-1 py-0.5 hover:bg-fluux-hover transition-colors"
133-
>
134-
<span className="block font-semibold text-fluux-text truncate leading-tight">{room.name}</span>
135-
<p className="text-xs text-fluux-muted truncate">
136-
{room.subject?.trim() ? renderTextWithLinks(room.subject) : room.jid}
137-
</p>
138-
</button>
139-
</Tooltip>
126+
{/* Name and info — opens Room Info modal with the full topic and details */}
127+
<button
128+
type="button"
129+
onClick={() => setShowInfoModal(true)}
130+
aria-label={`${t('rooms.showRoomInfo', 'Room info')}: ${room.name}`}
131+
className="flex-1 min-w-0 text-start rounded-md px-1 -mx-1 py-0.5 hover:bg-fluux-hover transition-colors"
132+
>
133+
<span className="block font-semibold text-fluux-text truncate leading-tight">{room.name}</span>
134+
<p className="text-xs text-fluux-muted truncate">
135+
{room.subject?.trim() ? renderTextWithLinks(room.subject) : room.jid}
136+
</p>
137+
</button>
140138

141139
{/* Trailing action cluster — grouped tightly on mobile (gap-1) so the
142140
kebab and members pill read as one unit; desktop keeps the header's md

apps/fluux/src/components/__snapshots__/RoomView.test.tsx.snap

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,22 @@ exports[`RoomView > Snapshots > should match snapshot for non-joined room 1`] =
1717
data-name="Test Room"
1818
data-testid="avatar"
1919
/>
20-
<div
21-
class="flex-1 min-w-0"
20+
<button
21+
aria-label="rooms.showRoomInfo: Test Room"
22+
class="flex-1 min-w-0 text-start rounded-md px-1 -mx-1 py-0.5 hover:bg-fluux-hover transition-colors"
23+
type="button"
2224
>
23-
<button
24-
aria-label="rooms.showRoomInfo: Test Room"
25-
class="w-full min-w-0 text-start rounded-md px-1 -mx-1 py-0.5 hover:bg-fluux-hover transition-colors"
26-
type="button"
25+
<span
26+
class="block font-semibold text-fluux-text truncate leading-tight"
2727
>
28-
<span
29-
class="block font-semibold text-fluux-text truncate leading-tight"
30-
>
31-
Test Room
32-
</span>
33-
<p
34-
class="text-xs text-fluux-muted truncate"
35-
>
36-
room@conference.example.com
37-
</p>
38-
</button>
39-
</div>
28+
Test Room
29+
</span>
30+
<p
31+
class="text-xs text-fluux-muted truncate"
32+
>
33+
room@conference.example.com
34+
</p>
35+
</button>
4036
<div
4137
class="flex items-center gap-1 md:gap-3"
4238
>

0 commit comments

Comments
 (0)