Skip to content

Swap the server pill's contents when its state changes - #124

Merged
Tarquinen merged 1 commit into
devfrom
connection-pill-swap
Nov 17, 2026
Merged

Tarquinen merged 1 commit into
devfrom
connection-pill-swap

Conversation

@Tarquinen

Copy link
Copy Markdown
Member

When reconnecting to the server gave up, the pill above the composer turned into "Couldn’t connect" in one frame: the glyph, the title, Try Again and the pill's width all changed at once. Tapping Try Again cut back to "Reconnecting" the same way.

Now the old and new contents swap on MotionTransition.swap and the pill's size follows on Motion.layout, the same way OnePickerChip swaps its label. Reduce Motion gets the helper's cross-fade. The pill's enter and exit haven't changed.

  • scripts/check.sh :feature:session passed.
  • Emulator against session-lab (lab stopped, Try Again, lab started), compared with v0.8.0 frame by frame, in light and dark. Both directions animate.
  • Not checked on a phone, and not with Reduce Motion on.

Video, before on top and after below: the give-up at real speed, then at 1/4 speed, then in dark with animations 5× slower through the give-up and Try Again. The emulator renders in software, so real-speed motion looks choppier than on a phone.

connection-pill-before-after.mp4

When reconnecting gave up, the pill cut to "Couldn't connect" in one
frame: glyph, title, Try Again and width all changed at once, and the
same cut happened back to "Reconnecting" after Try Again.

The pill's row now sits in an AnimatedContent keyed on the notice: the
old and new contents swap on MotionTransition.swap and the pill's size
follows on Motion.layout, as OnePickerChip's label swap does. Reduce
Motion gets the transition helper's cross-fade. The pill's enter and
exit are unchanged.

Verified: vm.sh check :feature:session passed. On the emulator against
session-lab (lab stopped, then Try Again, then lab started), compared
with v0.8.0 frame by frame in light at normal speed and in dark at
animator scale 5: the release cuts in one frame both ways, this build
cross-fades and resizes over several frames. Not checked on a phone or
with Reduce Motion on.
@Tarquinen
Tarquinen merged commit 7dbaf12 into dev Nov 17, 2026
3 checks passed
@Tarquinen Tarquinen mentioned this pull request Nov 18, 2026

This branch was previously deployed

1 inactive deployment
release — f6087f6c Deployed Nov 17, 2026 by Tarquinen via check #407
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