Repository navigation
Use AnimatedVisibility for the shared location card and MotionPresence - #145
Merged
Merged
Conversation
The shared location card in the composer had its own hand-built entrance gate (an Animatable driven by gateProgress/onAppear), and MotionPresence kept a custom PresenceGate to hold content mounted while it animated out. Both are now plain AnimatedVisibility on the same Motion specs: - The location card fades in and scales from 0.965 at its bottom-left corner on Motion.layout's Enter spec (fade only under Reduce Motion), as before. Removal stays instant; the row height still collapses. - MotionPresence enters and exits with its role's pose and specs. It no longer blocks touches or drops semantics while leaving; its callers are decorative checkmarks. - PresenceGate and ComposerLocationEntrance are deleted, with the tests that only covered them; MotionBlurReveal's checks stay. - PresenceGate.kt is renamed MotionPresence.kt, since it still holds MotionPresence, MotionSwap and motionBlurReveal. Verified: scripts/check.sh via the VM (passes). On the emulator, recorded dev (3da8e20) and this branch side by side adding and removing a location twice: appear takes about 0.3 s on both, removal is instant on both.
…ed-visibility # Conflicts: # docs/parity/core-ui.md
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.
The shared location card's hand-built entrance gate and
PresenceGate(the custom "keep mounted while it animates out" helper behindMotionPresence) are replaced with plainAnimatedVisibility, using the sameMotionspecs, so Reduce Motion still applies.PresenceGateandComposerLocationEntranceare deleted, along with the tests that only covered them.PresenceGate.ktis renamedMotionPresence.kt, because it still holdsMotionPresence,MotionSwapandmotionBlurReveal. The parity rows now say these are native on purpose.Visible differences from
devMotionPose.microInandMotionPose.swapcarry a subtle blur (MotionTunables.blurSubtle). The newMotionPresencedrops it. Nothing changes on screen, becausetransitionBluralready draws nothing on Android.metrics.blurtotransitionBlur. It is dropped too, again with no change on screen.microInin,swapout) have no offset. Onlyrollhas one, andMotionPresencenever used it.AnimatedVisibilityreverses smoothly from where it is.Motion.layout's Enter spec, and removing it is still instant.Verified
scripts/check.shpasses on the VM. It ran before mergingdev; the merge only changeddocs/parity/core-ui.md.devnext to this branch, both at real speed:dev3da8e20: it appears in about 0.3 s on both. Removing it is instant on both, then the row collapses in about 0.25–0.3 s.dev92c61d4: the leaving side reaches 90% in about 260 ms on both. The arriving side takes about 500 ms ondevand 530 ms here, within one or two frames of noise.Not tested
Dead code:
ComposerView(and so itsAttachmentsRow, which I edited) has no callers anywhere in the repo. It is left for the dead-code sweep.before-after.mp4
before-after.mp4