Commit 053257b
authored
feat: Update StakeScreens with custom navigation options (MetaMask#23913)
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->
## **Description**
When selecting "Deposit" from the Trade Menu, the Deposit page was
sliding in from the bottom (default modal behavior). Per design
requirements, it should slide in from the right, consistent with other
navigation flows.
Applied the same cardStyleInterpolator pattern already used by:
- Settings (Routes.SETTINGS_VIEW)
- TrendingTokensFullView
- ExploreSearchScreen
- SitesFullView
- Perps
## **Changelog**
<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`
If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`
(This helps the Release Engineer do their job more quickly and
accurately)
-->
CHANGELOG entry: Updated Deposit page transition to slide in from the
right instead of bottom
## **Related issues**
Fixes: https://consensyssoftware.atlassian.net/browse/MDP-235
## **Manual testing steps**
```gherkin
Feature: Deposit page navigation transition
Scenario: user opens Deposit page from Trade Menu
Given the user is on the Wallet home screen
And the user has Deposit enabled
When user taps on the Trade/Fund action button
And user selects "Deposit" from the menu
Then the Deposit page slides in from the right side of the screen
And user can swipe from left edge to go back
```
## **Screenshots/Recordings**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
https://github.com/user-attachments/assets/fba1e102-92cc-4cf5-8bb5-d94bedbb48a4
<!-- [screenshots/recordings] -->
### **After**
https://github.com/user-attachments/assets/d18e1e5b-5b89-451d-87d5-b18446180cc9
<!-- [screenshots/recordings] -->
## **Pre-merge author checklist**
- [x] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **Pre-merge reviewer checklist**
- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Configures `StakeScreens` to hide the header and use a right-to-left
slide transition; updates snapshot accordingly.
>
> - **Navigation**:
> - **`MainNavigator.js`**: Add custom options to `Stack.Screen` for
`StakeScreens`:
> - `headerShown: false`
> - Enable right-to-left slide via `animationEnabled: true` and custom
`cardStyleInterpolator`.
> - **Tests**:
> - Update snapshot `MainNavigator.test.tsx.snap` to reflect new
`StakeScreens` options.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
f185550. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 0f86a83 commit 053257b
2 files changed
Lines changed: 27 additions & 1 deletion
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1141 | 1141 | | |
1142 | 1142 | | |
1143 | 1143 | | |
1144 | | - | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
1145 | 1164 | | |
1146 | 1165 | | |
1147 | 1166 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
199 | 206 | | |
200 | 207 | | |
201 | 208 | | |
| |||
0 commit comments