-
Notifications
You must be signed in to change notification settings - Fork 5.4k
feat: Implement ConnectedAccountsMenu buttons #23258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
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. |
NidhiKJha
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @jonybur Left some suggestions but overall looks great!
Can we add a condition to not show switch to this account option when there is only one account connected?

| @@ -0,0 +1,8 @@ | |||
| @use "design-system"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that it is needed for this line:
z-index: design-system.$popover-in-modal-z-index;
ui/components/multichain/connected-accounts-menu/connected-accounts-menu.tsx
Outdated
Show resolved
Hide resolved
ui/components/multichain/connected-accounts-menu/connected-accounts-menu.tsx
Outdated
Show resolved
Hide resolved
ui/components/multichain/connected-accounts-menu/connected-accounts-menu.tsx
Outdated
Show resolved
Hide resolved
…ounts-menu.tsx Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
NidhiKJha
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there! Just some small nits
ui/components/multichain/connected-accounts-menu/connected-accounts-menu.test.tsx
Show resolved
Hide resolved
| isOpen, | ||
| identity, | ||
| anchorElement, | ||
| disableAccountSwitcher, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default this should be false?
| identity={identity} | ||
| onClose={() => setAccountOptionsMenuOpen(false)} | ||
| closeMenu={closeMenu} | ||
| disableAccountSwitcher={accountsCount === 1} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm...Do you think we should create a separate variable for this?
Builds ready [d5e445c]
Page Load Metrics (1245 ± 364 ms)
Bundle size diffs
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #23258 +/- ##
===========================================
- Coverage 68.70% 68.68% -0.01%
===========================================
Files 1102 1102
Lines 43221 43246 +25
Branches 11558 11566 +8
===========================================
+ Hits 29691 29702 +11
- Misses 13530 13544 +14 ☔ View full report in Codecov by Sentry. |
NidhiKJha
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Builds ready [903f702]
Page Load Metrics (1069 ± 474 ms)
Bundle size diffs
|
Description
Implements the 'Switch to this account' and the 'Disconnect' buttons on the ConnectedAccountsMenu panel.
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/2172
Manual testing steps
Screenshots/Recordings
vid1.mp4
switch2.mp4
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist