Repository navigation
Swap the server pill's contents when its state changes - #124
Merged
Merged
Conversation
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.
Closed
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.swapand the pill's size follows onMotion.layout, the same wayOnePickerChipswaps its label. Reduce Motion gets the helper's cross-fade. The pill's enter and exit haven't changed.scripts/check.sh :feature:sessionpassed.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