From de4235bed5ec8e8920c23898f8ce779dcff611db Mon Sep 17 00:00:00 2001 From: Simon Hamp Date: Sun, 22 Nov 2026 10:23:02 +0000 Subject: [PATCH 1/4] Blur what scrolls under the composer bars with iOS 26's scroll edge effect Both composer bars now carry scroll-edge-soft next to glass/80. With a mobile-air that knows the class, iOS 26 and later draw the system scroll edge effect under the bar, a progressive blur like the one under its own toolbars, and the bar drops its fade row and the tint on its rows so the effect shows. Older iOS keeps the fade over glass, and Android its fade over the surface. Which iOS the phone runs comes from System::osVersion(). Without a mobile-air that has it, every iOS keeps the fade, and the new tests skip (tests/Support/ScrollEdge.php). Co-Authored-By: Claude Opus 5.5 --- app/Devnull/Display.php | 52 ++++++++++++++++++- app/NativeComponents/Conversation.php | 2 +- .../views/native/commit-detail.blade.php | 7 +-- resources/views/native/conversation.blade.php | 5 +- .../native/partials/composer-fade.blade.php | 3 +- .../Devnull/ComposerScrollEdgeTest.php | 45 ++++++++++++++++ tests/Feature/Screens/CommitDetailTest.php | 29 +++++++++++ tests/Feature/Screens/RemotesComposerTest.php | 17 ++++++ tests/Support/ScrollEdge.php | 48 +++++++++++++++++ 9 files changed, 199 insertions(+), 9 deletions(-) create mode 100644 tests/Feature/Devnull/ComposerScrollEdgeTest.php create mode 100644 tests/Support/ScrollEdge.php diff --git a/app/Devnull/Display.php b/app/Devnull/Display.php index 6648e4e7..32e9d307 100644 --- a/app/Devnull/Display.php +++ b/app/Devnull/Display.php @@ -5,6 +5,7 @@ use App\Devnull\Data\CommitBody; use Carbon\CarbonImmutable; use Carbon\CarbonInterface; +use Native\Mobile\Facades\System; use Native\Mobile\Platform; /** @@ -50,6 +51,11 @@ final class Display */ public const int ComposerGlassOpacity = 80; + /** + * The first iOS whose scroll views draw a scroll edge effect under a bar (see hasScrollEdge()). + */ + public const int ScrollEdgeIosVersion = 26; + /** * About how many characters fit on a line of the box's field, which runs the width of the box. */ @@ -253,7 +259,7 @@ public static function maskedKey(string $openSsh): string */ public static function replyBarClearance(string $draft, bool $hasPhotos = false, bool $describing = false): int { - return self::ComposerFadeHeight + return self::composerFadeHeight() + self::ComposerBoxBarHeight + self::composerBoxGrowth($draft) + ($hasPhotos ? self::ReplyBarPhotosHeight : 0) @@ -302,6 +308,40 @@ public static function fadesInBar(): bool return Platform::isIos(); } + /** + * Whether the composer bars stand on iOS's own scroll edge effect: iOS 26 and later blur what scrolls under the + * bar progressively, as under its own toolbars, from the bar's scroll-edge-soft class (see composerBarGlass()). + * That stands in for the fade and the tinted glass, so a bar there draws neither and lets the effect show. Older + * iOS keeps the fade over glass, and Android its fade over the surface. + * + * It needs a mobile-air that draws the effect for a bottom bar and says which iOS the phone runs + * (System::osVersion()). Without one this is false and every iOS keeps the fade. + */ + public static function hasScrollEdge(): bool + { + if (! Platform::isIos() || ! method_exists(\Native\Mobile\System::class, 'osVersion')) { + return false; + } + + return (int) System::osVersion() >= self::ScrollEdgeIosVersion; + } + + /** + * Whether a composer bar draws partials/composer-fade as its first row: on iOS, before the scroll edge effect. + */ + public static function fadeRowInBar(): bool + { + return self::fadesInBar() && ! self::hasScrollEdge(); + } + + /** + * How tall the composer fade is where it's drawn: none where the scroll edge effect replaces it. + */ + public static function composerFadeHeight(): int + { + return self::hasScrollEdge() ? 0 : self::ComposerFadeHeight; + } + /** * The classes for a composer's native:bottom-bar. On iOS that's Liquid Glass: what scrolls under the bar shows * through it, blurred. A patched mobile-air draws the glass behind the whole bar, under the home indicator too, @@ -309,10 +349,14 @@ public static function fadesInBar(): bool * an element can't be faded, and stops short of the home indicator. The glass stops at ComposerGlassOpacity * percent (glass/N), so a little of the screen under the bar shows through. Android has no glass, so the bar * stays the surface there. + * + * scroll-edge-soft asks iOS 26 and later for its scroll edge effect under the bar instead, a progressive blur + * like the one under its own toolbars, and a patched mobile-air leaves the glass out there (see hasScrollEdge()). + * Older iOS ignores it and keeps the glass. */ public static function composerBarGlass(): string { - return self::fadesInBar() ? 'glass/'.self::ComposerGlassOpacity : ''; + return self::fadesInBar() ? 'glass/'.self::ComposerGlassOpacity.' scroll-edge-soft' : ''; } /** @@ -333,6 +377,10 @@ public static function composerBar(): string */ public static function composerSurface(): string { + if (self::hasScrollEdge()) { + return ''; + } + return self::fadesInBar() ? 'bg-theme-surface/'.self::ComposerGlassTint : 'bg-theme-surface'; } diff --git a/app/NativeComponents/Conversation.php b/app/NativeComponents/Conversation.php index 3f8767e5..8bd97c9b 100644 --- a/app/NativeComponents/Conversation.php +++ b/app/NativeComponents/Conversation.php @@ -1839,7 +1839,7 @@ private function longPins(): array */ private static function composerClearance(string $draft, bool $replying, bool $hasPhotos, bool $describing): int { - return Display::ComposerFadeHeight + self::ComposerBarHeight + Display::composerBoxGrowth($draft) + return Display::composerFadeHeight() + self::ComposerBarHeight + Display::composerBoxGrowth($draft) + ($replying ? self::ReplyingBarHeight : 0) + ($hasPhotos ? self::PhotosHeight : 0) + ($hasPhotos && $describing ? self::DescriptionHeight : 0) diff --git a/resources/views/native/commit-detail.blade.php b/resources/views/native/commit-detail.blade.php index 5d26c304..91978b39 100644 --- a/resources/views/native/commit-detail.blade.php +++ b/resources/views/native/commit-detail.blade.php @@ -135,8 +135,9 @@ The reply bar, drawn as the Remotes composer is: the field across the top and a row under it with the tools on the left and the round send button on the right (see partials/composer-box), with the page fading out above it (see partials/composer-fade). On iOS the bar is Liquid Glass, faded in at the top, so the page - shows through it blurred (see Display::composerBarGlass()). On Android it's the surface, painted from this - column. Either fills the strip under the home indicator. + shows through it blurred (see Display::composerBarGlass()). From iOS 26 the system's scroll edge effect + blurs the page under the bar instead, with no fade or glass (see Display::hasScrollEdge()). On Android + it's the surface, painted from this column. Either fills the strip under the home indicator. The bar does everything the composer sheet did for a reply, so a reply never needs the sheet, whose presenting takes the keyboard down and back up on both platforms. The photo button adds photos from the @@ -153,7 +154,7 @@ @php($replyPostsAs = $replyPostingMe !== null && \App\Devnull\PostAs::offered($replyAuthor)) - @if (\App\Devnull\Display::fadesInBar()) + @if (\App\Devnull\Display::fadeRowInBar()) @include('native.partials.composer-fade', ['ref' => 'reply-fade', 'inBar' => true]) @endif diff --git a/resources/views/native/conversation.blade.php b/resources/views/native/conversation.blade.php index 5191385f..c68a3c5a 100644 --- a/resources/views/native/conversation.blade.php +++ b/resources/views/native/conversation.blade.php @@ -81,14 +81,15 @@ The composer: the field over a row holding the + and the round send button (see partials/composer-box), with the thread fading out above it (see partials/composer-fade) rather than meeting a line. On iOS the bar is Liquid Glass, faded in at the top, so the thread shows through it blurred (see - Display::composerBarGlass()). On Android it's the surface. Either fills the strip under the home indicator. + Display::composerBarGlass()). From iOS 26 the system's scroll edge effect blurs the thread under the bar + instead, with no fade or glass (see Display::hasScrollEdge()). On Android it's the surface. Either fills the strip under the home indicator. The web's tools, photos, the microphone and Ping, open from the one +. Above the field sit the people to mention, what you're replying to and the photos on the draft. While the thread can't take a message, why goes in the field's place. --}} - @if (\App\Devnull\Display::fadesInBar()) + @if (\App\Devnull\Display::fadeRowInBar()) @include('native.partials.composer-fade', ['ref' => 'composer-fade', 'inBar' => true]) @endif diff --git a/resources/views/native/partials/composer-fade.blade.php b/resources/views/native/partials/composer-fade.blade.php index 7a817f43..023b2a87 100644 --- a/resources/views/native/partials/composer-fade.blade.php +++ b/resources/views/native/partials/composer-fade.blade.php @@ -6,7 +6,8 @@ Where it goes depends on the platform (Display::fadesInBar()). On iOS the screen runs on under the bar, so the fade is the bar's first row ($inBar), over what runs under it, and the bar's glass fades in under it over the same height (see Display::composerBarGlass()). On Android the screen stops at the bar, so the fade lies over the foot of - the screen's scroll view, at the bottom of the stack around it. $ref names it. + the screen's scroll view, at the bottom of the stack around it. From iOS 26 there's no fade at all: the system's + scroll edge effect blurs what runs under the bar (Display::fadeRowInBar()). $ref names it. --}} @php($inBar ??= false) diff --git a/tests/Feature/Devnull/ComposerScrollEdgeTest.php b/tests/Feature/Devnull/ComposerScrollEdgeTest.php new file mode 100644 index 00000000..2da10027 --- /dev/null +++ b/tests/Feature/Devnull/ComposerScrollEdgeTest.php @@ -0,0 +1,45 @@ +toBe($edge) + ->and(Display::fadeRowInBar())->toBe($platform === 'ios' && ! $edge) + ->and(Display::composerFadeHeight())->toBe($edge ? 0 : Display::ComposerFadeHeight) + ->and(Display::composerSurface() === '')->toBe($edge); + } finally { + System::rememberPlatform(null); + } + }); +})->with([ + 'iOS 18' => ['ios', '18.5', false], + 'iOS 26' => ['ios', '26.0', true], + 'iOS 26.1' => ['ios', '26.1', true], + 'iOS 27' => ['ios', '27.0.1', true], + 'Android 16' => ['android', '16', false], + 'Android 26' => ['android', '26', false], +]); + +it('asks iOS for the soft scroll edge effect under the composer bars, over glass for older iOS', function () { + System::rememberPlatform('ios'); + + try { + expect(Display::composerBarGlass())->toBe('glass/'.Display::ComposerGlassOpacity.' scroll-edge-soft'); + } finally { + System::rememberPlatform(null); + } + + System::rememberPlatform('android'); + + try { + expect(Display::composerBarGlass())->toBe(''); + } finally { + System::rememberPlatform(null); + } +}); diff --git a/tests/Feature/Screens/CommitDetailTest.php b/tests/Feature/Screens/CommitDetailTest.php index 591eb7f1..4a9bda70 100644 --- a/tests/Feature/Screens/CommitDetailTest.php +++ b/tests/Feature/Screens/CommitDetailTest.php @@ -10,6 +10,7 @@ use Native\Mobile\Events\Alert\ButtonPressed; use Native\Mobile\Testing\Native; use Tests\Support\GlassOpacity; +use Tests\Support\ScrollEdge; beforeEach(function () { config(['devnull.url' => 'http://devnull.test']); @@ -927,6 +928,34 @@ function fakeThread(array $commit = [], array $replies = [], array $extra = []): expect($bottomBar['props']['glass_opacity'] ?? null)->toBe($platform === 'ios' ? Display::ComposerGlassOpacity / 100 : null); })->with(['ios', 'android']); +it('stands the reply bar on the scroll edge effect from iOS 26, with no fade or tint, and glass for older iOS', function () { + fakeThread(replies: [replyJson(['id' => 'r1', 'parent_id' => 'c2', 'body' => 'The last reply'])]); + + ScrollEdge::onIos('26.1', function (): void { + $screen = Native::visit('/log/commits/c2', platform: 'ios'); + $bottomBar = findNode($screen->tree(), fn (array $node): bool => ($node['type'] ?? null) === 'bottom_bar'); + + // The bar asks for the soft edge effect and keeps its glass for older iOS, which mobile-air leaves out here. + // The page ends where the bar starts, with no fade above it to clear. + expect($bottomBar['props']['scroll_edge'] ?? null)->toBe(1) + ->and($bottomBar['props']['glass'] ?? null)->toBe(1) + ->and(childRefs($screen, 'reply-bar'))->toBe(['reply-rows']) + ->and(nodeByRef($screen, 'reply-rows')['style']['bg_color'] ?? null)->toBeNull() + ->and(findNode($screen->tree(), fn (array $node): bool => ($node['ref'] ?? null) === 'reply-fade'))->toBeNull() + ->and(nodeByRef($screen, 'reply-bar-clearance')['layout']['height'])->toEqual(24 + Display::ComposerBoxBarHeight + 34); + }); +}); + +it('keeps the fade at the top of the reply bar before iOS 26', function () { + fakeThread(); + + ScrollEdge::onIos('18.5', function (): void { + $screen = Native::visit('/log/commits/c2', platform: 'ios'); + + expect(childRefs($screen, 'reply-bar'))->toBe(['reply-fade', 'reply-rows']); + }); +}); + it('ends the page above the reply bar, and further as the draft grows', function () { fakeThread(replies: [replyJson(['id' => 'r1', 'parent_id' => 'c2', 'body' => 'The last reply'])]); diff --git a/tests/Feature/Screens/RemotesComposerTest.php b/tests/Feature/Screens/RemotesComposerTest.php index 6e3e0079..eb0c0be8 100644 --- a/tests/Feature/Screens/RemotesComposerTest.php +++ b/tests/Feature/Screens/RemotesComposerTest.php @@ -11,6 +11,7 @@ use Native\Mobile\Testing\Native; use Native\Mobile\Testing\TestableComponent; use Tests\Support\GlassOpacity; +use Tests\Support\ScrollEdge; const ComposerViewerId = '0199e5c4-0000-7000-8000-000000000001'; @@ -341,6 +342,22 @@ function threadWithAda(string $platform = 'ios'): TestableComponent } })->with(['ios', 'android']); +it('stands the message bar on the scroll edge effect from iOS 26, with no fade or tint', function () { + serveThreadWithAda([remoteMessageJson(['id' => 1])], ['read_through_id' => 1]); + + ScrollEdge::onIos('26.0', function (): void { + $screen = threadWithAda(); + $bottomBar = findNode($screen->tree(), fn (array $node): bool => ($node['type'] ?? null) === 'bottom_bar'); + + expect($bottomBar['props']['scroll_edge'] ?? null)->toBe(1) + ->and(childRefs($screen, 'composer-bar'))->toBe(['composer-rows']) + ->and(nodeByRef($screen, 'composer-bar')['style']['bg_color'] ?? null)->toBeNull() + ->and(nodeByRef($screen, 'composer-rows')['style']['bg_color'] ?? null)->toBeNull() + ->and(findNode($screen->tree(), fn (array $node): bool => ($node['ref'] ?? null) === 'composer-fade'))->toBeNull() + ->and(nodeByRef($screen, 'composer-clearance')['layout']['height'] ?? null)->toEqual(Conversation::ComposerBarHeight + 8); + }); +}); + it('fades to the dark surface in dark mode, and draws again when the phone switches', function () { serveThreadWithAda([remoteMessageJson(['id' => 1])], ['read_through_id' => 1]); diff --git a/tests/Support/ScrollEdge.php b/tests/Support/ScrollEdge.php new file mode 100644 index 00000000..a6d073b3 --- /dev/null +++ b/tests/Support/ScrollEdge.php @@ -0,0 +1,48 @@ +markTestSkipped('Needs a mobile-air with scroll-edge-soft on a bottom bar and System::osVersion()'); + } + } + + /** + * Run $test as on a phone with this iOS, then forget it again. + * + * @template T + * + * @param callable(): T $test + * @return T + */ + public static function onIos(string $version, callable $test): mixed + { + self::skipUnlessSupported(); + + System::rememberOsVersion($version); + + try { + return $test(); + } finally { + System::rememberOsVersion(null); + } + } +} From 65bd2cefd7655c7a23ee68d6d427bebc245707d2 Mon Sep 17 00:00:00 2001 From: Simon Hamp Date: Sun, 22 Nov 2026 11:10:16 +0000 Subject: [PATCH 2/4] Put the composer back in a glass box over the edge blur From iOS 26 the field and its row of tools on the commit page's reply bar and the Remote composer sit in a rounded Liquid Glass box, 16pt in from the screen's sides, over the system's scroll edge effect. The bar asks for the effect with mobile-air's new edge-blur attribute in place of the old scroll-edge-soft class. Two Display constants switch it: ComposerInGlassBox (on) and ComposerEdgeBlur ("soft", or "hard" for the opaque fade). In the box the field sits 16pt under the box's edge, as far as it sits above the tools, and the send button is 8pt in from the box's right and bottom edges, so the box is rounded at 24. That makes the bar 6pt taller, which the page and thread clearances follow. Older iOS and Android draw the bars as before. Co-Authored-By: Claude Opus 5.5 --- app/Devnull/Display.php | 85 ++++++++++++++++--- app/NativeComponents/Conversation.php | 2 +- .../views/native/commit-detail.blade.php | 7 +- resources/views/native/conversation.blade.php | 6 +- .../native/partials/composer-box.blade.php | 13 +-- .../Devnull/ComposerScrollEdgeTest.php | 22 ++++- tests/Feature/Screens/CommitDetailTest.php | 12 +-- tests/Feature/Screens/RemotesComposerTest.php | 5 +- tests/Support/ScrollEdge.php | 8 +- 9 files changed, 124 insertions(+), 36 deletions(-) diff --git a/app/Devnull/Display.php b/app/Devnull/Display.php index 32e9d307..e4f75b03 100644 --- a/app/Devnull/Display.php +++ b/app/Devnull/Display.php @@ -5,6 +5,7 @@ use App\Devnull\Data\CommitBody; use Carbon\CarbonImmutable; use Carbon\CarbonInterface; +use Native\Mobile\Edge\Elements\BottomBar; use Native\Mobile\Facades\System; use Native\Mobile\Platform; @@ -56,6 +57,24 @@ final class Display */ public const int ScrollEdgeIosVersion = 26; + /** + * Whether a composer's field and its row of tools sit in a rounded Liquid Glass box over the scroll edge effect, + * as in Messages (see composerInGlassBox()). Off, they sit straight on the effect. Only on iOS 26 and later. + */ + public const bool ComposerInGlassBox = true; + + /** + * Which scroll edge effect iOS 26 and later draw under a composer bar (see composerEdgeBlur()): "soft", the + * progressive blur under the system's own toolbars, or "hard", an opaque fade. + */ + public const string ComposerEdgeBlur = 'soft'; + + /** + * A bar holding partials/composer-box in its glass box with one line of draft: ComposerBoxBarHeight, plus the + * box's own padding over and under what it holds (see composerBox()). + */ + public const int ComposerGlassBoxBarHeight = 100; + /** * About how many characters fit on a line of the box's field, which runs the width of the box. */ @@ -260,7 +279,7 @@ public static function maskedKey(string $openSsh): string public static function replyBarClearance(string $draft, bool $hasPhotos = false, bool $describing = false): int { return self::composerFadeHeight() - + self::ComposerBoxBarHeight + + self::composerBoxBarHeight() + self::composerBoxGrowth($draft) + ($hasPhotos ? self::ReplyBarPhotosHeight : 0) + ($hasPhotos && $describing ? self::ReplyBarDescriptionHeight : 0) @@ -310,16 +329,18 @@ public static function fadesInBar(): bool /** * Whether the composer bars stand on iOS's own scroll edge effect: iOS 26 and later blur what scrolls under the - * bar progressively, as under its own toolbars, from the bar's scroll-edge-soft class (see composerBarGlass()). - * That stands in for the fade and the tinted glass, so a bar there draws neither and lets the effect show. Older - * iOS keeps the fade over glass, and Android its fade over the surface. + * bar, as under its own toolbars, from the bar's edge-blur attribute (see composerEdgeBlur()). That stands in for + * the fade and the tinted glass, so a bar there draws neither and lets the effect show. Older iOS keeps the fade + * over glass, and Android its fade over the surface. * - * It needs a mobile-air that draws the effect for a bottom bar and says which iOS the phone runs + * It needs a mobile-air that takes edge-blur on a bottom bar and says which iOS the phone runs * (System::osVersion()). Without one this is false and every iOS keeps the fade. */ public static function hasScrollEdge(): bool { - if (! Platform::isIos() || ! method_exists(\Native\Mobile\System::class, 'osVersion')) { + if (! Platform::isIos() + || ! method_exists(\Native\Mobile\System::class, 'osVersion') + || ! method_exists(BottomBar::class, 'edgeBlurStyle')) { return false; } @@ -334,6 +355,42 @@ public static function fadeRowInBar(): bool return self::fadesInBar() && ! self::hasScrollEdge(); } + /** + * Whether the composer's field and tools sit in a rounded Liquid Glass box on the bar (ComposerInGlassBox): on + * iOS 26 and later, over the scroll edge effect. Older iOS and Android draw them straight on the bar, as before. + */ + public static function composerInGlassBox(): bool + { + return self::ComposerInGlassBox && self::hasScrollEdge(); + } + + /** + * The classes for partials/composer-box's outer column. In the glass box it's rounded to match the send button + * inside it, which sits 8pt in from its right and bottom edges: the row of tools leaves 6pt at its end and 2pt + * under the button, and the box 2pt more under the row. + */ + public static function composerBox(): string + { + return self::composerInGlassBox() ? 'rounded-[24] glass pb-[2]' : ''; + } + + /** + * The padding over the field inside partials/composer-box. In the glass box the field sits as far under the + * box's top edge as the row of tools sits under the field, 16pt to the text either way. + */ + public static function composerFieldTop(): string + { + return self::composerInGlassBox() ? 'pt-2' : 'pt-1'; + } + + /** + * How tall a composer bar is with one line of draft (see ComposerBoxBarHeight and ComposerGlassBoxBarHeight). + */ + public static function composerBoxBarHeight(): int + { + return self::composerInGlassBox() ? self::ComposerGlassBoxBarHeight : self::ComposerBoxBarHeight; + } + /** * How tall the composer fade is where it's drawn: none where the scroll edge effect replaces it. */ @@ -350,13 +407,21 @@ public static function composerFadeHeight(): int * percent (glass/N), so a little of the screen under the bar shows through. Android has no glass, so the bar * stays the surface there. * - * scroll-edge-soft asks iOS 26 and later for its scroll edge effect under the bar instead, a progressive blur - * like the one under its own toolbars, and a patched mobile-air leaves the glass out there (see hasScrollEdge()). - * Older iOS ignores it and keeps the glass. + * From iOS 26 the bar's edge-blur takes the glass's place (see composerEdgeBlur()). */ public static function composerBarGlass(): string { - return self::fadesInBar() ? 'glass/'.self::ComposerGlassOpacity.' scroll-edge-soft' : ''; + return self::fadesInBar() ? 'glass/'.self::ComposerGlassOpacity : ''; + } + + /** + * The edge-blur attribute for a composer's native:bottom-bar: on iOS, ComposerEdgeBlur, so iOS 26 and later draw + * the system's scroll edge effect under the bar, and mobile-air leaves the bar's glass out there. Older iOS ignores + * it and keeps the glass. Android has no such effect, so nothing is asked there. + */ + public static function composerEdgeBlur(): string + { + return self::fadesInBar() ? self::ComposerEdgeBlur : ''; } /** diff --git a/app/NativeComponents/Conversation.php b/app/NativeComponents/Conversation.php index 8bd97c9b..7ef029b1 100644 --- a/app/NativeComponents/Conversation.php +++ b/app/NativeComponents/Conversation.php @@ -1839,7 +1839,7 @@ private function longPins(): array */ private static function composerClearance(string $draft, bool $replying, bool $hasPhotos, bool $describing): int { - return Display::composerFadeHeight() + self::ComposerBarHeight + Display::composerBoxGrowth($draft) + return Display::composerFadeHeight() + Display::composerBoxBarHeight() + Display::composerBoxGrowth($draft) + ($replying ? self::ReplyingBarHeight : 0) + ($hasPhotos ? self::PhotosHeight : 0) + ($hasPhotos && $describing ? self::DescriptionHeight : 0) diff --git a/resources/views/native/commit-detail.blade.php b/resources/views/native/commit-detail.blade.php index 91978b39..50b8f2c4 100644 --- a/resources/views/native/commit-detail.blade.php +++ b/resources/views/native/commit-detail.blade.php @@ -136,8 +136,9 @@ tools on the left and the round send button on the right (see partials/composer-box), with the page fading out above it (see partials/composer-fade). On iOS the bar is Liquid Glass, faded in at the top, so the page shows through it blurred (see Display::composerBarGlass()). From iOS 26 the system's scroll edge effect - blurs the page under the bar instead, with no fade or glass (see Display::hasScrollEdge()). On Android - it's the surface, painted from this column. Either fills the strip under the home indicator. + blurs the page under the bar instead, with no fade or glass (see Display::composerEdgeBlur()), and the + field and tools sit in a rounded glass box on it (Display::composerInGlassBox()). On Android it's the + surface, painted from this column. Either fills the strip under the home indicator. The bar does everything the composer sheet did for a reply, so a reply never needs the sheet, whose presenting takes the keyboard down and back up on both platforms. The photo button adds photos from the @@ -152,7 +153,7 @@ --}} @php($replyPostingMe = app(\App\Devnull\Account::class)->user()) @php($replyPostsAs = $replyPostingMe !== null && \App\Devnull\PostAs::offered($replyAuthor)) - + @if (\App\Devnull\Display::fadeRowInBar()) @include('native.partials.composer-fade', ['ref' => 'reply-fade', 'inBar' => true]) diff --git a/resources/views/native/conversation.blade.php b/resources/views/native/conversation.blade.php index c68a3c5a..aa77c391 100644 --- a/resources/views/native/conversation.blade.php +++ b/resources/views/native/conversation.blade.php @@ -82,12 +82,14 @@ with the thread fading out above it (see partials/composer-fade) rather than meeting a line. On iOS the bar is Liquid Glass, faded in at the top, so the thread shows through it blurred (see Display::composerBarGlass()). From iOS 26 the system's scroll edge effect blurs the thread under the bar - instead, with no fade or glass (see Display::hasScrollEdge()). On Android it's the surface. Either fills the strip under the home indicator. + instead, with no fade or glass (see Display::composerEdgeBlur()), and the field and tools sit in a rounded + glass box on it (Display::composerInGlassBox()). On Android it's the surface. Either fills the strip under + the home indicator. The web's tools, photos, the microphone and Ping, open from the one +. Above the field sit the people to mention, what you're replying to and the photos on the draft. While the thread can't take a message, why goes in the field's place. --}} - + @if (\App\Devnull\Display::fadeRowInBar()) @include('native.partials.composer-fade', ['ref' => 'composer-fade', 'inBar' => true]) diff --git a/resources/views/native/partials/composer-box.blade.php b/resources/views/native/partials/composer-box.blade.php index c706afc0..fb84f564 100644 --- a/resources/views/native/partials/composer-box.blade.php +++ b/resources/views/native/partials/composer-box.blade.php @@ -1,8 +1,10 @@ {{-- A composer bar's field, tools and send button, laid out the way the Claude and Messages apps lay theirs out: the field across the top, growing to its five lines, and under it a row with the tools on the left and a round send - button in your colour on the right. The same on both platforms. Nothing is drawn around them: they sit straight on - the bar, which is glass on iOS and the surface on Android, under the fade at its top (see partials/composer-fade). + button in your colour on the right. The same on both platforms. Before iOS 26 nothing is drawn around them: they sit + straight on the bar, which is glass on iOS and the surface on Android, under the fade at its top (see + partials/composer-fade). From iOS 26 they sit in a rounded Liquid Glass box over the system's scroll edge effect, + unless Display::ComposerInGlassBox is off (see Display::composerBox()). $ref names the box ("{$ref}-box", also its key, so the field keeps its place as rows above it come and go) and its rows ("{$ref}-field-row", "{$ref}-actions"). $field is the partial that draws the field, keyed itself, so it stays @@ -12,12 +14,13 @@ send-button's: its ref, label, method, and whether it can send yet. The field's text lines up with the tools' icons under it. The field sits a little nearer the fade above it than - the row under it: the row around the box has no top padding, and the field row leaves 8pt under the field. + the row under it: the row around the box has no top padding, and the field row leaves 8pt under the field. In the + glass box the field sits as far under the box's edge as above the tools (Display::composerFieldTop()). --}} @php($lead ??= []) @php($trail ??= []) - - + + @include($field) diff --git a/tests/Feature/Devnull/ComposerScrollEdgeTest.php b/tests/Feature/Devnull/ComposerScrollEdgeTest.php index 2da10027..c56f3556 100644 --- a/tests/Feature/Devnull/ComposerScrollEdgeTest.php +++ b/tests/Feature/Devnull/ComposerScrollEdgeTest.php @@ -12,7 +12,10 @@ expect(Display::hasScrollEdge())->toBe($edge) ->and(Display::fadeRowInBar())->toBe($platform === 'ios' && ! $edge) ->and(Display::composerFadeHeight())->toBe($edge ? 0 : Display::ComposerFadeHeight) - ->and(Display::composerSurface() === '')->toBe($edge); + ->and(Display::composerSurface() === '')->toBe($edge) + ->and(Display::composerInGlassBox())->toBe($edge && Display::ComposerInGlassBox) + ->and(Display::composerBoxBarHeight())->toBe($edge && Display::ComposerInGlassBox ? Display::ComposerGlassBoxBarHeight : Display::ComposerBoxBarHeight) + ->and(Display::composerBox() === '')->toBe(! ($edge && Display::ComposerInGlassBox)); } finally { System::rememberPlatform(null); } @@ -26,11 +29,12 @@ 'Android 26' => ['android', '26', false], ]); -it('asks iOS for the soft scroll edge effect under the composer bars, over glass for older iOS', function () { +it('asks iOS for the composer edge blur on the bar, over glass for older iOS, and Android for neither', function () { System::rememberPlatform('ios'); try { - expect(Display::composerBarGlass())->toBe('glass/'.Display::ComposerGlassOpacity.' scroll-edge-soft'); + expect(Display::composerBarGlass())->toBe('glass/'.Display::ComposerGlassOpacity) + ->and(Display::composerEdgeBlur())->toBe(Display::ComposerEdgeBlur); } finally { System::rememberPlatform(null); } @@ -38,8 +42,18 @@ System::rememberPlatform('android'); try { - expect(Display::composerBarGlass())->toBe(''); + expect(Display::composerBarGlass())->toBe('') + ->and(Display::composerEdgeBlur())->toBe(''); } finally { System::rememberPlatform(null); } }); + +it('asks for an edge blur mobile-air takes', function () { + expect(Display::ComposerEdgeBlur)->toBeIn(['soft', 'hard']); +}); + +it('keeps the glass box as tall as the bar it replaces, plus its own padding', function () { + // The field's padding over it grows from 4 to 8, and the box adds 2 under the row of tools. + expect(Display::ComposerGlassBoxBarHeight)->toBe(Display::ComposerBoxBarHeight + 4 + 2); +}); diff --git a/tests/Feature/Screens/CommitDetailTest.php b/tests/Feature/Screens/CommitDetailTest.php index 4a9bda70..e560f1b2 100644 --- a/tests/Feature/Screens/CommitDetailTest.php +++ b/tests/Feature/Screens/CommitDetailTest.php @@ -935,14 +935,15 @@ function fakeThread(array $commit = [], array $replies = [], array $extra = []): $screen = Native::visit('/log/commits/c2', platform: 'ios'); $bottomBar = findNode($screen->tree(), fn (array $node): bool => ($node['type'] ?? null) === 'bottom_bar'); - // The bar asks for the soft edge effect and keeps its glass for older iOS, which mobile-air leaves out here. - // The page ends where the bar starts, with no fade above it to clear. - expect($bottomBar['props']['scroll_edge'] ?? null)->toBe(1) + // The bar asks for the edge effect and keeps its glass for older iOS, which mobile-air leaves out here. + // The field and tools sit in the glass box. The page ends where the bar starts, with no fade above it. + expect($bottomBar['props']['edge_blur'] ?? null)->toBe(Display::ComposerEdgeBlur) ->and($bottomBar['props']['glass'] ?? null)->toBe(1) ->and(childRefs($screen, 'reply-bar'))->toBe(['reply-rows']) ->and(nodeByRef($screen, 'reply-rows')['style']['bg_color'] ?? null)->toBeNull() ->and(findNode($screen->tree(), fn (array $node): bool => ($node['ref'] ?? null) === 'reply-fade'))->toBeNull() - ->and(nodeByRef($screen, 'reply-bar-clearance')['layout']['height'])->toEqual(24 + Display::ComposerBoxBarHeight + 34); + ->and(nodeByRef($screen, 'reply-box')['props']['glass'] ?? null)->toBe(Display::ComposerInGlassBox ? 1 : null) + ->and(nodeByRef($screen, 'reply-bar-clearance')['layout']['height'])->toEqual(24 + Display::composerBoxBarHeight() + 34); }); }); @@ -952,7 +953,8 @@ function fakeThread(array $commit = [], array $replies = [], array $extra = []): ScrollEdge::onIos('18.5', function (): void { $screen = Native::visit('/log/commits/c2', platform: 'ios'); - expect(childRefs($screen, 'reply-bar'))->toBe(['reply-fade', 'reply-rows']); + expect(childRefs($screen, 'reply-bar'))->toBe(['reply-fade', 'reply-rows']) + ->and(nodeByRef($screen, 'reply-box')['props']['glass'] ?? null)->toBeNull(); }); }); diff --git a/tests/Feature/Screens/RemotesComposerTest.php b/tests/Feature/Screens/RemotesComposerTest.php index eb0c0be8..353b0cec 100644 --- a/tests/Feature/Screens/RemotesComposerTest.php +++ b/tests/Feature/Screens/RemotesComposerTest.php @@ -349,12 +349,13 @@ function threadWithAda(string $platform = 'ios'): TestableComponent $screen = threadWithAda(); $bottomBar = findNode($screen->tree(), fn (array $node): bool => ($node['type'] ?? null) === 'bottom_bar'); - expect($bottomBar['props']['scroll_edge'] ?? null)->toBe(1) + expect($bottomBar['props']['edge_blur'] ?? null)->toBe(Display::ComposerEdgeBlur) + ->and(nodeByRef($screen, 'message-box')['props']['glass'] ?? null)->toBe(Display::ComposerInGlassBox ? 1 : null) ->and(childRefs($screen, 'composer-bar'))->toBe(['composer-rows']) ->and(nodeByRef($screen, 'composer-bar')['style']['bg_color'] ?? null)->toBeNull() ->and(nodeByRef($screen, 'composer-rows')['style']['bg_color'] ?? null)->toBeNull() ->and(findNode($screen->tree(), fn (array $node): bool => ($node['ref'] ?? null) === 'composer-fade'))->toBeNull() - ->and(nodeByRef($screen, 'composer-clearance')['layout']['height'] ?? null)->toEqual(Conversation::ComposerBarHeight + 8); + ->and(nodeByRef($screen, 'composer-clearance')['layout']['height'] ?? null)->toEqual(Display::composerBoxBarHeight() + 8); }); }); diff --git a/tests/Support/ScrollEdge.php b/tests/Support/ScrollEdge.php index a6d073b3..13616b6f 100644 --- a/tests/Support/ScrollEdge.php +++ b/tests/Support/ScrollEdge.php @@ -2,11 +2,11 @@ namespace Tests\Support; -use Native\Mobile\Edge\TailwindParser; +use Native\Mobile\Edge\Elements\BottomBar; use Native\Mobile\System; /** - * Whether the installed mobile-air draws iOS 26's scroll edge effect under a bottom bar (scroll-edge-soft) and says + * Whether the installed mobile-air draws iOS 26's scroll edge effect under a bottom bar (edge-blur) and says * which iOS the phone runs (System::osVersion()). Without them the composer bars keep their fade on every iOS, so the * tests of the scroll edge effect skip. */ @@ -15,13 +15,13 @@ final class ScrollEdge public static function supported(): bool { return method_exists(System::class, 'rememberOsVersion') - && array_key_exists('scrollEdge', TailwindParser::parse('scroll-edge-soft')); + && method_exists(BottomBar::class, 'edgeBlurStyle'); } public static function skipUnlessSupported(): void { if (! self::supported()) { - test()->markTestSkipped('Needs a mobile-air with scroll-edge-soft on a bottom bar and System::osVersion()'); + test()->markTestSkipped('Needs a mobile-air with edge-blur on a bottom bar and System::osVersion()'); } } From e4b24f4d31744d28bb0b5260af20abca777e3832 Mon Sep 17 00:00:00 2001 From: Simon Hamp Date: Sun, 22 Nov 2026 11:23:50 +0000 Subject: [PATCH 3/4] Leave a gap under the mention list on iOS The suggestions now sit 8pt above the composer's glass box on the commit page and in Remotes, instead of touching it. Co-Authored-By: Claude Opus 5.5 --- resources/views/native/commit-detail.blade.php | 2 +- resources/views/native/conversation.blade.php | 2 +- tests/Feature/Screens/CommitMentionsTest.php | 6 ++++++ tests/Feature/Screens/ConversationTest.php | 9 +++++++++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/resources/views/native/commit-detail.blade.php b/resources/views/native/commit-detail.blade.php index 50b8f2c4..2096768d 100644 --- a/resources/views/native/commit-detail.blade.php +++ b/resources/views/native/commit-detail.blade.php @@ -166,7 +166,7 @@ otherwise take 10pt of the bar, and EDGE drops a height of 0. --}} @php($mentioning = ($mention['field'] ?? null) === 'reply' && ($mentionPeople !== [] || $mentionOrganizations !== [])) - + @include('native.partials.mention-suggestions', ['field' => 'reply', 'label' => 'Mention a developer']) @php($showsPhotos = $replyImages !== [] && ! $replyPreviewing) diff --git a/resources/views/native/conversation.blade.php b/resources/views/native/conversation.blade.php index aa77c391..1de1c92f 100644 --- a/resources/views/native/conversation.blade.php +++ b/resources/views/native/conversation.blade.php @@ -103,7 +103,7 @@ h-[0.1]: on iOS an empty one otherwise takes 10 points of the bar, and EDGE drops a height of 0. --}} @php($mentioning = ($mention['field'] ?? null) === 'draft' && ($mentionPeople !== [] || $mentionOrganizations !== [])) - + @include('native.partials.mention-suggestions', ['field' => 'draft', 'heading' => ($mention['query'] ?? null) === '' ? 'Members' : null]) diff --git a/tests/Feature/Screens/CommitMentionsTest.php b/tests/Feature/Screens/CommitMentionsTest.php index 471b2886..1d8b3ffc 100644 --- a/tests/Feature/Screens/CommitMentionsTest.php +++ b/tests/Feature/Screens/CommitMentionsTest.php @@ -277,3 +277,9 @@ function mentionsComposer(bool $quoting = false, ?array $mentions = null): Testa expect($overlay['props'])->not->toHaveKey('glass') ->and(strtolower($overlay['style']['bg_color']))->toBe(strtolower(config('native-ui.theme.light.surface'))); }); + +it('leaves a gap between the suggestions and the reply box under them on iOS', function () { + $screen = mentionsCommitPage()->input('reply-input', 'thanks @ad', 10); + + expect(nodeByRef($screen, 'reply-mention-slot')['layout']['padding'][2])->toBe(8.0); +}); diff --git a/tests/Feature/Screens/ConversationTest.php b/tests/Feature/Screens/ConversationTest.php index 4a22b9cc..542dfe4e 100644 --- a/tests/Feature/Screens/ConversationTest.php +++ b/tests/Feature/Screens/ConversationTest.php @@ -1390,3 +1390,12 @@ function orgWithMembers(array $people): array ->tap('mention-ada') ->assertSet('draft', 'hi'); }); + +it('leaves a gap between the suggestions and the message box under them on iOS', function () { + serveOrgThread(orgWithMembers([['ada', 'Ada Lovelace']])); + + $screen = finishRefreshes(Native::visit('/remotes/orgs/org-1', platform: 'ios'))->input('message-input', '@ADA', 4); + + expect(childRefs($screen, 'mention-suggestions'))->not->toBe([]) + ->and(nodeByRef($screen, 'mention-slot')['layout']['padding'][2])->toBe(8.0); +}); From a0ea9bcf44a42c6184314775d430356b3feea876 Mon Sep 17 00:00:00 2001 From: Simon Hamp Date: Sun, 22 Nov 2026 12:22:15 +0000 Subject: [PATCH 4/4] Leave a gap under the Replying to card in Remotes on iOS It sat flush on the composer's glass box. Now there's 8pt between them, as there is under the mention list. Co-Authored-By: Claude Opus 5.5 --- resources/views/native/conversation.blade.php | 2 +- tests/Feature/Screens/RemotesComposerTest.php | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/resources/views/native/conversation.blade.php b/resources/views/native/conversation.blade.php index 1de1c92f..e60c8a90 100644 --- a/resources/views/native/conversation.blade.php +++ b/resources/views/native/conversation.blade.php @@ -106,7 +106,7 @@ @include('native.partials.mention-suggestions', ['field' => 'draft', 'heading' => ($mention['query'] ?? null) === '' ? 'Members' : null]) - + @if ($replyTo) diff --git a/tests/Feature/Screens/RemotesComposerTest.php b/tests/Feature/Screens/RemotesComposerTest.php index 353b0cec..5678df20 100644 --- a/tests/Feature/Screens/RemotesComposerTest.php +++ b/tests/Feature/Screens/RemotesComposerTest.php @@ -486,3 +486,11 @@ function threadWithAda(string $platform = 'ios'): TestableComponent expect(sentTo('POST', 'remotes/orgs/org-1/ping'))->toBe(['']); }); + +it('leaves a gap between what you are replying to and the message box under it on iOS', function () { + serveThreadWithAda([remoteMessageJson(['id' => 1])], ['read_through_id' => 1]); + + $screen = threadWithAda()->trigger('swipe-1')->assertSee('Replying to Ada Lovelace'); + + expect(nodeByRef($screen, 'replying-slot')['layout']['padding'][2])->toBe(8.0); +});