-
Notifications
You must be signed in to change notification settings - Fork 5.4k
chore: update Shield copywriting and error msgs cp-13.10.0 #37829
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
Conversation
|
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. |
Builds ready [9268760]
UI Startup Metrics (1239 ± 97 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [6e37825]
UI Startup Metrics (1225 ± 87 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
✨ Files requiring CODEOWNER review ✨✅ @MetaMask/confirmations (2 files, +3 -1)
🔐 @MetaMask/web3auth (2 files, +170 -68)
|
Builds ready [b850534]
UI Startup Metrics (1205 ± 104 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚀 Bundle size reduced!]
|
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> [](https://codespaces.new/MetaMask/metamask-extension/pull/37833?quickstart=1) ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** https://github.com/user-attachments/assets/34016a2e-3938-4fd1-ae4d-357193434bea <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Updates Shield plan note text and increases displayed savings from 16% to 17% across en and en_GB locales. > > - **Localization (i18n)**: > - **Transaction Shield plan copy**: > - Update `shieldPlanCryptoMonthlyNote` message to "Total monthly fees pre-approved for a year". > - Change `shieldPlanSave` from `Save 16%` to `Save 17%`. > - Affected files: `app/_locales/en/messages.json`, `app/_locales/en_GB/messages.json`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit bb797c3. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
…' into fix/confirmation-shield-messages
Builds ready [5fd017b]
UI Startup Metrics (1234 ± 107 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚀 Bundle size reduced!]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Incomplete Subscription Restart Metrics
The removal of ShieldMembershipRestartRequest event tracking from trackSubscriptionRequestEvent causes metrics loss. Previously, this event was tracked for any subscription request when subscription_state !== 'none' (renewals, resubscriptions after expiration, payment method changes). Now it only tracks in useUnCancelSubscription, missing renewal scenarios that go through startSubscriptionWithCard or crypto approval flows. This breaks metrics tracking for subscription restart scenarios beyond explicit uncancellation.
app/scripts/services/subscription/subscription-service.ts#L235-L255
metamask-extension/app/scripts/services/subscription/subscription-service.ts
Lines 235 to 255 in ce9a662
| } = appStateControllerState; | |
| const accountTypeAndCategory = this.#getAccountTypeAndCategoryForMetrics(); | |
| const trackingProps = getSubscriptionRequestTrackingProps( | |
| subscriptionControllerState, | |
| defaultSubscriptionPaymentOptions, | |
| shieldSubscriptionMetricsProps, | |
| transactionMeta, | |
| ); | |
| this.#messenger.call('MetaMetricsController:trackEvent', { | |
| event: MetaMetricsEventName.ShieldSubscriptionRequest, | |
| category: MetaMetricsEventCategory.Shield, | |
| properties: { | |
| ...accountTypeAndCategory, | |
| ...trackingProps, | |
| ...extrasProps, | |
| status: requestStatus, | |
| }, | |
| }); |
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> [](https://codespaces.new/MetaMask/metamask-extension/pull/37835?quickstart=1) ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Updates Transaction Shield English localizations to use “plan” terminology and clarifies monthly authorization/billing tooltip in both `en` and `en_GB`. > > - **Localization (en, en_GB)** > - Terminology: Replace "membership" with "plan" across Transaction Shield strings (e.g., `shieldConfirmMembership`, `shieldTxMembershipActive`, `shieldTxMembershipCancel`, `shieldTxMembershipRenew`, `shieldTxMembershipId`). > - Notifications/Status: Update payment failure/paused/cancellation copy (e.g., `pushNotificationShieldSubscriptionPaymentFailedDescriptionShort`, `shieldCoverageAlertMessagePaused`, `shieldTxMembershipErrorPaused`, `shieldTxMembershipCancelNotification`). > - Timing: Change ending text to "Plan ends on $1" (`shieldCoverageEndingDescription`). > - Billing Tooltip: Clarify monthly authorization text (`shieldEstimatedChangesMonthlyTooltipText`: "Authorize $1/month for 12 months ($2 total)"). > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit d4012c9. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> - Correct subscription paused toast and shield settings error message. - Handle unexpected error message contact support action. Figma: https://www.figma.com/design/HTAO1SrmixV4ppv7qIvLoa/Metamask-Transaction-Shield?node-id=14631-57069&p=f&t=AcoJzS3JF4yuRexs-0 [](https://codespaces.new/MetaMask/metamask-extension/pull/37836?quickstart=1) ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: correct subscription error message in toast and settings screen ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] 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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Updates Shield paused/payment error UX: new localized messages, context-aware toast and settings actions for card/crypto/unexpected errors, and a support contact handler with user context. > > - **UI/UX (Transaction Shield)**: > - **Paused Toast**: Switches to `shieldPaymentPaused` with dynamic description/action based on payment method (`card`, `crypto`, `unexpected`). > - **Settings Page** (`transaction-shield.tsx`): > - Context-aware error banner/tooltips and CTA labels for paused states (card/crypto/unexpected) and ending-soon renewal. > - Handles crypto-specific flows (add funds, approval tx) and card update; opens support on unexpected errors. > - Minor API tweaks (use `useUnCancelSubscription(current)`; refine payment method rendering). > - **Hooks**: > - Adds `useHandleSubscriptionSupportAction()` to open support with appended `metamask_version`, profile, MetaMetrics, and Shield customer IDs. > - **Localization** (`app/_locales/en`, `en_GB`): > - Adds new `shieldPaymentPaused*` and detailed `shieldTxMembershipErrorPaused*` keys; updates renewal/insufficient funds copy; removes deprecated `shieldPaymentDeclined` text. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit b6f6e8f. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
ui/pages/settings/transaction-shield-tab/transaction-shield.tsx
Outdated
Show resolved
Hide resolved
Builds ready [707560a]
UI Startup Metrics (1213 ± 101 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
…' into fix/confirmation-shield-messages
ui/pages/settings/transaction-shield-tab/transaction-shield.tsx
Outdated
Show resolved
Hide resolved
… shield transaction is dispatched
Builds ready [625db35]
UI Startup Metrics (1281 ± 89 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚀 Bundle size reduced!]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Missing Analytics for Shield Subscription Restarts
The ShieldMembershipRestartRequest metrics event is no longer tracked when a subscription renewal occurs. The tracking logic was removed from trackSubscriptionRequestEvent but the new captureShieldSubscriptionRestartRequestEvent hook added in useSubscriptionMetrics.ts is never called from the subscription service, resulting in missing analytics data for subscription restart requests.
app/scripts/services/subscription/subscription-service.ts#L235-L255
metamask-extension/app/scripts/services/subscription/subscription-service.ts
Lines 235 to 255 in 33dc9c2
| } = appStateControllerState; | |
| const accountTypeAndCategory = this.#getAccountTypeAndCategoryForMetrics(); | |
| const trackingProps = getSubscriptionRequestTrackingProps( | |
| subscriptionControllerState, | |
| defaultSubscriptionPaymentOptions, | |
| shieldSubscriptionMetricsProps, | |
| transactionMeta, | |
| ); | |
| this.#messenger.call('MetaMetricsController:trackEvent', { | |
| event: MetaMetricsEventName.ShieldSubscriptionRequest, | |
| category: MetaMetricsEventCategory.Shield, | |
| properties: { | |
| ...accountTypeAndCategory, | |
| ...trackingProps, | |
| ...extrasProps, | |
| status: requestStatus, | |
| }, | |
| }); |
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> Add params handle to shield deep link for `link.metamask.io/shield?showShieldEntryModal=true` which show shield entry modal in settings screen if user not subscribed yet [](https://codespaces.new/MetaMask/metamask-extension/pull/37846?quickstart=1) ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: add shield deep link `showShieldEntryModal` param handle ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] 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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Adds `/shield?showShieldEntryModal=true` deep link that routes to Settings and either opens the Shield entry modal or navigates to the Shield page if subscribed. > > - **Deep links** > - Add `SHIELD_QUERY_PARAMS.showShieldEntryModal` and handle in `shared/lib/deep-links/routes/shield.ts`. > - When `showShieldEntryModal=true`, redirect to `SETTINGS_ROUTE` with original query; otherwise go to `SHIELD_PLAN_ROUTE`. > - Export `SETTINGS_ROUTE` from `shared/lib/deep-links/routes/route.ts`. > - **Settings page** > - Parse `showShieldEntryModal` from URL in `settings.container.js` and pass `shouldShowShieldEntryModal` prop. > - In `settings.component.js` `componentDidMount`, if `shouldShowShieldEntryModal`: > - If `hasSubscribedToShield`, navigate to `TRANSACTION_SHIELD_ROUTE`. > - Else, show `ShieldEntryModal`. > - Add `shouldShowShieldEntryModal` to PropTypes. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 519b088. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
|
@metamaskbot build |
Builds ready [8069be4]
UI Startup Metrics (1124 ± 84 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
This PR updates
Changelog
CHANGELOG entry: update Shield confirmation msgs
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Updates Shield copy and paused-state UX, refactors metrics with common props and new restart tracking, adds deep link to show entry modal, classifies approve tx, and enables the Shield feature flag.
getShieldCommonTrackingProps; update all Shield capture hooks to use it.ShieldErrorStateClickedwithShieldMembershipErrorStateClickedand adjust event emissions.captureShieldSubscriptionRestartRequestEvent).SHIELD_QUERY_PARAMS.showShieldEntryModal; when true, route toSETTINGS_ROUTEand show entry modal or redirect to Shield tab if subscribed.SETTINGS_ROUTEvia deep-links.TransactionType.shieldSubscriptionApprovein metrics.METAMASK_SHIELD_ENABLED: 'true'in config.color={TextColor.textAlternative}for billing label; small refactors/imports.Written by Cursor Bugbot for commit 8069be4. This will update automatically on new commits. Configure here.