chore: add shared native-stack modal options#29694
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Risk is medium because navigation presentation changes (especially Tags selected:
Performance Test Selection: |
|



Description
This PR introduces two shared
NativeStackNavigationOptionspresets inclearStackNavigatorOptions.ts:Perps already uses
createNativeStackNavigator, but several screens repeated the same option blobs (presentation: 'transparentModal', transparentcontentStyle,animation: 'none',headerShown: false) inline. That duplicated the JS-stackclearStackNavigatorOptionsidea without a typed, reusable native-stack equivalent.Changelog
CHANGELOG entry:null
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Moderate risk because it changes React Navigation option presets for native stacks, which can affect modal presentation, animations, and header behavior across Perps flows.
Overview
Standardizes Perps native-stack overlay behavior by replacing inline
presentation: 'transparentModal'/transparent styling with shared presets (transparentModalScreenOptions,clearNativeStackNavigatorOptions).Adds native-stack equivalents of the existing clear JS-stack options in
clearStackNavigatorOptions.ts, and updates Perps screens (TP/SL, close-position/bottom-sheet stacks, and pay-with modal) to use these presets for consistent transparent modals without unwanted animations.Reviewed by Cursor Bugbot for commit 3a0cec5. Bugbot is set up for automated code reviews on this repo. Configure here.