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 Entry Points #27607

Merged
merged 54 commits into from
Nov 21, 2024
Merged

feat: Hook in Portfolio Entry Points #27607

merged 54 commits into from
Nov 21, 2024

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 some 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 as well as their portfolio.

Open in GitHub Codespaces

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

Screenshots/Recordings

Before

Screenshot 2024-10-03 at 10 45 22 AM

After

Screenshot 2024-10-03 at 9 37 54 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

@metamaskbot
Copy link
Collaborator

Builds ready [adac4da]
Page Load Metrics (2046 ± 129 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint176230862050268128
domContentLoaded175730702018266128
load176230892046269129
domInteractive1799512311
backgroundConnect897302512
firstReactRender972991334722
getState45515136
initialActions01000
loadScripts12822093146817986
setupStore687172110
uiStartup199033162294285137
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.27 KiB (0.02%)
  • common: 85 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [a498e91]
Page Load Metrics (2364 ± 164 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint41929452179677325
domContentLoaded186828822336348167
load188929212364341164
domInteractive36169843216
backgroundConnect1186312110
firstReactRender853011314923
getState665252010
initialActions01000
loadScripts134521701739278133
setupStore76619188
uiStartup206832272647399192
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.27 KiB (0.02%)
  • common: 85 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [05d9935]
Page Load Metrics (1909 ± 219 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint89720591758216104
domContentLoaded164337581873440211
load167438581909455219
domInteractive17148604019
backgroundConnect9127332914
firstReactRender532961336732
getState482272512
initialActions01000
loadScripts117429771386371178
setupStore65110115
uiStartup184343102191519249
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.27 KiB (0.02%)
  • common: 85 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [f781e65]
Page Load Metrics (2197 ± 116 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint188228882195244117
domContentLoaded186028052144234112
load188628672197241116
domInteractive29172583718
backgroundConnect1088522612
firstReactRender53220823417
getState48210913316
initialActions01000
loadScripts13762155161019895
setupStore67912167
uiStartup217032382524296142
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.27 KiB (0.02%)
  • common: 85 Bytes (0.00%)

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! 🚀 Really nice work! I made one small adjustment to use the ButtonLink component, which I missed in the previous review. We can use it for both internal and external links—hope that’s okay!

  • Checked manual testing steps and linking to portfolio locally ✅
  • Checked semantic HTML ✅
  • Checked for design system consistency ✅

Comment on lines +287 to +294
<ButtonLink
className="asset-page__spending-caps mm-text--body-md-medium"
href={portfolioSpendingCapsUrl}
target="_blank"
rel="noopener noreferrer"
>
{t('editInPortfolio')}
</ButtonLink>,
Copy link
Contributor

Choose a reason for hiding this comment

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

Updating to ButtonLink here to adhere to the design system which has a slightly different border for the link interaction.

Before

before.mov

After

after.mov

Still renders semantic HTML as the as is handled by the href prop

Screenshot 2024-11-19 at 8 46 37 AM

@metamaskbot
Copy link
Collaborator

Builds ready [0681cc4]
Page Load Metrics (2112 ± 84 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint24224352020447214
domContentLoaded17562345207216579
load17742439211217584
domInteractive19157593316
backgroundConnect1394372713
firstReactRender6211479157
getState4811592168
initialActions01000
loadScripts12691807154914972
setupStore65110105
uiStartup204829032412208100
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.23 KiB (0.02%)
  • common: 85 Bytes (0.00%)

@ziad-saab ziad-saab added this pull request to the merge queue Nov 19, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 19, 2024
@GuiBibeau GuiBibeau added this pull request to the merge queue Nov 21, 2024
Merged via the queue into develop with commit 02d52b4 Nov 21, 2024
77 checks passed
@GuiBibeau GuiBibeau deleted the MMPD-1363 branch November 21, 2024 17:00
@github-actions github-actions bot locked and limited conversation to collaborators Nov 21, 2024
@metamaskbot metamaskbot added the release-12.9.0 Issue or pull request that will be included in release 12.9.0 label Nov 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
INVALID-PR-TEMPLATE PR's body doesn't match template release-12.9.0 Issue or pull request that will be included in release 12.9.0 team-portfolio
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

9 participants