Skip to content

fix(ui): drop toasts under sheets and swap the countdown in place - #950

Merged
bmc08gt merged 1 commit into
mainfrom
fix/toast-cover-in-place
Oct 4, 2026
Merged

bmc08gt merged 1 commit into
mainfrom
fix/toast-cover-in-place

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #949, matching the toast rules Android shipped in code-payments/code-android-app#1669.

A covered host no longer keeps a toast under the cover. Before this, a toast dispatched while a sheet was up timed out hidden behind it, with Undo out of reach.

  • ToastController.isCovered dismisses the toast showing. HomeTabView sets it from router sheets and the bill.
  • show drops a toast while covered, or while any sheet or dialog is presented over the app. That second check catches sheets a screen presents itself, which never touch the router.
  • A sheet a screen presents itself does not dismiss a toast already up. That toast stays under it until it times out (4s at most). Android has no such gap.

Countdowns update in place. show(_:inPlace:) keeps the showing toast's view and restarts its timer, so the You tab's developer countdown changes its text instead of replaying the entrance on every tap.

ToastControllerTests covers replacement, covering, dropping, and in-place slots.

Matches Android's FloatingToastHostState. A sheet or the bill covering the
host dismisses the toast showing, and show() drops a toast while covered or
while any sheet or dialog is presented, so it can't time out unseen with its
Undo out of reach. show(_:inPlace:) keeps the showing toast's view, so the
developer-mode countdown changes text without replaying the entrance.
@bmc08gt bmc08gt self-assigned this Oct 4, 2026
@bmc08gt
bmc08gt merged commit d6cf6ad into main Oct 4, 2026
3 checks passed
@bmc08gt
bmc08gt deleted the fix/toast-cover-in-place branch October 5, 2026 15:13
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