diff --git a/resources/views/native/commit-detail.blade.php b/resources/views/native/commit-detail.blade.php index 0bf6538..225a1eb 100644 --- a/resources/views/native/commit-detail.blade.php +++ b/resources/views/native/commit-detail.blade.php @@ -102,14 +102,16 @@ @if ($commit) {{-- The bar is painted from its first child's background: native:bottom-bar takes no classes of its own, so - the surface and the hairline above it belong to this column, or the replies show through. + the surface and the hairline above it belong to this column, or the replies show through. On iOS the bar + is bare and the field is a Liquid Glass plate instead, the way the HIG floats controls over content; the + hairline stays as a clear 1pt so the bar keeps the height Display::ReplyBarHeight counts on. --}} - - + + {{-- EDGE sends no focus event, so a press on the field is how the page learns you're replying. --}} - + toBe([]); }); -it('paints the reply bar solid, with its hairline, so the replies never show through', function () { +it('paints the reply bar solid on Android, with its hairline, so the replies never show through', function () { fakeThread(); - $screen = Native::visit('/log/commits/c2', platform: 'ios'); + $screen = Native::visit('/log/commits/c2', platform: 'android'); $bar = findNode($screen->tree(), fn (array $node): bool => ($node['type'] ?? null) === 'bottom_bar'); expect($bar['children'][0]['ref'] ?? null)->toBe('reply-bar') ->and($bar['children'][0]['style']['bg_color'] ?? null)->toBe(config('native-ui.theme.light.surface')) ->and($bar['children'][0]['props']['dark_bg_color'] ?? null)->toBe(config('native-ui.theme.dark.surface')) - ->and($bar['children'][0]['children'][0]['style']['bg_color'] ?? null)->toBe(config('native-ui.theme.light.hairline')); + ->and($bar['children'][0]['children'][0]['style']['bg_color'] ?? null)->toBe(config('native-ui.theme.light.hairline')) + ->and(nodeByRef($screen, 'reply-field')['props']['glass'] ?? null)->toBeNull(); +}); + +it('leaves the reply bar bare on iOS and floats the field on Liquid Glass', function () { + fakeThread(); + + $screen = Native::visit('/log/commits/c2', platform: 'ios'); + $bar = findNode($screen->tree(), fn (array $node): bool => ($node['type'] ?? null) === 'bottom_bar'); + + expect($bar['children'][0]['ref'] ?? null)->toBe('reply-bar') + ->and($bar['children'][0]['style']['bg_color'] ?? null)->toBeNull() + ->and($bar['children'][0]['children'][0]['style']['bg_color'] ?? null)->toBeNull() + ->and(nodeByRef($screen, 'reply-field')['props']['glass'] ?? null)->toBe(1); }); it('ends the page above the reply bar, and further as the draft grows', function () {