feat: dynamic voice grid layout with ResizeObserver

Replace hardcoded Tailwind grid-cols breakpoints with a container-aware
layout algorithm that uses ResizeObserver to recompute optimal tile
arrangement. Maximizes tile area while maintaining 16:9 aspect ratio,
automatically adapting when VoiceChatPanel opens/closes, window resizes,
or fullscreen is toggled.
This commit is contained in:
Jannis Braun
2026-03-10 00:10:25 +01:00
parent 2999ca95a0
commit 4767c445be
4 changed files with 118 additions and 15 deletions
@@ -108,7 +108,7 @@ export function VoiceUser({ tile, large }: VoiceUserProps) {
isSpeaking
? 'ring-[3px] ring-status-online shadow-[0_0_12px_rgba(134,239,172,0.25)]'
: 'ring-1 ring-white/[0.06] hover:ring-white/10'
} ${large ? 'h-full w-full' : 'h-full aspect-video'}`}
} h-full w-full`}
onContextMenu={handleContextMenu}
>
{hasVideo ? (