diff --git a/resources/views/native/partials/commit-sheet.blade.php b/resources/views/native/partials/commit-sheet.blade.php index d9fd1890..88b27e1e 100644 --- a/resources/views/native/partials/commit-sheet.blade.php +++ b/resources/views/native/partials/commit-sheet.blade.php @@ -67,7 +67,11 @@ - + + @if ($sheetGuild !== null && $sheetView === 'compose') + Posted to this guild, not your profile log. + @endif + @if ($sheetError) {{ $sheetError }} @endif @@ -107,10 +111,6 @@ class="w-full text-theme-ink" 'class' => 'w-full py-1 rounded-md border border-theme-hairline bg-theme-surface', ]) - @if ($sheetGuild !== null && $sheetView === 'compose') - Posted to this guild, not your profile log. - @endif - @if (! $issueCommand && \App\Devnull\Data\CommitBody::hasOversizedUrl($sheetBody)) Each link must not be greater than {{ \App\Devnull\Data\BodyLink::MaxLength }} characters. @endif diff --git a/tests/Feature/Screens/GuildPostTest.php b/tests/Feature/Screens/GuildPostTest.php index 30091fdb..2260455f 100644 --- a/tests/Feature/Screens/GuildPostTest.php +++ b/tests/Feature/Screens/GuildPostTest.php @@ -93,6 +93,9 @@ function pressEditOnToast(TestableComponent $screen, int $writeId): TestableComp expect(nodeByRef($screen, 'sheet')['props']['visible'])->toBeTrue() ->and(nodeByRef($screen, 'sheet-body')['props']['placeholder'])->toBe('What do you want to share with the guild?') + // At the top, under the sheet's bar, with the field the same gap below it. + ->and(array_slice(childRefs($screen, 'sheet-fields'), 0, 2))->toBe(['sheet-guild-hint', 'sheet-body']) + ->and(nodeByRef($screen, 'sheet-fields')['layout']['padding'][0])->toEqual(nodeByRef($screen, 'sheet-fields')['layout']['gap'] ?? null) ->and(app(Stash::class)->get($this->userId, 'guild:rust')->body)->toBe('Crabs ahoy.') ->and(app(Stash::class)->get($this->userId, 'commit')->body)->toBe('');