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(3765): Add modal to include metric id before redirecting to support page #30415

Merged
merged 7 commits into from
Feb 24, 2025

Conversation

DDDDDanica
Copy link
Contributor

@DDDDDanica DDDDDanica commented Feb 19, 2025

Description

We currently redirect users to this url when they reach out to support: https://support.metamask.io/

We should update Extension client in order to redirect users to this url when they reach out to support: https://support.metamask.io/?metamask_version=11.16.12&metamask_profile_id=d9b2d63d-a233-4d4d-bd4b-5b3d5a6e2c5d&metamask_metametrics_id=f3b9c1d2-4a5e-4b6f-9e2d-8c4f7a1b3c6d

Passing MetaMask Identifier and the version of the app to support can help facilitate debugging on our side.

This PR added 2 entry points for this feature:

  • settings page
  • when page crushes and lead to error page

Open in GitHub Codespaces

Related issues

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/3765

Manual testing steps

  1. Go to settings => about => visit our support center
  2. Choose confirm or don't share to proceed
  3. Confirm with lead to MM support site with URL including version, metametricsId, profileId
  4. Don't share will lead to https://support.metamask.io/
  5. Go to developer options => trigger a page crash
  6. Click contact support
  7. The behavior is the same as above

Screenshots/Recordings

Before

After

https://www.loom.com/share/9a45da1640104488abb2c7b7000dbdc9?sid=069eee12-f244-44b6-8947-c213208570364

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.

@DDDDDanica DDDDDanica added the team-extension-platform Extension Platform team label Feb 19, 2025
@DDDDDanica DDDDDanica self-assigned this Feb 19, 2025
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.

};

