From a8db6c43fde28e07314b15f58ab7adee877d7f61 Mon Sep 17 00:00:00 2001 From: Julien BIANCHI Date: Thu, 29 Oct 2026 21:03:47 +0100 Subject: [PATCH] fix(users): size the stream sheet to what it shows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The stream sheet opened at medium, which left a gap under Watch now, most of all on a user's own profile, where there's no Open profile row. mobile-ui's new `fit` detent (NativePHP/mobile-ui#186) sizes a sheet to its content, so the sheet uses it. The content drops its bottom padding: the sheet already keeps clear of the home indicator, and the two together left far more room under the button than above the thumbnail. 🤖 Generated with Claude Code --- resources/views/native/partials/live-stream-sheet.blade.php | 6 +++--- tests/Feature/Screens/LiveAvatarTest.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/views/native/partials/live-stream-sheet.blade.php b/resources/views/native/partials/live-stream-sheet.blade.php index e5df3e0..d3dd87c 100644 --- a/resources/views/native/partials/live-stream-sheet.blade.php +++ b/resources/views/native/partials/live-stream-sheet.blade.php @@ -2,12 +2,12 @@ The web's live stream sheet, which a tap on a live user's avatar opens (see OpensLiveStream): the stream's thumbnail in 16:9 with the LIVE badge in its corner, "{name} is live" and where, Watch now, then who it is with Open profile, which their own profile leaves out. The thumbnail isn't kept on the device, as it changes while they - stream. Nothing is drawn until the sheet opens. + stream. The sheet is as tall as what it shows, with or without Open profile. Nothing is drawn until it opens. --}} @php($streamer = $liveStreamer === null ? null : \App\Devnull\Data\User::fromArray($liveStreamer)) - + @if ($streamer?->live) - + @if ($streamer->live->thumbnailUrl) diff --git a/tests/Feature/Screens/LiveAvatarTest.php b/tests/Feature/Screens/LiveAvatarTest.php index 9ac474c..b7a214e 100644 --- a/tests/Feature/Screens/LiveAvatarTest.php +++ b/tests/Feature/Screens/LiveAvatarTest.php @@ -140,7 +140,7 @@ function profileRingColour(TestableComponent $screen): string $screen = $screen->press("openLiveStream('ada')"); - expect(nodeByRef($screen, 'live-stream-sheet')['props']['visible'])->toBeTrue() + expect(nodeByRef($screen, 'live-stream-sheet')['props'])->toMatchArray(['visible' => true, 'detents' => 'fit']) ->and(nodeByRef($screen, 'live-stream-thumbnail')['props']['src'])->toBe('https://static-cdn.jtvnw.net/previews-ttv/live_user_ada-1280x720.jpg'); $screen->assertSee('Ada is live')