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

fix: Issue 20485 #25518

Merged
merged 15 commits into from
Jun 26, 2024
Merged

fix: Issue 20485 #25518

merged 15 commits into from
Jun 26, 2024

Conversation

ejwessel
Copy link
Contributor

@ejwessel ejwessel commented Jun 26, 2024

Description

  1. The networks indicator on the confirmations page was showing incorrectly for networks other than Ethereum and Sepolia. If the network was anything other than those two main networks then a gray question mark would show. Not only was this unsightly, but it's confusing for the user to see a known network in the network dropdown only for it to know be recognized in the confirmation screen.
  2. The improvement is to repurpose the Network Display and reuse the the NetworkPicker so that there is consistency between the selected dropdown view and the confirmations network identifier.

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Go to 'Send'
  2. Fill out 'Send' fields
  3. Click 'Continue'
  4. Validate that the network dropdown (of which is disabled) matches that of the network icon within the confirmation page; same icon and the same name.

Screenshots/Recordings

Before

Screenshot 2024-06-25 at 12 08 24 Screenshot 2024-06-25 at 12 09 15

After

Screenshot 2024-06-26 at 11 53 42

Pre-merge author checklist

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.

ejwessel added 2 commits June 25, 2024 17:06
Signed-off-by: Ethan Wessel <[email protected]>
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.

@ejwessel ejwessel changed the title Issue 20485 fix fix: Issue 20485 Jun 26, 2024
@ejwessel ejwessel added the team-confirmations Push issues to confirmations team label Jun 26, 2024
ejwessel added 2 commits June 25, 2024 17:32
Signed-off-by: Ethan Wessel <[email protected]>
Signed-off-by: Ethan Wessel <[email protected]>
@ejwessel ejwessel marked this pull request as ready for review June 26, 2024 00:40
@ejwessel ejwessel requested review from a team as code owners June 26, 2024 00:40
Copy link
Contributor

@georgewrmarshall georgewrmarshall left a comment

Choose a reason for hiding this comment

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

Looking great! We may want to add before/after screenshots to ensure no visual regressions. Made one suggestion that should fix the failing e2e tests

label={currentNetwork?.nickname}
labelProps={{ 'data-testid': 'network-display' }}
src={currentNetwork?.rpcPrefs?.imageUrl}
iconProps={{ display: 'none' }} // do not show the dropdown icon
Copy link
Member

Choose a reason for hiding this comment

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

Thoughts on making the icon smaller? It seems to be too close to the container's borders

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this has been updated

Screenshot 2024-06-26 at 2 20 18 PM

Copy link

codecov bot commented Jun 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.67%. Comparing base (4e2596f) to head (0b1c367).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #25518      +/-   ##
===========================================
- Coverage    69.70%   69.67%   -0.03%     
===========================================
  Files         1349     1349              
  Lines        47864    47850      -14     
  Branches     13205    13195      -10     
===========================================
- Hits         33359    33337      -22     
- Misses       14505    14513       +8     

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

@metamaskbot
Copy link
Collaborator

Builds ready [0b1c367]
Page Load Metrics (128 ± 168 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint68182882311
domContentLoaded9151111
load411652128350168
domInteractive9151111
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 0 Bytes (0.00%)
  • ui: -4.39 KiB (-0.06%)
  • common: -67 Bytes (-0.00%)

labelProps={{ 'data-testid': 'network-display' }}
src={currentNetwork?.rpcPrefs?.imageUrl}
iconProps={{ display: 'none' }} // do not show the dropdown icon
avatarNetworkProps={{ size: AvatarNetworkSize.Xs }}
Copy link
Contributor

Choose a reason for hiding this comment

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

non-blocking: not sure why this is required it's this size by default 🤔

Copy link
Contributor

@georgewrmarshall georgewrmarshall left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

  • Checked NetworkDisplay in send flow ✅
  • Checked NetworkDisplay in storybook ✅

@ejwessel ejwessel merged commit 69ec573 into develop Jun 26, 2024
91 checks passed
@ejwessel ejwessel deleted the issue-20485-fix branch June 26, 2024 23:31
@github-actions github-actions bot locked and limited conversation to collaborators Jun 26, 2024
@metamaskbot metamaskbot added the release-12.1.0 Issue or pull request that will be included in release 12.1.0 label Jun 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.1.0 Issue or pull request that will be included in release 12.1.0 send-swap team-confirmations Push issues to confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants