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: new phishing warning UI with metrics #27942

Merged
merged 24 commits into from
Oct 23, 2024

Conversation

AugmentedMode
Copy link
Contributor

@AugmentedMode AugmentedMode commented Oct 17, 2024

Description

This PR introduces the new phishing-warning-page UI in v4.1.0 along with metrics to track when users click on Back to safety which will lead them to the portfolio as well as when they click on proceed anyways to better track False positives

Some notable improvements in the new UI:

  • Improved design, highlighting MetaMask as the reason for keeping you safe
  • Back to safety now relocates to Portfolio, helping drive more eyes to it
  • Highly shareable: Built-in Share to Twitter/X button, which worked really well at Wallet Guard. This page is shown 400k times per month, so we can gain some free social from this!
  • Better track false positives with metametrics on proceed anyways

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Go to a scam website that is found on eth-phishing-detect such as web3-lido.lol and you will see the new phishing page UI!
  2. Once on the new phishing page, you can click on Back to safety which will take you to the portfolio or you can click on proceed anyway which will take you to the scam website and allowlist it.

Screenshots/Recordings

Before

Screenshot 2024-10-17 at 2 29 25 PM

After

Screenshot 2024-10-17 at 2 29 44 PM

Screenshot 2024-10-16 at 12 13 58 PM

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.

@AugmentedMode AugmentedMode requested a review from a team as a code owner October 17, 2024 18:26
@AugmentedMode AugmentedMode marked this pull request as draft October 17, 2024 18:26
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.

Copy link

socket-security bot commented Oct 17, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@metamask/phishing-warning@4.1.0 None 0 1.86 MB metamaskbot

🚮 Removed packages: npm/@metamask/phishing-warning@4.0.0

View full report↗︎

@AugmentedMode AugmentedMode self-assigned this Oct 17, 2024
@AugmentedMode AugmentedMode added the team-product-safety Push issues to Product Safety team label Oct 17, 2024
@AugmentedMode AugmentedMode marked this pull request as ready for review October 17, 2024 20:55
Copy link
Contributor

@mindofmar mindofmar left a comment

Choose a reason for hiding this comment

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

HUGE win!!

@metamaskbot
Copy link
Collaborator

Builds ready [3ccbd18]
Page Load Metrics (2006 ± 67 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint18052410201214871
domContentLoaded17332298197213464
load18032346200613967
domInteractive19103552512
backgroundConnect999363014
firstReactRender482551065024
getState56012126
initialActions01000
loadScripts12651680147011153
setupStore1288352512
uiStartup194330952274286138
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 426 Bytes (0.01%)
  • ui: 0 Bytes (0.00%)
  • common: 59 Bytes (0.00%)

app/scripts/metamask-controller.js Outdated Show resolved Hide resolved
Copy link

@bschorchit bschorchit left a comment

Choose a reason for hiding this comment

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

Love this 🔥

app/scripts/metamask-controller.js Outdated Show resolved Hide resolved
shared/constants/metametrics.ts Outdated Show resolved Hide resolved
@metamaskbot
Copy link
Collaborator

Builds ready [473e201]
Page Load Metrics (2349 ± 332 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint23947002226770370
domContentLoaded166542442267534257
load168250782349692332
domInteractive18144533316
backgroundConnect107997517584
firstReactRender534391338440
getState5317476833
initialActions0452105
loadScripts118931621703438210
setupStore12384537938
uiStartup1873856327761365655
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 432 Bytes (0.01%)
  • ui: 0 Bytes (0.00%)
  • common: 48 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [d82a361]
Page Load Metrics (1956 ± 152 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint154526971952315151
domContentLoaded153426881908301144
load154927021956317152
domInteractive20252594823
backgroundConnect9200505125
firstReactRender463081075225
getState591303014
initialActions01000
loadScripts109420671432261125
setupStore11111282512
uiStartup170530682208410197
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 432 Bytes (0.01%)
  • ui: 0 Bytes (0.00%)
  • common: 48 Bytes (0.00%)

mindofmar
mindofmar previously approved these changes Oct 21, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [ee94373]
Page Load Metrics (1776 ± 126 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint149223461774246118
domContentLoaded148522481734217104
load149324681776262126
domInteractive17230544522
backgroundConnect7295436531
firstReactRender43204853416
getState4186254120
initialActions01000
loadScripts10811812128017986
setupStore11147413316
uiStartup167335892021440211
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 427 Bytes (0.01%)
  • ui: 0 Bytes (0.00%)
  • common: 48 Bytes (0.00%)

@AugmentedMode AugmentedMode added this pull request to the merge queue Oct 23, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [dbde006]
Page Load Metrics (2169 ± 92 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint34825392085445214
domContentLoaded18502517212718187
load18792542216919192
domInteractive279745168
backgroundConnect976362411
firstReactRender892861345426
getState574212010
initialActions01000
loadScripts13321876157715574
setupStore1296422914
uiStartup213629172466232112
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 427 Bytes (0.01%)
  • ui: 0 Bytes (0.00%)
  • common: 48 Bytes (0.00%)

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 23, 2024
@AugmentedMode AugmentedMode added this pull request to the merge queue Oct 23, 2024
Merged via the queue into develop with commit be68e2c Oct 23, 2024
95 checks passed
@AugmentedMode AugmentedMode deleted the feat/new-phishing-warning-ui branch October 23, 2024 16:36
@github-actions github-actions bot locked and limited conversation to collaborators Oct 23, 2024
@metamaskbot metamaskbot added the release-12.7.0 Issue or pull request that will be included in release 12.7.0 label Oct 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.7.0 Issue or pull request that will be included in release 12.7.0 team-product-safety Push issues to Product Safety team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants