Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions resources/views/native/partials/commit-sheet.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@
</native:row>
<native:column class="w-full h-[1] bg-theme-hairline" />
<native:scroll-view ref="sheet-composer" class="w-full flex-1">
<native:column class="w-full px-5 pt-4 pb-10 gap-4">
<native:column ref="sheet-fields" class="w-full px-5 pt-4 pb-10 gap-4">
@if ($sheetGuild !== null && $sheetView === 'compose')
<native:text ref="sheet-guild-hint" class="w-full text-xs text-theme-ink-muted">Posted to this guild, not your profile log.</native:text>
@endif

@if ($sheetError)
<native:text ref="sheet-error" class="w-full text-sm text-theme-destructive">{{ $sheetError }}</native:text>
@endif
Expand Down Expand Up @@ -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')
<native:text ref="sheet-guild-hint" class="w-full text-xs text-theme-ink-muted">Posted to this guild, not your profile log.</native:text>
@endif

@if (! $issueCommand && \App\Devnull\Data\CommitBody::hasOversizedUrl($sheetBody))
<native:text ref="sheet-link-error" class="w-full text-sm text-theme-destructive">Each link must not be greater than {{ \App\Devnull\Data\BodyLink::MaxLength }} characters.</native:text>
@endif
Expand Down
3 changes: 3 additions & 0 deletions tests/Feature/Screens/GuildPostTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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('');

Expand Down
Loading