- Notifications
You must be signed in to change notification settings - Fork5.4k
Commita91ea96
committed
release(runway): cherry-pick 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 beencompletely filled out, and PR status checks have passed at least once.-->## **Description**Enables the confirmation handler to listen from pages other than thehome 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 followingquestions: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 theCHANGELOG, 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-Facingdescription 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 andaccurately)-->CHANGELOG entry: feat: confirmations for sidepanel## **Related issues**Fixes:## **Manual testing steps**1. Switch to sidepanel2. Test requests and approvals## **Screenshots/Recordings**<!-- If applicable, add screenshots and/or recordings to visualize thebefore and after of your change. -->### **Before**<!-- [screenshots/recordings] -->### **After**<!-- [screenshots/recordings] -->## **Pre-merge author checklist**- [ ] I've followed [MetaMask ContributorDocs](https://github.com/MetaMask/contributor-docs) and [MetaMaskExtension CodingStandards](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/) formatif applicable- [ ] I’ve applied the right labels on the PR (see [labelingguidelines](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 theapp, test code being changed).- [ ] I confirm that this PR addresses all acceptance criteria describedin the ticket it closes and includes the necessary testing evidence suchas recordings and or screenshots.<!-- CURSOR_SUMMARY -->---> [!NOTE]> Enable confirmation navigation from any route (incl. sidepanel), addside panel manifest/config, and centralize network menu modal with aclose action.> > - **Confirmations & Navigation**:> - Run confirmation redirection from any route via`ConfirmationHandler` with an exempted-routes list; closes open modalsbefore navigating.> - Remove reliance on home/default route checks.> - **Modals Refactor**:> - Add `useModalState` hook and `CLOSE_NETWORK_MENU` action; updatereducer to support explicit close.> - Introduce `Modals` aggregator to render `NetworkListMenu`; integrateinto `routes.component` and remove inline menu handling.> - Export selector `selectIsNetworkMenuOpen`.> - **Sidepanel Enablement**:> - Add `"sidePanel"` permission and Chrome `side_panel.default_path` in`manifest`.> - Set `IS_SIDEPANEL: true` for main build.> - **Cleanup**:> - Remove unused sidepanel/env and swaps-related props from`home.container`.> > <sup>Written by [CursorBugbot](https://cursor.com/dashboard?tab=bugbot) for commitc08536b. This will update automaticallyon new commits. Configure[here](https://cursor.com/dashboard?tab=bugbot).</sup><!-- /CURSOR_SUMMARY -->1 parent74e4bd9 commita91ea96
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
Comments
(0)