Skip to content

feat(toast): copy and dismiss the toast by touch, with a tap or a swipe - #16

Open
CubityFirst wants to merge 1 commit into
mainfrom
feat/toast-swipe
Open

CubityFirst wants to merge 1 commit into
mainfrom
feat/toast-swipe

Conversation

@CubityFirst

@CubityFirst CubityFirst commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

On a touchscreen, a tap on the toast opened it, but there was no way to copy the capture or dismiss the toast: those are on the middle and right mouse buttons, and a finger only acts as the left one. A finger that moved even slightly also started the drag-out, which only works with a held mouse button, so the tap was lost.

Now:

  • A tap shows Open (or Open link / Play), Copy and Close buttons over the toast, and a second tap picks one. Tapping elsewhere hides them, and the toast stays up 6s after the finger lifts so there's time to choose.
  • Swiping left or right dismisses it. The toast follows the finger sideways. Letting go after moving it 30% of its width, or flicking it quickly (24pt at 600pt/s or more), dismisses it; anything less puts it back.
  • Drag-out stays mouse-only. A moving finger now swipes instead.
  • The mouse works as before.

Not yet tested on a real touchscreen. The button layout was checked with the toast_preview render test, which now includes the button variants.

A finger only acts as the left button, so it could open the toast but not
copy or close it, and a finger that moved started a drag-out that only
works with the mouse, losing the tap. A tap now shows Open, Copy and Close
buttons for a second tap to pick, and swiping the toast left or right
dismisses it; a short swipe puts it back.
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