From 08a1437b443ebdb13581b8393291bef3dd88264f Mon Sep 17 00:00:00 2001 From: isaacclad Date: Fri, 3 Jul 2026 15:13:22 +0000 Subject: [PATCH] Tighten mobile meet room header and bottom toolbar layout. Show participant count without labels on phones, cap the title at 40% width, and keep four bottom-nav icons by moving React into More only after speak access is granted. Co-authored-by: Cursor --- app/Services/Meet/ParticipantPresenter.php | 33 +++++++++++++++++++--- resources/js/meet-room.js | 18 ++++++++++-- resources/views/meet/room/show.blade.php | 29 ++++++++++--------- 3 files changed, 60 insertions(+), 20 deletions(-) diff --git a/app/Services/Meet/ParticipantPresenter.php b/app/Services/Meet/ParticipantPresenter.php index 4cf0b1a..38182f9 100644 --- a/app/Services/Meet/ParticipantPresenter.php +++ b/app/Services/Meet/ParticipantPresenter.php @@ -85,19 +85,44 @@ class ParticipantPresenter * @param list> $participants * @param list $presenterRefs */ - public static function headerCountLabel(array $participants, bool $usesStageLayout, array $presenterRefs = []): string + public static function headerCountNumber(array $participants, bool $usesStageLayout, array $presenterRefs = []): string + { + $joined = array_values(array_filter($participants, fn ($p) => ($p['status'] ?? '') === 'joined')); + + if ($usesStageLayout) { + $count = count(array_filter($joined, fn ($p) => self::isSpeakerPerson($p, $presenterRefs))); + } else { + $count = count($joined); + } + + return (string) $count; + } + + /** + * @param list> $participants + * @param list $presenterRefs + */ + public static function headerCountSuffix(array $participants, bool $usesStageLayout, array $presenterRefs = []): string { $joined = array_values(array_filter($participants, fn ($p) => ($p['status'] ?? '') === 'joined')); if ($usesStageLayout) { $count = count(array_filter($joined, fn ($p) => self::isSpeakerPerson($p, $presenterRefs))); - return $count === 1 ? '1 speaker' : "{$count} speakers"; + return $count === 1 ? ' speaker' : ' speakers'; } - $count = count($joined); + return ' in call'; + } - return "{$count} in call"; + /** + * @param list> $participants + * @param list $presenterRefs + */ + public static function headerCountLabel(array $participants, bool $usesStageLayout, array $presenterRefs = []): string + { + return self::headerCountNumber($participants, $usesStageLayout, $presenterRefs) + .self::headerCountSuffix($participants, $usesStageLayout, $presenterRefs); } /** diff --git a/resources/js/meet-room.js b/resources/js/meet-room.js index d94416b..1ec419a 100644 --- a/resources/js/meet-room.js +++ b/resources/js/meet-room.js @@ -1087,14 +1087,26 @@ function meetRoom() { return this.inCallParticipants().length; }, - headerParticipantLabel() { + headerParticipantCount() { + if (this.usesStageLayout) { + return String(this.speakerCount()); + } + + return String(this.participantCount()); + }, + + headerParticipantSuffix() { if (this.usesStageLayout) { const count = this.speakerCount(); - return count === 1 ? '1 speaker' : `${count} speakers`; + return count === 1 ? ' speaker' : ' speakers'; } - return `${this.participantCount()} in call`; + return ' in call'; + }, + + headerParticipantLabel() { + return this.headerParticipantCount() + this.headerParticipantSuffix(); }, inCallParticipants() { diff --git a/resources/views/meet/room/show.blade.php b/resources/views/meet/room/show.blade.php index cc59362..671f8ba 100644 --- a/resources/views/meet/room/show.blade.php +++ b/resources/views/meet/room/show.blade.php @@ -34,7 +34,12 @@ $sessionNounTitle = ucfirst($sessionNoun); $presenterRefsList = (array) ($presenterRefs ?? []); $headerHostPerson = ParticipantPresenter::headerHost($joinedParticipants->all(), $roomHost); - $headerParticipantLabel = ParticipantPresenter::headerCountLabel( + $headerParticipantCount = ParticipantPresenter::headerCountNumber( + $joinedParticipants->all(), + (bool) ($usesStageLayout ?? false), + $presenterRefsList, + ); + $headerParticipantSuffix = ParticipantPresenter::headerCountSuffix( $joinedParticipants->all(), (bool) ($usesStageLayout ?? false), $presenterRefsList, @@ -140,8 +145,8 @@
-
-
+
+

{{ $room->title }}

@if ($isAudioOnly ?? false)

Audio room

@@ -172,9 +177,10 @@ is_locked) style="display: none" @endunless class="rounded bg-amber-600 px-2 py-0.5 font-medium text-white">Locked
@@ -381,7 +387,7 @@ @include('meet.room.partials.meet-icon', ['icon' => 'applause'])