-
Notifications
You must be signed in to change notification settings - Fork 5k
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
feat: added edit accounts modal #26413
Conversation
Builds ready [2f04498]
Page Load Metrics (93 ± 22 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #26413 +/- ##
========================================
Coverage 70.11% 70.12%
========================================
Files 1416 1417 +1
Lines 49389 49402 +13
Branches 13799 13800 +1
========================================
+ Hits 34628 34639 +11
- Misses 14761 14763 +2 ☔ View full report in Codecov by Sentry. |
return renderWithProvider(<EditAccountsModal {...props} />, store); | ||
}; | ||
describe('EditAccountsModal', () => { | ||
it('should render correctly', () => { |
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.
can we add more unit test for this component:
- calls onClose when the close button is clicked
- handles checkbox click
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.
+1. Also if possible, a test for the Select All button
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.
Checkbox click is for account list item component and it's included there and so is the onClose for modal but I added a test for select all
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.
Good start! Please check out my comments
isPinned={Boolean(account.pinned)} | ||
startAccessory={<Checkbox isChecked />} | ||
onClick={() => console.log(null)} | ||
selected={false} |
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.
Please finish implementing this
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.
nit: might be nice to consider including the avatar with badge for the account, as well as the tokens avatargroup, with mock values, that would get the UI done to what the corresponding issue shows.
Doing this was useful for mobile since it revealed some adjustments DS team had to do to these components who had not been used much yet on mobile, maybe your extension components are already matching figma
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.
It's a dumb component so having a console on click is fine. The selection is not gonna be based on this component so it's fine to keep it this way. @jonybur
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.
@EtherWizard33 the connected badges for avatar is visible when it's in the popup view. So, it's already included in there
// isIndeterminate={isIndeterminate} | ||
/> | ||
</Box> | ||
{mergedAccounts.map((account) => ( |
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.
Also add the key
to the map
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.
It does have a key
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.
True, sorry
|
||
type EditAccountsModalProps = { | ||
onClose: () => void; | ||
allowedAccountTypes?: KeyringAccountType[]; // Made optional to match default |
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.
To match what default?
2f04498
to
d6485ce
Compare
Quality Gate passedIssues Measures |
Builds ready [78b7533]
Page Load Metrics (1671 ± 71 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
This PR is to add an edit accounts modal
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/2686
Manual testing steps
Screenshots/Recordings
Before
NA
After
Pre-merge author checklist
Pre-merge reviewer checklist