Skip to content

Draw the compose sheet's Cancel and Commit as a cross and a check - #48

Merged
simonhamp merged 2 commits into
mainfrom
fix/sheet-buttons
Oct 21, 2026
Merged

simonhamp merged 2 commits into
mainfrom
fix/sheet-buttons

Conversation

@simonhamp

Copy link
Copy Markdown
Member

The compose sheet's bar had text buttons that didn't sit evenly in the sheet. On iOS, Cancel and Commit were about 28pt from the top but only 12pt from the sides. On Android they were plain text buttons under Material's handle strip.

Now Cancel is a cross and Commit a check, each in a 44pt circle, as Apple draws a sheet's bar. The bar's padding is 16pt all round, so both circles sit 16pt from the top and sides of the sheet on both platforms. Quote and Open issue use the same bar.

  • The cross is on glass on iOS and a surface-variant circle on Android.
  • The check is filled with your lane colour, with a check that reads on it.
  • Until there's a commit to send, the check is muted and isn't a button. A pressable can't be disabled, and both actions already ignore a body that doesn't fit, so this only changes how it looks and what VoiceOver offers.
  • Open issue shows a spinner in the circle while it opens.

The circles are a new sheet-bar-button partial built on native:pressable. native:button draws an icon-only button as a pill, not a circle, and its glass can't be made round.

Android needed one NativePHP change, NativePHP/mobile-ui#143. Material's sheet keeps its drag handle in a 48dp strip above the content, so nothing can sit 16dp from the top. With handle-over-content, Android draws an iOS-sized handle over the content instead. That's on the combined branch, and composer.lock here picks it up. The report form and the receipts in the same sheet already start 24pt down, so they clear the handle on both platforms now.

Things to check:

  • I compiled the Android renderer in an Android project but haven't seen any of this on a device yet.
  • The tests read the circles through two new helpers in tests/Pest.php, sheetButtonEnabled() and sheetButtonCircle().

🤖 Generated with Claude Code

The sheet's bar had a Cancel text button on glass and a Commit text button
in your colour on iOS, text buttons on Android, and sat further from the
top of the sheet than from its sides. Now Cancel is a cross and Commit a
check, each in a 44pt circle, 16pt in from the top and sides on both
platforms. The cross is on glass on iOS and a tonal circle on Android. The
check is filled with your colour, or drawn muted and not as a button until
there's a commit to send. Open issue is the same check, with a spinner
while it opens.

Android draws the sheet's handle over the content now, as iOS does, so the
bar starts at the sheet's top edge there too. That's handle-over-content
from NativePHP/mobile-ui#143, on the combined branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@simonhamp
simonhamp merged commit 34a654d into main Oct 21, 2026
1 check passed
@simonhamp
simonhamp deleted the fix/sheet-buttons branch October 21, 2026 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant