Commit 20fc3c6
release(runway): cherry-pick feat: cp-13.12.0 confirmations for sidepanel (#38394)
- feat: confirmations for sidepanel (#38375)
<!--
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**
Enables the confirmation handler to listen from pages other than the
home page.
There's a list of exempted routes including the confirmation routes.
Depends on #38361
<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->
[](https://codespaces.new/MetaMask/metamask-extension/pull/38375?quickstart=1)
## **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: feat: confirmations for sidepanel
## **Related issues**
Fixes:
## **Manual testing steps**
1. Switch to sidepanel
2. Test requests and approvals
## **Screenshots/Recordings**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
<!-- [screenshots/recordings] -->
### **After**
<!-- [screenshots/recordings] -->
## **Pre-merge author checklist**
- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/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]
> Enables confirmation routing across routes (incl. sidepanel),
centralizes modal handling with a network menu close action, and updates
manifests/builds for side panel support.
>
> - **UI**:
> - **Confirmation routing**: `ConfirmationHandler` now runs outside
`DEFAULT_ROUTE`, adds exempt routes, and closes modals before
navigating.
> - **Modals**: New `useModalState` hook and `Modals` container to
render `NetworkListMenu`; routes integrate `Modals` and remove inline
network menu handling.
> - **App state**: Add `CLOSE_NETWORK_MENU` action/reducer; export
`closeNetworkMenu`; add selector `selectIsNetworkMenuOpen`.
> - **Cleanup**: Remove unused sidepanel/env and swaps props in
`home.container`.
> - **Manifests/Build**:
> - Add `"sidePanel"` permission and Chrome `side_panel.default_path`.
> - Set `IS_SIDEPANEL: true` for main build.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
a91ea96. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
[3c42ac3](3c42ac3)
Co-authored-by: Francis Nepomuceno <n3ps@users.noreply.github.com>1 parent 74e4bd9 commit 20fc3c6
File tree
12 files changed
+100
-32
lines changed- app/manifest/v3
- ui
- ducks/app
- hooks
- pages
- home
- routes
- selectors
- store
12 files changed
+100
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
716 | 716 | | |
717 | 717 | | |
718 | 718 | | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
719 | 724 | | |
720 | 725 | | |
721 | 726 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
| |||
76 | 75 | | |
77 | 76 | | |
78 | 77 | | |
79 | | - | |
80 | 78 | | |
81 | 79 | | |
82 | 80 | | |
| |||
99 | 97 | | |
100 | 98 | | |
101 | 99 | | |
102 | | - | |
103 | | - | |
104 | 100 | | |
105 | 101 | | |
106 | 102 | | |
| |||
111 | 107 | | |
112 | 108 | | |
113 | 109 | | |
114 | | - | |
115 | 110 | | |
116 | 111 | | |
117 | 112 | | |
118 | 113 | | |
119 | 114 | | |
120 | | - | |
121 | 115 | | |
122 | 116 | | |
123 | 117 | | |
| |||
154 | 148 | | |
155 | 149 | | |
156 | 150 | | |
157 | | - | |
158 | 151 | | |
159 | 152 | | |
160 | 153 | | |
| |||
163 | 156 | | |
164 | 157 | | |
165 | 158 | | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | 159 | | |
171 | 160 | | |
172 | 161 | | |
173 | | - | |
174 | 162 | | |
175 | 163 | | |
176 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
11 | 17 | | |
12 | 18 | | |
13 | 19 | | |
| |||
28 | 34 | | |
29 | 35 | | |
30 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
31 | 51 | | |
32 | 52 | | |
33 | 53 | | |
| |||
44 | 64 | | |
45 | 65 | | |
46 | 66 | | |
| 67 | + | |
47 | 68 | | |
48 | 69 | | |
49 | 70 | | |
| |||
66 | 87 | | |
67 | 88 | | |
68 | 89 | | |
| 90 | + | |
69 | 91 | | |
70 | 92 | | |
| 93 | + | |
71 | 94 | | |
72 | 95 | | |
| 96 | + | |
73 | 97 | | |
74 | 98 | | |
75 | 99 | | |
| |||
80 | 104 | | |
81 | 105 | | |
82 | 106 | | |
| 107 | + | |
83 | 108 | | |
84 | 109 | | |
85 | 110 | | |
86 | 111 | | |
87 | 112 | | |
| 113 | + | |
88 | 114 | | |
89 | 115 | | |
90 | 116 | | |
| |||
94 | 120 | | |
95 | 121 | | |
96 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
97 | 127 | | |
98 | 128 | | |
99 | 129 | | |
100 | 130 | | |
101 | 131 | | |
102 | | - | |
103 | | - | |
| 132 | + | |
104 | 133 | | |
105 | 134 | | |
106 | 135 | | |
| |||
112 | 141 | | |
113 | 142 | | |
114 | 143 | | |
| 144 | + | |
115 | 145 | | |
116 | | - | |
117 | 146 | | |
118 | 147 | | |
119 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| |||
95 | 94 | | |
96 | 95 | | |
97 | 96 | | |
98 | | - | |
99 | 97 | | |
100 | 98 | | |
101 | 99 | | |
102 | 100 | | |
103 | 101 | | |
104 | 102 | | |
105 | | - | |
106 | 103 | | |
107 | 104 | | |
108 | 105 | | |
| |||
161 | 158 | | |
162 | 159 | | |
163 | 160 | | |
| 161 | + | |
164 | 162 | | |
165 | 163 | | |
166 | 164 | | |
| |||
525 | 523 | | |
526 | 524 | | |
527 | 525 | | |
528 | | - | |
529 | | - | |
530 | | - | |
| 526 | + | |
531 | 527 | | |
532 | 528 | | |
533 | 529 | | |
| |||
1198 | 1194 | | |
1199 | 1195 | | |
1200 | 1196 | | |
1201 | | - | |
1202 | | - | |
1203 | | - | |
1204 | | - | |
1205 | | - | |
1206 | | - | |
1207 | | - | |
1208 | | - | |
| 1197 | + | |
1209 | 1198 | | |
1210 | 1199 | | |
1211 | 1200 | | |
| |||
1253 | 1242 | | |
1254 | 1243 | | |
1255 | 1244 | | |
| 1245 | + | |
| 1246 | + | |
1256 | 1247 | | |
1257 | 1248 | | |
1258 | 1249 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1641 | 1641 | | |
1642 | 1642 | | |
1643 | 1643 | | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
1644 | 1647 | | |
1645 | 1648 | | |
1646 | 1649 | | |
| |||
0 commit comments