Repository navigation
Press the shared buttons like the composer's controls - #123
Merged
Merged
Conversation
OpenCodePrimaryButton, OpenCodeSecondaryButton and OpenCodeIconButton showed only Material's ripple under the finger. They now also apply the shared motionPress (0.97 on Motion.press, a dim under Reduce Motion) on the button's own interaction source, so every caller gets it. The ripple stays. Disabled buttons emit no press, so they don't move. No other press scale wraps these components (the composer + button, Share's Send and the answer/dictation bars are custom Box clickables), so nothing scales twice. Verified: vm.sh build and vm.sh check :core green; before/after recorded on the FX_1 emulator against session-lab (What's New "Choose a Model" and the drawer's Settings button, real speed and at animator_duration_scale 5). Not checked on a phone.
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 app's shared buttons (
OpenCodePrimaryButton,OpenCodeSecondaryButton,OpenCodeIconButton) answered a press only with Material's ripple. They felt inert next to the controls that already use the shared press: the composer's + button and Share's Send.Now all three apply
motionPressinside the component, on the button's own interaction source. That's the existing 0.97 scale onMotion.press, with a dim instead under Reduce Motion. Every caller gets it from this one change, and the ripple stays on top.What I decided:
answer-bar-button-motionbranch (the answer and dictation bar buttons) all use their ownBox+clickable, so nothing will scale twice once both merge.enabled = false.dev, the composer's Send/Stop/Call button doesn't scale under the finger.7d895578only gives it a pulse when the control changes. The finger press lives on the + button and Share's Send.Verified:
vm.sh buildandvm.sh check :coreare green. I recorded before and after on an emulator against session-lab, at real speed and atanimator_duration_scale 5, and checked the frames. It hasn't been checked on a phone, so the amount and timing on wide buttons still need a look on a real device.The video shows What's New's "Choose a Model" (full width) and the drawer's Settings icon button, before and after, at real speed and slowed 5x.
button-press-before-after.mp4
Follow-ups, not in this PR: the 28 clickables that switch the ripple off, call controls, the camera shutter, busy-button spinners, and icon swaps inside the icon button.