metamask-extension icon indicating copy to clipboard operation
metamask-extension copied to clipboard

Created a custom spending cap component

Open VSaric opened this issue 2 years ago • 12 comments

Explanation

Created a custom spending cup component. This component can't yet be added to the app. Instead, I added a storybook story that displays this component. This component received at least the following props:

  • tokenName (type: string)
  • currentTokenBalance (type: number)
  • dappProposedValue (type: number)
  • onEdit (type: function)

More Information

  • Fixes #15224

Screenshots/Screencaps

https://user-images.githubusercontent.com/92527393/185619639-085fe64e-dd43-4fbf-8bbb-51467483ed33.mov

Manual Testing Steps

This component can be tested by running storybook (yarn storybook) and then go to the COMPONENTS tab and open in App/CustomSpendingCup. For testing this component you can see the Acceptance Criteria in the ticket: #15224.

VSaric avatar Aug 10 '22 13:08 VSaric

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.

github-actions[bot] avatar Aug 10 '22 13:08 github-actions[bot]

Builds ready [41c1302]
Page Load Metrics (1811 ± 53 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint931787192366176
domContentLoaded16361952179610350
load16361968181111053
domInteractive16361952179610350

highlights:

storybook

metamaskbot avatar Aug 10 '22 13:08 metamaskbot

Builds ready [738586a]
Page Load Metrics (1759 ± 41 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint843411135326
domContentLoaded1614192017397637
load1624193117598641
domInteractive1614192017397637

highlights:

storybook

metamaskbot avatar Aug 10 '22 15:08 metamaskbot

Builds ready [1c35f4a]
Page Load Metrics (1816 ± 45 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint87168110209
domContentLoaded1622201517999546
load1622203718169445
domInteractive1622201517999546

highlights:

storybook

metamaskbot avatar Aug 11 '22 13:08 metamaskbot

Builds ready [190f93d]
Page Load Metrics (1907 ± 83 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1031785206363174
domContentLoaded16862227189216077
load16942304190717383
domInteractive16862227189116077

highlights:

storybook

metamaskbot avatar Aug 19 '22 13:08 metamaskbot

This PR is blocked by: #15679 @georgewrmarshall

VSaric avatar Aug 29 '22 08:08 VSaric

@VSaric I believe this is unblocked now. mind getting this ready for another review?

brad-decker avatar Sep 08 '22 18:09 brad-decker

@brad-decker Yes of course! I need to resolve conflict in form-field.js, push changes and I will re-request review. I will do that today.

VSaric avatar Sep 09 '22 07:09 VSaric

I think we can still extend the FormField component a bit more I've created this draft PR #15679 if these updates were made would you be able to use the FormField without needing to add any context specific props like customTooltipComponent?

I resolved conflicts in form-field.js component and used properties that you told me here: https://github.com/MetaMask/metamask-extension/pull/15679#discussion_r963838251. Now it is ready for another review! 😃 @georgewrmarshall @brad-decker

VSaric avatar Sep 09 '22 13:09 VSaric

Builds ready [7ec87a7]
Page Load Metrics (1705 ± 55 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint90139108126
domContentLoaded15491913167810550
load15492002170511555
domInteractive15491913167810550

highlights:

storybook

metamaskbot avatar Sep 09 '22 14:09 metamaskbot

Verified by QA

mirjanaKukic avatar Sep 09 '22 14:09 mirjanaKukic

Builds ready [726600c]
Page Load Metrics (1302 ± 47 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint87133107147
domContentLoaded11351461129310048
load1135146113029847
domInteractive11351461129310048

highlights:

storybook

metamaskbot avatar Sep 21 '22 10:09 metamaskbot

@georgewrmarshall when you have time, could you re-review this PR? Thanks! 🧡

bschorchit avatar Sep 23 '22 15:09 bschorchit

Builds ready [b788666]
Page Load Metrics (1350 ± 56 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint92138112136
domContentLoaded11831657132611555
load11961657135011756
domInteractive11831657132611555

highlights:

storybook

metamaskbot avatar Sep 26 '22 17:09 metamaskbot

@georgewrmarshall @brad-decker @darkwing When you have time, could you re-review this PR? Thank you in advance! 😄

VSaric avatar Sep 27 '22 20:09 VSaric

Builds ready [a70f949]
Page Load Metrics (2590 ± 127 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1022435261501241
domContentLoaded219033872562261125
load219033872590265127
domInteractive219033872562261125

highlights:

storybook

metamaskbot avatar Sep 27 '22 21:09 metamaskbot

Builds ready [e029de4]
Page Load Metrics (2322 ± 54 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint882151172713
domContentLoaded2095249922979345
load20952565232211254
domInteractive2094249922979345

highlights:

storybook

metamaskbot avatar Sep 28 '22 12:09 metamaskbot