Skip to content
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: display snap account name #22342

Merged
merged 21 commits into from
Dec 20, 2023
Merged

feat: display snap account name #22342

merged 21 commits into from
Dec 20, 2023

Conversation

k-g-j
Copy link
Contributor

@k-g-j k-g-j commented Dec 19, 2023

Description

This feature adds a label for snap accounts with the derived snap name and MetaMask snap icon to the tag on the accounts list and wallet overview UI.

Reason: Account snaps should present a snap tag, including the snap badge and the name of the snap it's derived from.

Improvement: The account-list-menu has been updated to pass a keyring type and optional tag label to child account-list-item components. The wallet-overview screen now shows a tag with the snap name for snap accounts.

Related issues

Fixes: #20819

Manual testing steps

  1. Go to the SSK and create a snap account
  2. Open the accounts list dropdown in the extension
  3. You should see "MetaMask Simple Snap Keyring (Beta)" under the new account with the snap icon
  4. Open the expanded view of the extension
  5. You should see "MetaMask Simple Snap Keyring (Beta)" under the new account with the snap icon when you navigate to the new account page
  6. You should NOT see any tag under an account that is not a snap account (default MM accounts)

Jest

jest ui/components/multichain/account-list-menu/account-list-menu.test.js
jest ui/components/multichain/account-list-item/account-list-item.test.js

Screenshots/Recordings

Before

Screenshot 2023-12-14 at 2 25 55 PM Screenshot 2023-12-14 at 2 26 34 PM

After

Screenshot 2023-12-14 at 2 29 24 PM Screenshot 2023-12-14 at 2 30 04 PM

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.

@k-g-j k-g-j requested a review from a team as a code owner December 19, 2023 14:57
Copy link
Contributor

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.

@gantunesr gantunesr changed the title Feat/display snap account name feat: display snap account name Dec 19, 2023
@k-g-j k-g-j force-pushed the feat/display-snap-account-name branch from ff91dc6 to 9fdad04 Compare December 19, 2023 17:23
@k-g-j k-g-j force-pushed the feat/display-snap-account-name branch 2 times, most recently from 07902f9 to 2e38cf9 Compare December 19, 2023 19:02
Copy link

codecov bot commented Dec 19, 2023

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (7e66e23) 67.90% compared to head (fe9fa3d) 67.92%.

Files Patch % Lines
.../components/app/wallet-overview/wallet-overview.js 57.14% 3 Missing ⚠️
.../multichain/account-list-menu/account-list-menu.js 90.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #22342      +/-   ##
===========================================
+ Coverage    67.90%   67.92%   +0.02%     
===========================================
  Files         1071     1071              
  Lines        41378    41399      +21     
  Branches     11112    11123      +11     
===========================================
+ Hits         28095    28118      +23     
+ Misses       13283    13281       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@k-g-j k-g-j force-pushed the feat/display-snap-account-name branch from 60f0140 to fe9fa3d Compare December 19, 2023 23:08
Copy link
Contributor

@owencraston owencraston left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! 🥳
Screenshot 2023-12-19 at 6 50 12 PM

@metamaskbot
Copy link
Collaborator

Builds ready [fe9fa3d]
Page Load Metrics (1551 ± 141 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint943881787335
domContentLoaded12202465828
load103220591551294141
domInteractive12202465828
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 1.74 KiB (0.03%)
  • common: 0 Bytes (0.00%)

Copy link
Member

@gantunesr gantunesr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The feature works as expected. Ship it

Screen.Recording.2023-12-19.at.21.05.42.mov

@k-g-j k-g-j merged commit e398505 into develop Dec 20, 2023
67 checks passed
@k-g-j k-g-j deleted the feat/display-snap-account-name branch December 20, 2023 00:18
@github-actions github-actions bot locked and limited conversation to collaborators Dec 20, 2023
@metamaskbot metamaskbot added the release-11.9.0 Issue or pull request that will be included in release 11.9.0 label Dec 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-snaps area-UI Relating to the user interface. release-11.9.0 Issue or pull request that will be included in release 11.9.0 snap-keyring-epic team-accounts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add snap label to Account Snaps in the account list
4 participants