UX MULTICHAIN: added connect account in account list menu item
This PR is to add the connect account button in account list menu item
Related issues
Fixes:https://github.com/MetaMask/MetaMask-planning/issues/1967
Manual testing steps
- Go to account list menu
- Click on connect account, if account is not connected it should connect the account
Screenshots/Recordings
Before
After
Pre-merge author checklist
- [ ] I’ve followed MetaMask Coding Standards.
- [ ] I've clearly explained what problem this PR is solving and how it is solved.
- [ ] I've linked related issues
- [ ] I've included manual testing steps
- [ ] I've included screenshots/recordings if applicable
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using JSDoc format if applicable
- [ ] I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
- [ ] I’ve properly set the pull request status:
- [ ] In case it's not yet "ready for review", I've set it to "draft".
- [ ] In case it's "ready for review", I've changed it from "draft" to "non-draft".
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.
Builds ready [b593602]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1082 ± 61 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 132 | 218 | 181 | 29 | 14 |
| domContentLoaded | 13 | 96 | 43 | 27 | 13 | ||
| load | 919 | 1506 | 1082 | 126 | 61 | ||
| domInteractive | 13 | 96 | 43 | 27 | 13 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 0 Bytes (0.00%)
- ui: 160 Bytes (0.00%)
- common: 79 Bytes (0.00%)
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
d3f0a32) 68.46% compared to head (653cfd2) 68.49%. Report is 22 commits behind head on develop.
Additional details and impacted files
@@ Coverage Diff @@
## develop #22941 +/- ##
===========================================
+ Coverage 68.46% 68.49% +0.03%
===========================================
Files 1089 1089
Lines 43045 43058 +13
Branches 11469 11474 +5
===========================================
+ Hits 29469 29491 +22
+ Misses 13576 13567 -9
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Builds ready [53a2f37]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (939 ± 23 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 130 | 206 | 175 | 24 | 12 |
| domContentLoaded | 9 | 72 | 39 | 25 | 12 | ||
| load | 818 | 1022 | 939 | 48 | 23 | ||
| domInteractive | 9 | 72 | 39 | 25 | 12 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 0 Bytes (0.00%)
- ui: 160 Bytes (0.00%)
- common: 79 Bytes (0.00%)
Seeing this in ui/pages/connected-accounts/connected-accounts.container.js:
connectAccount: (address) =>
dispatchProps.addPermittedAccount(activeTabOrigin, address),
I'm thinking addPermittedAccount could be the way to go!
Also, adding a quick test in ui/components/multichain/account-list-item-menu/account-list-item-menu.test.js to ensure the correct action and account are used would be great!
Also, adding a quick test in
ui/components/multichain/account-list-item-menu/account-list-item-menu.test.jsto ensure the correct action and account are used would be great!
@darkwing Updated the actions here, https://github.com/MetaMask/metamask-extension/pull/22941/commits/baaf4c1658954bca66379eb94bb6681f25dc2ee0
For the tests, since this component is accessible only in popup view, if I try to add the test. It's not accessible for jest and it starts failing here as the DOM doesn't render it in full screen view
Builds ready [7ea16ed]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (992 ± 48 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 124 | 364 | 188 | 55 | 27 |
| domContentLoaded | 10 | 101 | 28 | 25 | 12 | ||
| load | 852 | 1344 | 992 | 100 | 48 | ||
| domInteractive | 10 | 101 | 28 | 25 | 12 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 0 Bytes (0.00%)
- ui: 48 Bytes (0.00%)
- common: 79 Bytes (0.00%)
Would doing the following allow for testing?
{process.env.MULTICHAIN || process.env.IN_TEST ? (
added tests
Updated here https://github.com/MetaMask/metamask-extension/pull/22941/commits/69e1e37f9f26c5ab3aeda98cfd45d3221ab719ee
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.
Builds ready [0bd64f6]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (952 ± 36 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 113 | 252 | 171 | 35 | 17 |
| domContentLoaded | 9 | 72 | 22 | 19 | 9 | ||
| load | 839 | 1082 | 952 | 75 | 36 | ||
| domInteractive | 9 | 72 | 22 | 19 | 9 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 0 Bytes (0.00%)
- ui: 384 Bytes (0.01%)
- common: 79 Bytes (0.00%)
Builds ready [653cfd2]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1981 ± 231 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 94 | 452 | 191 | 84 | 40 |
| domContentLoaded | 10 | 148 | 37 | 34 | 16 | ||
| load | 228 | 2628 | 1981 | 482 | 231 | ||
| domInteractive | 10 | 148 | 37 | 34 | 16 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 0 Bytes (0.00%)
- ui: 265 Bytes (0.00%)
- common: 79 Bytes (0.00%)