export const DefaultStory = () => (
<VisitSupportDataConsentModal
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screenshot 2025-02-19 at 00 21 23 Screenshot 2025-02-19 at 00 21 29

@DDDDDanica DDDDDanica force-pushed the feature/3765-support-modal branch from 77c1d55 to ed2bb2f Compare February 19, 2025 01:12
@metamaskbot
Copy link
Collaborator

Builds ready [ed2bb2f]
Page Load Metrics (1670 ± 48 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint14771876167410651
domContentLoaded1464180816449847
load14791857167010048
domInteractive2383422010
backgroundConnect86730199
firstReactRender1392422713
getState48613189
initialActions01000
loadScripts1027133011878541
setupStore76015178
uiStartup17102320192914871
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 5.07 KiB (0.07%)
  • common: 396 Bytes (0.00%)

@DDDDDanica DDDDDanica force-pushed the feature/3765-support-modal branch from ed2bb2f to a9f2ac2 Compare February 19, 2025 12:05
@metamaskbot
Copy link
Collaborator

Builds ready [a9f2ac2]
Page Load Metrics (1747 ± 147 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint26518271389522251
domContentLoaded146328691727305146
load147328881747307147
domInteractive2392432412
backgroundConnect87222189
firstReactRender1479372412
getState46314168
initialActions041294
loadScripts99422331273255123
setupStore715921
uiStartup166231542009346166
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 4.92 KiB (0.06%)
  • common: 396 Bytes (0.00%)

@DDDDDanica DDDDDanica force-pushed the feature/3765-support-modal branch from a9f2ac2 to cfdf344 Compare February 19, 2025 12:47
@metamaskbot
Copy link
Collaborator

Builds ready [cfdf344]
Page Load Metrics (1759 ± 99 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint36920491675358172
domContentLoaded14012137173720498
load14092148175920699
domInteractive2384432010
backgroundConnect106627188
firstReactRender1371362311
getState469192110
initialActions01000
loadScripts9791593126617283
setupStore75414136
uiStartup161924872009238114
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 4.92 KiB (0.06%)
  • common: 396 Bytes (0.00%)

@DDDDDanica DDDDDanica marked this pull request as ready for review February 19, 2025 13:24
@DDDDDanica DDDDDanica force-pushed the feature/3765-support-modal branch from cfdf344 to 52a76bb Compare February 19, 2025 13:34
@metamaskbot
Copy link
Collaborator

Builds ready [52a76bb]
Page Load Metrics (1715 ± 110 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint146924031717228109
domContentLoaded145723611691223107
load146824001715228110
domInteractive257836147
backgroundConnect117129189
firstReactRender1480362412
getState45910126
initialActions01000
loadScripts10371798123419192
setupStore76717199
uiStartup170227321978255123
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 4.89 KiB (0.06%)
  • common: 396 Bytes (0.00%)

@DDDDDanica DDDDDanica force-pushed the feature/3765-support-modal branch from 52a76bb to 6f25c62 Compare February 19, 2025 16:51
@metamaskbot
Copy link
Collaborator

Builds ready [6f25c62]
Page Load Metrics (2144 ± 138 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint25829871812774371
domContentLoaded182529742117285137
load184530352144288138
domInteractive27187604521
backgroundConnect987302412
firstReactRender1696432612
getState669252010
initialActions00000
loadScripts130421251555211102
setupStore96220178
uiStartup217834462519341163
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 4.89 KiB (0.06%)
  • common: 396 Bytes (0.00%)

@DDDDDanica DDDDDanica force-pushed the feature/3765-support-modal branch from 6f25c62 to e24341c Compare February 19, 2025 17:31
@metamaskbot
Copy link
Collaborator

Builds ready [e24341c]
Page Load Metrics (1810 ± 69 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint15312043181015172
domContentLoaded15181990177614469
load15312008181014569
domInteractive20118412512
backgroundConnect116531189
firstReactRender1573302110
getState55518178
initialActions01000
loadScripts10561551130913967
setupStore85818178
uiStartup17832710208320598
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 4.89 KiB (0.06%)
  • common: 396 Bytes (0.00%)

@DDDDDanica DDDDDanica force-pushed the feature/3765-support-modal branch from e24341c to a83dc21 Compare February 19, 2025 20:40
@metamaskbot
Copy link
Collaborator

Builds ready [a83dc21]
Page Load Metrics (1749 ± 60 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint29820481685344165
domContentLoaded15551971172511957
load15671984174912560
domInteractive25108442411
backgroundConnect978282010
firstReactRender1492362613
getState56011126
initialActions01000
loadScripts10711501124511756
setupStore792262613
uiStartup179127622045232112
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 4.89 KiB (0.06%)
  • common: 396 Bytes (0.00%)


export const DefaultStory = () => (
<VisitSupportDataConsentModal
version="1.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

this line is not necessary because we're reading from the env var inside the component

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch ! 🕵🏻‍♂️ 915721b

category: MetaMetricsEventCategory.Settings,
event: MetaMetricsEventName.SupportLinkClicked,
properties: {
url: supportLinkWithUserId,
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we could make this data more useful / easier to parse on the dashboards. We could pass the version directly as a property for example, for statistics.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for suggestions, passed in as param now 915721b

Copy link
Contributor

Choose a reason for hiding this comment

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

I meant something like

// ...
properties: {
  url: supportLinkWithUserId,
  version
}

so PMs can see which versions redirected the most to the support page

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh the properties was defined before in this event, i didn't modify the logic, i'm worried it could cause inconsistency of previous events and the new ones.

Copy link
Contributor

Choose a reason for hiding this comment

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

fair point, let's leave it as is then

@metamaskbot
Copy link
Collaborator

Builds ready [d603064]
Page Load Metrics (1690 ± 54 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint14721981169211354
domContentLoaded14601903167110550
load14741980169011254
domInteractive238139178
backgroundConnect106422178
firstReactRender1394402914
getState56211157
initialActions00000
loadScripts1047141111969546
setupStore85315157
uiStartup16302718193420799
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 5.07 KiB (0.07%)
  • common: 396 Bytes (0.00%)

Copy link
Contributor

@pedronfigueiredo pedronfigueiredo left a comment

Choose a reason for hiding this comment

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

LGTM

@DDDDDanica DDDDDanica force-pushed the feature/3765-support-modal branch from f274bae to 31b2ba4 Compare February 21, 2025 21:17
@metamaskbot
Copy link
Collaborator

Builds ready [cfea884]
Page Load Metrics (1463 ± 50 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint13451725145710450
domContentLoaded13051704143110450
load13551732146310350
domInteractive237836199
backgroundConnect87030189
firstReactRender1374302411
getState46112147
initialActions01000
loadScripts946131310548742
setupStore573162110
uiStartup15421927166610651
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 5.07 KiB (0.07%)
  • common: 396 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [460da69]
Page Load Metrics (1440 ± 49 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint25016911385281135
domContentLoaded12901674141110249
load13191690144010249
domInteractive22169453617
backgroundConnect116633188
firstReactRender1375322411
getState665192110
initialActions01000
loadScripts925126910499847
setupStore69810
uiStartup14891946163711656
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 5.07 KiB (0.07%)
  • common: 396 Bytes (0.00%)

Copy link
Contributor

@itsyoboieltr itsyoboieltr left a comment

Choose a reason for hiding this comment

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

LGTM! thanks for fixing the issue I mentioned

@DDDDDanica DDDDDanica added this pull request to the merge queue Feb 24, 2025
Merged via the queue into main with commit 4ec2d26 Feb 24, 2025
79 checks passed
@DDDDDanica DDDDDanica deleted the feature/3765-support-modal branch February 24, 2025 16:40
@github-actions github-actions bot locked and limited conversation to collaborators Feb 24, 2025
@metamaskbot metamaskbot added the release-12.14.0 Issue or pull request that will be included in release 12.14.0 label Feb 24, 2025
@DDDDDanica
Copy link
Contributor Author

@itsyoboieltr thank for spotting as well 🕵🏻‍♂️ !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.14.0 Issue or pull request that will be included in release 12.14.0 team-extension-platform Extension Platform team
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants