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

UX: Multichain: Address Copy Button #18153

Merged
merged 17 commits into from
Mar 29, 2023
Merged

UX: Multichain: Address Copy Button #18153

merged 17 commits into from
Mar 29, 2023

Conversation

darkwing
Copy link
Contributor

@darkwing darkwing commented Mar 14, 2023

Explanation

Provides the new copy button component for use around the extension.

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/375

Screenshots/Screencaps

CopyButton

Manual Testing Steps

  1. Click button
  2. See icon change

Pre-merge author checklist

  • I've clearly explained:
    • What problem this PR is solving
    • How this problem was solved
    • How reviewers can test my changes
  • Sufficient automated test coverage has been added

Pre-merge reviewer checklist

  • Manual testing (e.g. pull and build branch, run in browser, test code being changed)
  • PR is linked to the appropriate GitHub issue
  • IF this PR fixes a bug in the release milestone, add this PR to the release milestone

If further QA is required (e.g. new feature, complex testing steps, large refactor), add the Extension QA Board label.

In this case, a QA Engineer approval will be be required.

@darkwing darkwing requested a review from a team as a code owner March 14, 2023 19:04
@darkwing darkwing requested a review from jpuri March 14, 2023 19:04
@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.

@darkwing darkwing changed the title UX: Multichain: Addess Copy Button UX: Multichain: Address Copy Button Mar 14, 2023
@darkwing darkwing force-pushed the multichain-copy-button branch 2 times, most recently from 9dd50f6 to db53a0b Compare March 15, 2023 14:52
@darkwing darkwing force-pushed the multichain-copy-button branch from d1422df to d1e1ec0 Compare March 15, 2023 22:23
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.

Looking great. Just need to update the handler

ui/components/multichain/address-copy-button/index.js Outdated Show resolved Hide resolved
@darkwing darkwing requested a review from kumavis as a code owner March 16, 2023 23:16
@darkwing darkwing force-pushed the multichain-copy-button branch from 86c7200 to f6d5796 Compare March 16, 2023 23:35
@darkwing darkwing requested a review from NidhiKJha March 17, 2023 13:29
@metamaskbot
Copy link
Collaborator

