@@ -28,7 +28,13 @@ import {
2828 KeyboardStickyView ,
2929 useKeyboardState ,
3030} from "react-native-keyboard-controller" ;
31- import Animated , { FadeInDown , ReduceMotion , useSharedValue } from "react-native-reanimated" ;
31+ import Animated , {
32+ FadeInDown ,
33+ ReduceMotion ,
34+ useSharedValue ,
35+ withSpring ,
36+ type EntryExitAnimationFunction ,
37+ } from "react-native-reanimated" ;
3238import { useSafeAreaInsets } from "react-native-safe-area-context" ;
3339import { useUniwindTheme } from "../../lib/useUniwindTheme" ;
3440import { FONT_FAMILIES } from "../../lib/fontFamilies" ;
@@ -144,7 +150,30 @@ import { serverEnvironment } from "../../state/server";
144150import { fileRoutePathSegments } from "../files/filePath" ;
145151import { readEnvironmentScope , useEnvironmentScope } from "../../state/session" ;
146152
147- const COMPOSER_POPOVER_ENTERING = FadeInDown . duration ( 180 ) . reduceMotion ( ReduceMotion . System ) ;
153+ const MATERIAL_FAST_SPATIAL_SPRING = {
154+ stiffness : 1400 ,
155+ damping : 67.3 ,
156+ reduceMotion : ReduceMotion . System ,
157+ } ;
158+ const MATERIAL_FAST_EFFECTS_SPRING = {
159+ stiffness : 3800 ,
160+ damping : 123.3 ,
161+ reduceMotion : ReduceMotion . System ,
162+ } ;
163+ const MATERIAL_MENU_ENTERING : EntryExitAnimationFunction = ( ) => {
164+ "worklet" ;
165+ return {
166+ initialValues : { opacity : 0 , transform : [ { scale : 0.8 } ] } ,
167+ animations : {
168+ opacity : withSpring ( 1 , MATERIAL_FAST_EFFECTS_SPRING ) ,
169+ transform : [ { scale : withSpring ( 1 , MATERIAL_FAST_SPATIAL_SPRING ) } ] ,
170+ } ,
171+ } ;
172+ } ;
173+ const COMPOSER_POPOVER_ENTERING =
174+ Platform . OS === "android"
175+ ? MATERIAL_MENU_ENTERING
176+ : FadeInDown . duration ( 180 ) . reduceMotion ( ReduceMotion . System ) ;
148177
149178function NewTaskWorkspaceIcon ( props : {
150179 readonly workspaceMode : "local" | "worktree" ;
@@ -1580,7 +1609,10 @@ export function NewTaskDraftScreen(props: {
15801609 ( composerMenu . items . length > 0 || composerMenu . trigger . kind === "pull-request" ) ? (
15811610 < View >
15821611 < ComposerPopoverAnchor >
1583- < Animated . View entering = { COMPOSER_POPOVER_ENTERING } >
1612+ < Animated . View
1613+ entering = { COMPOSER_POPOVER_ENTERING }
1614+ style = { { transformOrigin : "bottom" } }
1615+ >
15841616 < ComposerCommandPopover
15851617 items = { composerMenu . items }
15861618 triggerKind = { composerMenu . trigger . kind }
0 commit comments