fix: channel sidebar and reaction bubbles to match Aether Drift prototype

Channel sidebar: subtle bg-surface-elevated highlight with rounded-[6px],
active channel left pill, rose unread dot on right, smaller #/voice icons
(18px), 10px horizontal padding, 24px voice user avatars at 36px indent.

Reaction bubbles: inline styles for background/border colors to bypass
Tailwind opacity modifier failures on hex CSS variables. Both mine (mint
tint) and non-mine states now render visible pill containers reliably.
This commit is contained in:
Jannis Braun
2026-03-02 14:45:47 +01:00
parent 31562c2b29
commit cdee450cf5
3 changed files with 46 additions and 18 deletions
+20 -5
View File
@@ -248,11 +248,26 @@ export function Message({ message, isCompact, isFirstInGroup }: MessageProps) {
<button
key={emoji}
onClick={() => toggleReaction(emoji)}
className={`flex items-center gap-1 px-2 py-0.5 rounded-md text-[13px] border transition-all duration-[120ms] ease-out cursor-pointer ${
me
? 'bg-accent-mint/10 border-accent-mint/25 hover:bg-accent-mint/15'
: 'bg-white/[0.04] border-border-soft hover:bg-white/[0.08] hover:border-white/[0.12]'
}`}
className="flex items-center gap-1 px-2 py-0.5 rounded-md text-[13px] border transition-all duration-[120ms] ease-out cursor-pointer"
style={me ? {
background: 'rgba(134, 239, 172, 0.10)',
borderColor: 'rgba(134, 239, 172, 0.25)',
} : {
background: 'rgba(255, 255, 255, 0.04)',
borderColor: 'var(--border-soft)',
}}
onMouseEnter={(e) => {
e.currentTarget.style.background = me
? 'rgba(134, 239, 172, 0.15)'
: 'rgba(255, 255, 255, 0.08)';
if (!me) e.currentTarget.style.borderColor = 'rgba(255, 255, 255, 0.12)';
}}
onMouseLeave={(e) => {
e.currentTarget.style.background = me
? 'rgba(134, 239, 172, 0.10)'
: 'rgba(255, 255, 255, 0.04)';
if (!me) e.currentTarget.style.borderColor = 'var(--border-soft)';
}}
>
<span>{emoji}</span>
<span className={`text-xs font-semibold ${me ? 'text-accent-mint' : 'text-txt-secondary'}`}>{count}</span>
@@ -322,23 +322,30 @@ export function ChannelSidebar() {
</div>
<div className="space-y-[2px]">
{textChannels.map((channel) => {
const isUnread = unreadChannels.has(channel.id) && currentChannelId !== channel.id;
const isActive = currentChannelId === channel.id;
const isUnread = unreadChannels.has(channel.id) && !isActive;
return (
<button
key={channel.id}
onClick={() => handleChannelClick(channel.id)}
className={`w-full flex items-center gap-1.5 px-2 h-8 rounded-[4px] group transition-colors ${
currentChannelId === channel.id
? 'bg-interactive-selected text-white'
className={`relative w-full flex items-center gap-1.5 px-[10px] h-8 rounded-[6px] group transition-colors ${
isActive
? 'bg-surface-elevated text-txt-primary'
: isUnread
? 'text-white hover:text-white hover:bg-interactive-hover'
: 'text-txt-tertiary hover:text-txt-secondary hover:bg-interactive-hover'
}`}
>
{isUnread && (
<div className="absolute -left-0.5 w-1 h-2 bg-white rounded-r-full" />
{isActive && (
<div
className="absolute -left-[2px] top-1/2 -translate-y-1/2 w-[3px] bg-white rounded-r-full"
style={{ height: '55%', opacity: 0.7 }}
/>
)}
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" className="flex-shrink-0 opacity-60">
{isUnread && (
<div className="absolute right-2 top-1/2 -translate-y-1/2 w-2 h-2 rounded-full bg-accent-rose" />
)}
<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor" className="flex-shrink-0 text-[#6e6e7a]">
<path d="M5.88657 21C5.57547 21 5.3399 20.7189 5.39427 20.4126L6.00001 17H2.59511C2.28449 17 2.04905 16.7198 2.10259 16.4138L2.27759 15.4138C2.31946 15.1746 2.52722 15 2.77011 15H6.35001L7.41001 9H4.00511C3.69449 9 3.45905 8.71977 3.51259 8.41381L3.68759 7.41381C3.72946 7.17456 3.93722 7 4.18011 7H7.76001L8.39677 3.41262C8.43914 3.17391 8.64664 3 8.88907 3H9.87344C10.1845 3 10.4201 3.28107 10.3657 3.58738L9.76001 7H15.76L16.3968 3.41262C16.4391 3.17391 16.6466 3 16.8891 3H17.8734C18.1845 3 18.4201 3.28107 18.3657 3.58738L17.76 7H21.1649C21.4755 7 21.711 7.28023 21.6574 7.58619L21.4824 8.58619C21.4406 8.82544 21.2328 9 20.9899 9H17.41L16.35 15H19.7549C20.0655 15 20.301 15.2802 20.2474 15.5862L20.0724 16.5862C20.0306 16.8254 19.8228 17 19.5799 17H16L15.3632 20.5874C15.3209 20.8261 15.1134 21 14.8709 21H13.8866C13.5755 21 13.3399 20.7189 13.3943 20.4126L14 17H8.00001L7.36325 20.5874C7.32088 20.8261 7.11337 21 6.87094 21H5.88657ZM9.41001 9L8.35001 15H14.35L15.41 9H9.41001Z" />
</svg>
<span className={`truncate text-[15px] flex-1 text-left ${isUnread ? 'font-semibold' : 'font-medium'}`}>{channel.name}</span>
@@ -27,13 +27,19 @@ export function VoiceChannel({ channelId, channelName, onClick }: VoiceChannelPr
<div>
<button
onClick={onClick}
className={`w-full flex items-center gap-1.5 px-2 h-8 rounded-[4px] group transition-colors ${
className={`relative w-full flex items-center gap-1.5 px-[10px] h-8 rounded-[6px] group transition-colors ${
isActive
? 'bg-interactive-selected text-white'
? 'bg-surface-elevated text-txt-primary'
: 'text-txt-tertiary hover:text-txt-secondary hover:bg-interactive-hover'
}`}
>
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" className="flex-shrink-0 opacity-60">
{isActive && (
<div
className="absolute -left-[2px] top-1/2 -translate-y-1/2 w-[3px] bg-white rounded-r-full"
style={{ height: '55%', opacity: 0.7 }}
/>
)}
<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor" className="flex-shrink-0 text-[#6e6e7a]">
<path d="M11 5L6 9H2V15H6L11 19V5ZM15.54 8.46C16.48 9.4 17 10.67 17 12S16.48 14.6 15.54 15.54L14.12 14.12C14.69 13.55 15 12.79 15 12S14.69 10.45 14.12 9.88L15.54 8.46ZM19.07 4.93C20.91 6.77 22 9.28 22 12C22 14.72 20.91 17.23 19.07 19.07L17.66 17.66C19.11 16.21 20 14.21 20 12C20 9.79 19.11 7.79 17.66 6.34L19.07 4.93Z" />
</svg>
<span className="truncate text-[15px] font-medium">{channelName}</span>
@@ -41,7 +47,7 @@ export function VoiceChannel({ channelId, channelName, onClick }: VoiceChannelPr
{/* Connected users */}
{voiceUsers.length > 0 && (
<div className="ml-6 mt-0.5 space-y-0.5">
<div className="ml-9 mt-0.5 space-y-0.5">
{voiceUsers.map((userId) => {
const member = members.find(m => m.userId === userId);
const participant = participants.find(p => p.userId === userId);
@@ -61,11 +67,11 @@ export function VoiceChannel({ channelId, channelName, onClick }: VoiceChannelPr
const isScreenSharing = participant?.isScreenSharing ?? wsStatus?.isScreenSharing ?? false;
return (
<div key={userId} className="flex items-center gap-2 px-2 py-0.5 rounded hover:bg-interactive-hover transition-colors">
<div key={userId} className="flex items-center gap-2 px-[10px] py-1 rounded-[6px] hover:bg-interactive-hover transition-colors">
<Avatar
src={avatar}
name={displayName}
size={20}
size={24}
status={status}
userId={userId}
/>