Commit 39264fa
refactor(bridge): use MMDS HeaderStandard (#29700)
## **Description**
Bridge **Default** and **Custom** slippage bottom sheets still used
`HeaderCompactStandard` from `component-library`. This migrates both to
**`HeaderStandard`** from `@metamask/design-system-react-native` so
slippage UI follows the same header pattern as the rest of the app and
reduces reliance on the temporary header component.
---
## **Changelog**
CHANGELOG entry: null
---
## **Related issues**
Fixes: https://consensyssoftware.atlassian.net/browse/DSYS-697
---
## **Manual testing steps**
```gherkin
Feature: Bridge slippage modal header
Scenario: Default slippage sheet shows expected header and closes
Given the user is on the Bridge flow with slippage configurable
When the user opens the default slippage modal
Then the sheet title shows the slippage string (same as before)
And the user can dismiss the sheet with the close control
Scenario: Custom slippage sheet shows expected header and closes
Given the user is on the Bridge flow with custom slippage available
When the user opens the custom slippage modal
Then the sheet title shows the slippage string (same as before)
And the user can dismiss the sheet with the close control
```
---
## **Screenshots/Recordings**
### **Before**
### **After**
---
## **Pre-merge author checklist**
<!--
Every checklist item must be consciously assessed before marking this PR
as
"Ready for review". A checked box means you deliberately considered that
responsibility, not that you literally performed every action listed.
Unchecked boxes are ambiguous: they are not an implicit "N/A" and they
are not
a silent "skip". See `docs/readme/ready-for-review.md` for the full
checklist
semantics.
-->
- [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.
#### Performance checks (if applicable)
- [ ] I've tested on Android
- Ideally on a mid-range device; emulator is acceptable
- [ ] I've tested with a power user scenario
- Use these [power-user
SRPs](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93)
to import wallets with many accounts and tokens
- [ ] I've instrumented key operations with Sentry traces for production
performance metrics
- See [`trace()`](/app/util/trace.ts) for usage and
[`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274)
for an example
For performance guidelines and tooling, see the [Performance
Guide](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/400085549067/Performance+Guide+for+Engineers).
## **Pre-merge reviewer checklist**
<!--
Reviewer checklist items follow the same semantics as the author
checklist: an
unchecked box is ambiguous, a checked box means the reviewer consciously
assessed that responsibility. See `docs/readme/ready-for-review.md`.
-->
- [ ] 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]
> **Low Risk**
> Low risk UI refactor limited to swapping header components and
updating accessibility labels/translations; behavior changes should be
confined to close button props and related tests.
>
> **Overview**
> Bridge slippage bottom sheets (default and custom) now use MMDS
`HeaderStandard` instead of the temporary `HeaderCompactStandard`,
wiring `onClose` through the new header API.
>
> Adds a localized `bridge.close` string and updates modal tests to
assert the header close button via `accessibilityLabel` from i18n rather
than a hardcoded "Close" mock.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
566ed03. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent ff95f16 commit 39264fa
5 files changed
Lines changed: 18 additions & 49 deletions
File tree
- app/components/UI/Bridge/components/SlippageModal
- locales/languages
Lines changed: 4 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | 28 | | |
50 | 29 | | |
51 | 30 | | |
| |||
172 | 151 | | |
173 | 152 | | |
174 | 153 | | |
| 154 | + | |
175 | 155 | | |
176 | 156 | | |
177 | 157 | | |
| |||
183 | 163 | | |
184 | 164 | | |
185 | 165 | | |
| 166 | + | |
186 | 167 | | |
187 | 168 | | |
188 | 169 | | |
| |||
1041 | 1022 | | |
1042 | 1023 | | |
1043 | 1024 | | |
1044 | | - | |
| 1025 | + | |
1045 | 1026 | | |
1046 | 1027 | | |
1047 | 1028 | | |
| |||
1051 | 1032 | | |
1052 | 1033 | | |
1053 | 1034 | | |
1054 | | - | |
| 1035 | + | |
1055 | 1036 | | |
1056 | 1037 | | |
1057 | 1038 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
103 | 106 | | |
104 | 107 | | |
105 | 108 | | |
| |||
Lines changed: 3 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | 25 | | |
47 | 26 | | |
48 | 27 | | |
| |||
106 | 85 | | |
107 | 86 | | |
108 | 87 | | |
| 88 | + | |
109 | 89 | | |
110 | 90 | | |
111 | 91 | | |
| |||
115 | 95 | | |
116 | 96 | | |
117 | 97 | | |
| 98 | + | |
118 | 99 | | |
119 | 100 | | |
120 | 101 | | |
| |||
215 | 196 | | |
216 | 197 | | |
217 | 198 | | |
218 | | - | |
| 199 | + | |
219 | 200 | | |
220 | 201 | | |
221 | 202 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
| |||
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
86 | 89 | | |
87 | 90 | | |
88 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7368 | 7368 | | |
7369 | 7369 | | |
7370 | 7370 | | |
| 7371 | + | |
7371 | 7372 | | |
7372 | 7373 | | |
7373 | 7374 | | |
| |||
0 commit comments