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: Hook in Portfolio "Spending Caps" Entry Points #27607

Open
wants to merge 23 commits into
base: develop
Choose a base branch
from

Conversation

julesat22
Copy link
Contributor

@julesat22 julesat22 commented Oct 3, 2024

Description

  1. What is the reason for the change?
    Portfolio has requested to add in two spending cap entry points into the extension, so users can easily navigate to the Portfolio to view/ manage their spending caps
  2. What is the improvement/solution?
    This adds value for the users who would like to view/ manage their spending caps

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Connect an account
  2. Go to this the assets page in the extension
  3. Click on an asset
  4. Under "Token details", there should be a category for all native and non-native token types for "Spending caps"
  5. Next to Spending caps, check the there is a link that routes the user to the portfolio with the "spendingCaps" tab and the user's account address passed as query params
  6. Check that the link redirects to Portfolio
  7. Go to the global main menu in the extension
  8. Test all the previous steps

Note:

Currently, work is needed on the Portfolio to handle all edge cases (user navigated in an unconnected Portfolio state, user navigates and their associated accountAddress is not connected, user navigates and the associated account is not selected in the accounts sidebar, etc. This work will be a fast follow.

Screenshots/Recordings

Before

Screenshot 2024-10-03 at 10 45 22 AM Screenshot 2024-10-03 at 10 45 14 AM

After

Screenshot 2024-10-03 at 9 37 54 AM Screenshot 2024-10-15 at 9 47 46 AM Screenshot 2024-10-03 at 9 33 21 AM Screenshot 2024-10-03 at 9 32 20 AM

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.

@julesat22 julesat22 requested review from a team as code owners October 3, 2024 17:45
Copy link
Contributor

github-actions bot commented Oct 3, 2024

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.

@julesat22 julesat22 changed the title Hook in Portfolio "Spending Caps" Entry Points ferat: Hook in Portfolio "Spending Caps" Entry Points Oct 3, 2024
@julesat22 julesat22 changed the title ferat: Hook in Portfolio "Spending Caps" Entry Points feat: Hook in Portfolio "Spending Caps" Entry Points Oct 3, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [4810377]
Page Load Metrics (1725 ± 62 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint31819651666334160
domContentLoaded15211926170412459
load15291979172512862
domInteractive159741209
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.88 KiB (0.03%)
  • common: 133 Bytes (0.00%)

@jclancy93
Copy link
Contributor

image
The gap when the token list section is shown looks like it's less than other sections. The way folks have added padding/margins in this section looks inconsistent but adding a 6px margin top seems to make things look less cramped

@metamaskbot
Copy link
Collaborator

Builds ready [72392f5]
Page Load Metrics (1861 ± 117 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint153624971865253122
domContentLoaded152824271828226109
load153624961861243117
domInteractive20104502311
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.88 KiB (0.02%)
  • common: 133 Bytes (0.00%)

@julesat22
Copy link
Contributor Author

julesat22 commented Oct 15, 2024

image The gap when the token list section is shown looks like it's less than other sections. The way folks have added padding/margins in this section looks inconsistent but adding a 6px margin top seems to make things look less cramped

Great catch, updated and a screenshot has been added to the overview that reflects the spacing changes

Copy link

sonarcloud bot commented Oct 16, 2024

@metamaskbot
Copy link
Collaborator

Builds ready [534d945]
Page Load Metrics (1928 ± 118 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint22125021839444213
domContentLoaded16112354187420598
load165025161928246118
domInteractive16162563416
backgroundConnect6231575727
firstReactRender462791045024
getState4125192813
initialActions01000
loadScripts11281783138617282
setupStore12109362813
uiStartup185533132188382183
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.96 KiB (0.03%)
  • common: 133 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [c16b5fc]
Page Load Metrics (2046 ± 133 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint165425612047274132
domContentLoaded160524962001274132
load165025442046278133
domInteractive27171603416
backgroundConnect136940189
firstReactRender442961095326
getState65417167
initialActions01000
loadScripts115919181489224108
setupStore11102342813
uiStartup180832292285356171
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.96 KiB (0.03%)
  • common: 133 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [8a2c396]
Page Load Metrics (2106 ± 248 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint40033551888693333
domContentLoaded161432092073489235
load162233542106517248
domInteractive17137542713
backgroundConnect9176314321
firstReactRender453001265828
getState4199364622
initialActions01000
loadScripts116424771550398191
setupStore10173414120
uiStartup182442222414652313
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.96 KiB (0.03%)
  • common: 133 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [2519c64]
Page Load Metrics (2374 ± 117 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint40729492178620298
domContentLoaded192628382337239115
load198428532374243117
domInteractive2910354189
backgroundConnect10103463115
firstReactRender612811214421
getState594352813
initialActions01000
loadScripts14132002173116780
setupStore1583352512
uiStartup220733692684305147
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.96 KiB (0.03%)
  • common: 133 Bytes (0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs dev review
Development

Successfully merging this pull request may close these issues.

5 participants