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

Fixing truncation and alignment in the network toggle component #21370

Merged
merged 1 commit into from
Oct 13, 2023

Conversation

georgewrmarshall
Copy link
Contributor

@georgewrmarshall georgewrmarshall commented Oct 13, 2023

Description

Currently there is some truncation issues with long network names in the privacy incoming transactions section. The truncation of the text is not working which results in broken UI for longer network names

This PR adds some styles which resolve the issue as well as adding a story for the network-toggle component for easier revision and review

Manual testing steps

  1. Open the storybook build on this PR
  2. Search NetworkToggle and check the story in small screen sizes
  3. Pull this branch
  4. Go to Settings > Security & privacy > Incoming transactions section

Screenshots/Recordings

Before

before.mov

After

after.mov

Related issues

Fixes #21369

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained:
    • What problem this PR is solving.
    • How this problem was solved.
    • How reviewers can test my changes.
  • I’ve indicated what issue this PR is linked to: Fixes [Bug]: Inconsistent toggle alignments breaking UI #21369
  • I’ve included tests if applicable.
  • I’ve documented any added code.
  • I’ve applied the right labels on the PR (see labeling guidelines).
  • 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.

@georgewrmarshall georgewrmarshall added team-design-system All issues relating to design system in Extension needs-ux-ds-review labels Oct 13, 2023
@georgewrmarshall georgewrmarshall self-assigned this Oct 13, 2023
@github-actions
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.

@georgewrmarshall georgewrmarshall force-pushed the fix/21369/privacy-policy-truncation branch from c698757 to d8dedfe Compare October 13, 2023 11:48
@georgewrmarshall georgewrmarshall force-pushed the fix/21369/privacy-policy-truncation branch from d8dedfe to 8343fec Compare October 13, 2023 12:07
@georgewrmarshall georgewrmarshall marked this pull request as ready for review October 13, 2023 12:18
@georgewrmarshall georgewrmarshall requested a review from a team as a code owner October 13, 2023 12:18
@metamaskbot
Copy link
Collaborator

Builds ready [8343fec]
Page Load Metrics (1199 ± 384 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint841641202311
domContentLoaded841631102412
load10221131199800384
domInteractive841631102412
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 284 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@codecov
Copy link

codecov bot commented Oct 13, 2023

Codecov Report

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

Comparison is base (8646a76) 68.58% compared to head (8343fec) 68.58%.
Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #21370   +/-   ##
========================================
  Coverage    68.58%   68.58%           
========================================
  Files         1026     1026           
  Lines        40978    40978           
  Branches     10936    10936           
========================================
  Hits         28104    28104           
  Misses       12874    12874           
Files Coverage Δ
.../app/incoming-trasaction-toggle/network-toggle.tsx 93.75% <66.67%> (ø)

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

Copy link
Member

@NidhiKJha NidhiKJha left a comment

Choose a reason for hiding this comment

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

LGTM!

  • Verified in storybook
  • Verified in extension

@georgewrmarshall georgewrmarshall merged commit b0c0c35 into develop Oct 13, 2023
9 checks passed
@georgewrmarshall georgewrmarshall deleted the fix/21369/privacy-policy-truncation branch October 13, 2023 13:49
@github-actions github-actions bot locked and limited conversation to collaborators Oct 13, 2023
@metamaskbot metamaskbot added the release-11.5.0 Issue or pull request that will be included in release 11.5.0 label Oct 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-11.5.0 Issue or pull request that will be included in release 11.5.0 team-design-system All issues relating to design system in Extension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Inconsistent toggle alignments breaking UI
4 participants