-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3bc381c
commit 707e207
Showing
14 changed files
with
40 additions
and
10 deletions.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
src/libs/Navigation/PlatformStackNavigation/navigationOptions/animation/none/index.native.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; | ||
import Animations from '..'; | ||
import type NoneTransitionNavigationOptions from './types'; | ||
|
||
const none: NativeStackNavigationOptions = {animation: Animations.NONE, gestureEnabled: false}; | ||
const none: NoneTransitionNavigationOptions = {animation: Animations.NONE, gestureEnabled: false} satisfies NativeStackNavigationOptions; | ||
|
||
export default none; |
3 changes: 2 additions & 1 deletion
3
src/libs/Navigation/PlatformStackNavigation/navigationOptions/animation/none/index.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import type {StackNavigationOptions} from '@react-navigation/stack'; | ||
import type NoneTransitionNavigationOptions from './types'; | ||
|
||
const none: StackNavigationOptions = {animationEnabled: false, gestureEnabled: false}; | ||
const none: NoneTransitionNavigationOptions = {animationEnabled: false, gestureEnabled: false} satisfies StackNavigationOptions; | ||
|
||
export default none; |
5 changes: 5 additions & 0 deletions
5
src/libs/Navigation/PlatformStackNavigation/navigationOptions/animation/none/types.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import type {PlatformSpecificNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; | ||
|
||
type NoneTransitionNavigationOptions = PlatformSpecificNavigationOptions; | ||
|
||
export default NoneTransitionNavigationOptions; |
3 changes: 2 additions & 1 deletion
3
...ation/PlatformStackNavigation/navigationOptions/animation/slideFromBottom/index.native.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; | ||
import Animations from '..'; | ||
import type SlideFromBottomTransitionNavigationOptions from './types'; | ||
|
||
const slideFromBottom: NativeStackNavigationOptions = {animation: Animations.SLIDE_FROM_BOTTOM}; | ||
const slideFromBottom: SlideFromBottomTransitionNavigationOptions = {animation: Animations.SLIDE_FROM_BOTTOM} satisfies NativeStackNavigationOptions; | ||
|
||
export default slideFromBottom; |
3 changes: 2 additions & 1 deletion
3
...s/Navigation/PlatformStackNavigation/navigationOptions/animation/slideFromBottom/index.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import type {StackNavigationOptions} from '@react-navigation/stack'; | ||
import GestureDirection from '@libs/Navigation/PlatformStackNavigation/navigationOptions/gestureDirection'; | ||
import type SlideFromBottomTransitionNavigationOptions from './types'; | ||
|
||
const slideFromBottom: StackNavigationOptions = {animationEnabled: true, gestureDirection: GestureDirection.VERTICAL}; | ||
const slideFromBottom: SlideFromBottomTransitionNavigationOptions = {animationEnabled: true, gestureDirection: GestureDirection.VERTICAL} satisfies StackNavigationOptions; | ||
|
||
export default slideFromBottom; |
5 changes: 5 additions & 0 deletions
5
...s/Navigation/PlatformStackNavigation/navigationOptions/animation/slideFromBottom/types.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import type {PlatformSpecificNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; | ||
|
||
type SlideFromBottomTransitionNavigationOptions = PlatformSpecificNavigationOptions; | ||
|
||
export default SlideFromBottomTransitionNavigationOptions; |
3 changes: 2 additions & 1 deletion
3
...gation/PlatformStackNavigation/navigationOptions/animation/slideFromLeft/index.android.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; | ||
import Animations from '..'; | ||
import type SlideFromLeftTransitionNavigationOptions from './types'; | ||
|
||
// `slide_from_right` is resolved to `default` transition on iOS, but this transition causes issues on iOS | ||
const slideFromLeft: NativeStackNavigationOptions = {animation: Animations.IOS_FROM_LEFT}; | ||
const slideFromLeft: SlideFromLeftTransitionNavigationOptions = {animation: Animations.IOS_FROM_LEFT} satisfies NativeStackNavigationOptions; | ||
|
||
export default slideFromLeft; |
3 changes: 2 additions & 1 deletion
3
...Navigation/PlatformStackNavigation/navigationOptions/animation/slideFromLeft/index.ios.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; | ||
import Animations from '..'; | ||
import type SlideFromLeftTransitionNavigationOptions from './types'; | ||
|
||
// default transition is causing weird keyboard appearance: - https://github.com/Expensify/App/issues/37257 | ||
// so we are using `slide_from_left` which is similar to default and not causing keyboard transition issues | ||
const slideFromLeft: NativeStackNavigationOptions = {animation: Animations.SLIDE_FROM_LEFT}; | ||
const slideFromLeft: SlideFromLeftTransitionNavigationOptions = {animation: Animations.SLIDE_FROM_LEFT} satisfies NativeStackNavigationOptions; | ||
|
||
export default slideFromLeft; |
3 changes: 2 additions & 1 deletion
3
...ibs/Navigation/PlatformStackNavigation/navigationOptions/animation/slideFromLeft/index.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import type {StackNavigationOptions} from '@react-navigation/stack'; | ||
import GestureDirection from '@libs/Navigation/PlatformStackNavigation/navigationOptions/gestureDirection'; | ||
import type SlideFromLeftTransitionNavigationOptions from './types'; | ||
|
||
const slideFromLeft: StackNavigationOptions = {animationEnabled: true, gestureDirection: GestureDirection.HORIZONTAL_INVERTED}; | ||
const slideFromLeft: SlideFromLeftTransitionNavigationOptions = {animationEnabled: true, gestureDirection: GestureDirection.HORIZONTAL_INVERTED} satisfies StackNavigationOptions; | ||
|
||
export default slideFromLeft; |
5 changes: 5 additions & 0 deletions
5
...ibs/Navigation/PlatformStackNavigation/navigationOptions/animation/slideFromLeft/types.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import type {PlatformSpecificNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; | ||
|
||
type SlideFromLeftTransitionNavigationOptions = PlatformSpecificNavigationOptions; | ||
|
||
export default SlideFromLeftTransitionNavigationOptions; |
3 changes: 2 additions & 1 deletion
3
...ation/PlatformStackNavigation/navigationOptions/animation/slideFromRight/index.android.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; | ||
import Animations from '..'; | ||
import type SlideFromRightTransitionNavigationOptions from './types'; | ||
|
||
const transition: NativeStackNavigationOptions = {animation: Animations.IOS_FROM_RIGHT}; | ||
const transition: SlideFromRightTransitionNavigationOptions = {animation: Animations.IOS_FROM_RIGHT} satisfies NativeStackNavigationOptions; | ||
|
||
export default transition; |
3 changes: 2 additions & 1 deletion
3
...avigation/PlatformStackNavigation/navigationOptions/animation/slideFromRight/index.ios.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import type {NativeStackNavigationOptions} from '@react-navigation/native-stack'; | ||
import Animations from '..'; | ||
import type SlideFromRightTransitionNavigationOptions from './types'; | ||
|
||
// default transition is causing weird keyboard appearance: - https://github.com/Expensify/App/issues/37257 | ||
// so we are using `simple_push` which is similar to default and not causing keyboard transition issues | ||
const transition: NativeStackNavigationOptions = {animation: Animations.SIMPLE_PUSH}; | ||
const transition: SlideFromRightTransitionNavigationOptions = {animation: Animations.SIMPLE_PUSH} satisfies NativeStackNavigationOptions; | ||
|
||
export default transition; |
3 changes: 2 additions & 1 deletion
3
...bs/Navigation/PlatformStackNavigation/navigationOptions/animation/slideFromRight/index.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import type {StackNavigationOptions} from '@react-navigation/stack'; | ||
import type SlideFromRightTransitionNavigationOptions from './types'; | ||
|
||
const slideFromRight: StackNavigationOptions = {animationEnabled: true, gestureDirection: 'horizontal'}; | ||
const slideFromRight: SlideFromRightTransitionNavigationOptions = {animationEnabled: true, gestureDirection: 'horizontal'} satisfies StackNavigationOptions; | ||
|
||
export default slideFromRight; |
5 changes: 5 additions & 0 deletions
5
...bs/Navigation/PlatformStackNavigation/navigationOptions/animation/slideFromRight/types.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import type {PlatformSpecificNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; | ||
|
||
type SlideFromRightTransitionNavigationOptions = PlatformSpecificNavigationOptions; | ||
|
||
export default SlideFromRightTransitionNavigationOptions; |