Builds ready [2e1e9ec]
Page Load Metrics (1622 ± 41 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint103142117126
domContentLoaded1499178716088139
load1499180116228641
domInteractive1499178716088139
Bundle size diffs
  • background: 0 bytes
  • ui: 3252 bytes
  • common: 0 bytes

@codecov
Copy link

codecov bot commented Mar 18, 2023

Codecov Report

Merging #18153 (bd923fa) into develop (99bdf84) will increase coverage by 0.01%.
The diff coverage is 83.33%.

@@             Coverage Diff             @@
##           develop   #18153      +/-   ##
===========================================
+ Coverage    64.51%   64.52%   +0.01%     
===========================================
  Files          914      915       +1     
  Lines        35329    35343      +14     
  Branches      9072     9079       +7     
===========================================
+ Hits         22791    22802      +11     
- Misses       12538    12541       +3     
Impacted Files Coverage Δ
ui/components/ui/qr-code/qr-code.js 78.57% <50.00%> (-2.20%) ⬇️
...tichain/address-copy-button/address-copy-button.js 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@darkwing darkwing force-pushed the multichain-copy-button branch 2 times, most recently from fa2b3d6 to 2689344 Compare March 18, 2023 18:54
@metamaskbot
Copy link
Collaborator

Builds ready [2689344]
Page Load Metrics (1368 ± 20 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint831149284
domContentLoaded1315140913502613
load1320146713684220
domInteractive1315140913502613
Bundle size diffs
  • background: 0 bytes
  • ui: 3252 bytes
  • common: 0 bytes

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.

Fantastic work. Left one small suggestion

ui/components/multichain/address-copy-button/index.scss Outdated Show resolved Hide resolved
ui/components/ui/qr-code/qr-code.js Show resolved Hide resolved
@metamaskbot
Copy link
Collaborator

Builds ready [d2a452a]
Page Load Metrics (1722 ± 81 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1032391332813
domContentLoaded15572213171115675
load15572214172216881
domInteractive15572213171115675
Bundle size diffs
  • background: 0 bytes
  • ui: 3285 bytes
  • common: 0 bytes

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!

@metamaskbot
Copy link
Collaborator

Builds ready [5f76dda]
Page Load Metrics (1635 ± 114 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint911851202412
domContentLoaded135919961621234113
load135920041635238114
domInteractive135919961621234113
Bundle size diffs
  • background: 0 bytes
  • ui: 3770 bytes
  • common: 0 bytes

@metamaskbot
Copy link
Collaborator

Builds ready [f825147]
Page Load Metrics (1728 ± 44 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1042401373115
domContentLoaded1543187517168742
load1543187517289344
domInteractive1543187517168742
Bundle size diffs
  • background: 0 bytes
  • ui: 3346 bytes
  • common: 0 bytes

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.

Left one question that needs @garrettbear's attention

@@ -78,7 +78,7 @@ $text-variants: (

@each $overflow in $overflow-wrap {
&--overflow-wrap-#{$overflow} {
overflow-wrap: $overflow;
word-break: $overflow;
Copy link
Contributor

Choose a reason for hiding this comment

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

The property values of $overflow-wrap don't all work with word-break? e.g. anywhere

$overflow-wrap: normal, break-word, anywhere;

https://developer.mozilla.org/en-US/docs/Web/CSS/word-break

Do we need to create a wordbreak scss variable? cc @garrettbear

Copy link
Contributor

Choose a reason for hiding this comment

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

This got reverted, so all good for now. BUT it did expose that we need a word-break option since you can see in this PR that the overflow-wrap won't work.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sweet created an issue. Can you fill in the deets? #18354

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.

Left some more comments

paddingRight={3}
paddingLeft={3}
size={Size.SM}
className="multichain-address-copy-button"
Copy link
Contributor

Choose a reason for hiding this comment

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

Previously if wrap was true you set the height to auto which I think made sense? It would help it degrade gracefully we would end up with a bubble button but at least the text wouldn't be out side the button?

So instead of this(I know I've made the address ridiculously long)

Screenshot 2023-03-22 at 6 07 41 PM

It would be more like
Screenshot 2023-03-22 at 6 08 37 PM

But I guess that's a design decision? cc @SaraCheikh @Akatori-Design

Choose a reason for hiding this comment

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

If it breaks it should gracefuly break, so yea I think we should keep the text in the button,

@darkwing darkwing force-pushed the multichain-copy-button branch from f825147 to 5462848 Compare March 23, 2023 13:47
@metamaskbot
Copy link
Collaborator

Builds ready [5462848]
Page Load Metrics (1817 ± 71 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint105152129115
domContentLoaded15722079178513464
load15722204181714871
domInteractive15722079178513464
Bundle size diffs
  • background: 0 bytes
  • ui: 3770 bytes
  • common: 0 bytes

@metamaskbot
Copy link
Collaborator

Builds ready [04d1d5b]
Page Load Metrics (1839 ± 68 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint99161133147
domContentLoaded16352087180712962
load16452170183914168
domInteractive16352087180712962
Bundle size diffs
  • background: 0 bytes
  • ui: 3770 bytes
  • common: 0 bytes

@garrettbear
Copy link
Contributor

Here are my suggestions to clean this up and took into consideration of @georgewrmarshall comments as well

PR multichain-copy-button-gw-suggestions -> multichain-copy-button #18324

garrettbear and others added 2 commits March 28, 2023 09:53
* multichain copy button updates

* Update ui/components/multichain/address-copy-button/index.scss

Co-authored-by: George Marshall <[email protected]>

---------

Co-authored-by: George Marshall <[email protected]>
@metamaskbot
Copy link
Collaborator

Builds ready [c4e71b3]
Page Load Metrics (1595 ± 36 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint94150119147
domContentLoaded1465183915848139
load1516183915957536
domInteractive1465183915848139
Bundle size diffs
  • background: 0 bytes
  • ui: 3365 bytes
  • common: 0 bytes

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 with one question for design

@metamaskbot
Copy link
Collaborator

Builds ready [bd923fa]
Page Load Metrics (1553 ± 56 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint864061266632
domContentLoaded13531857153711656
load13531857155311656
domInteractive13521857153711656
Bundle size diffs
  • background: 0 bytes
  • ui: 3365 bytes
  • common: 0 bytes

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!

@darkwing darkwing merged commit efc34b9 into develop Mar 29, 2023
@darkwing darkwing deleted the multichain-copy-button branch March 29, 2023 16:14
@github-actions github-actions bot locked and limited conversation to collaborators Mar 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants