Skip to content

feat: add discover button to portfolio discover network page #30777

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

Merged
merged 22 commits into from
Mar 26, 2025

Conversation

Julink-eth
Copy link
Contributor

@Julink-eth Julink-eth commented Mar 5, 2025

Description

  1. What is the reason for the change?
    There is a new network ecosystem page being added to portfolio. To add visibility for this page, a new Discover button needs to be added to the networks menu for users to be redirected to that page.
  2. What is the improvement/solution?
    Add a new button on top of the Edit button in the network's menu.

A feature flag has been added to activate the feature when the Portfolio Hub page for Linea will be live.

Related issues

NA

Manual testing steps

  1. Go to the networks menu
  2. Click on the 3 dots icon next to the network Linea
  3. You should see the button Discover
  4. Click on the button Discover
  5. You should be redirected to the page https://portfolio.metamask.io/explore/networks/linea (Might not be live yet)
  6. Check for the others networks in the networks menu, the button should not be visible

Screenshots/Recordings

Before

image

After

image

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.

@Julink-eth Julink-eth added area-customNetworks area-UI Relating to the user interface. labels Mar 5, 2025
Copy link
Contributor

github-actions bot commented Mar 5, 2025

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.

@Julink-eth
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@metamaskbot
Copy link
Collaborator

Builds ready [4980350]
Page Load Metrics (1827 ± 75 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint16092306182715373
domContentLoaded15582149177112459
load16022302182715675
domInteractive26121392110
backgroundConnect11145553818
firstReactRender1482312110
getState673302411
initialActions01000
loadScripts1177156813418842
setupStore85316136
uiStartup179628182132289139
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 653 Bytes (0.01%)
  • common: 187 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [fa39f42]
Page Load Metrics (2208 ± 260 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint172137442162439211
domContentLoaded170834162077364175
load172241672208542260
domInteractive26236564723
backgroundConnect12782137223107
firstReactRender15176454220
getState7275547235
initialActions01000
loadScripts129524101568238114
setupStore7140333919
uiStartup1913682428131271611
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 653 Bytes (0.01%)
  • common: 187 Bytes (0.00%)

@Julink-eth Julink-eth marked this pull request as ready for review March 13, 2025 08:59
@Julink-eth Julink-eth requested a review from a team as a code owner March 13, 2025 08:59
@metamaskbot
Copy link
Collaborator

Builds ready [4ce842f]
Page Load Metrics (7704 ± 4232 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint186833316651685494105
domContentLoaded176433010684788204235
load188833238770488144232
domInteractive2897914320799
backgroundConnect233969688906435
firstReactRender23263986431
getState5349564241049504
initialActions00000
loadScripts131932522607587514202
setupStore141734173369177
uiStartup2479335381008190944367
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 653 Bytes (0.01%)
  • common: 187 Bytes (0.00%)

{onDiscoverClick ? (
<MenuItem
iconName={IconName.Eye}
onClick={(e) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be a useCallback as well?

Copy link
Contributor Author

@Julink-eth Julink-eth Mar 24, 2025

Choose a reason for hiding this comment

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

Hey David!
I can add it but in that case should we add useCallBack for onEditClick and onDeleteClick as well ?

Copy link
Contributor

@stanleyyconsensys stanleyyconsensys Mar 25, 2025

Choose a reason for hiding this comment

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

i think the onDiscoverClick is already having useCallback at getItemCallbacks in network-list-menu.tsx

then the function pass to network-list-item and finally landed in this component, which should have the same behaviour as other functions; e.g: onEditClick, onDeleteClick, no?

@metamaskbot
Copy link
Collaborator

Builds ready [b4ad95d]
Page Load Metrics (2932 ± 1036 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint170811824272721251020
domContentLoaded15211105924791997959
load171012043293221571036
domInteractive25368747536
backgroundConnect461345482368177
firstReactRender20184934321
getState1461024619995
initialActions01000
loadScripts1082958518101795862
setupStore940113912359
uiStartup190416602561436621758
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 719 Bytes (0.01%)
  • common: 322 Bytes (0.00%)

@Julink-eth Julink-eth moved this from Needs dev review to Review in progress in PR review queue Mar 26, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [751972f]
Page Load Metrics (4385 ± 2415 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint178420327414950642432
domContentLoaded164320125385151012449
load180520455438550302415
domInteractive271277154270130
backgroundConnect1461761565383184
firstReactRender532051123718
getState5539319911153
initialActions02000
loadScripts122118595316749762390
setupStore2239414410349
uiStartup250221670810157192746
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 719 Bytes (0.01%)
  • common: 322 Bytes (0.00%)

@Julink-eth Julink-eth enabled auto-merge March 26, 2025 12:19
darkwing
darkwing previously approved these changes Mar 26, 2025
@Julink-eth Julink-eth moved this from Review in progress to Has approvals, needs CODEOWNER in PR review queue Mar 26, 2025
gambinish
gambinish previously approved these changes Mar 26, 2025
Copy link
Contributor

@gambinish gambinish left a comment

Choose a reason for hiding this comment

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

Pulled, tested, LGTM.

Looks like CI is still broken. Seemingly CI related. I noticed a Slack thread regarding this incident. Feel free to message me directly on Slack to discuss.

@github-project-automation github-project-automation bot moved this from Has approvals, needs CODEOWNER to Review finalised - Ready to be merged in PR review queue Mar 26, 2025
@Julink-eth Julink-eth dismissed stale reviews from gambinish and darkwing via ff4eeba March 26, 2025 19:05
@metamaskbot
Copy link
Collaborator

Builds ready [ff4eeba]
Page Load Metrics (5173 ± 2914 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint28123800475062112982
domContentLoaded167223682469960622911
load176123810517360682914
domInteractive2963914816680
backgroundConnect251616470456219
firstReactRender2341212612660
getState664819920096
initialActions01000
loadScripts122023201396258922829
setupStore861315718488
uiStartup200124166813466263181
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 766 Bytes (0.01%)
  • common: 322 Bytes (0.00%)

@Julink-eth Julink-eth moved this from Review finalised - Ready to be merged to Has approvals, needs CODEOWNER in PR review queue Mar 26, 2025
@Julink-eth Julink-eth added this pull request to the merge queue Mar 26, 2025
@github-project-automation github-project-automation bot moved this from Has approvals, needs CODEOWNER to Review finalised - Ready to be merged in PR review queue Mar 26, 2025
Merged via the queue into main with commit 939f955 Mar 26, 2025
143 of 144 checks passed
@Julink-eth Julink-eth deleted the add-discover-network-button branch March 26, 2025 22:04
@github-actions github-actions bot locked and limited conversation to collaborators Mar 26, 2025
@metamaskbot metamaskbot added the release-12.16.0 Issue or pull request that will be included in release 12.16.0 label Mar 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-customNetworks area-UI Relating to the user interface. release-12.16.0 Issue or pull request that will be included in release 12.16.0 team-network-enablement
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants