Skip to content

Commit 238a703

Browse files
authored
fix: JIRA-759, 760, 765, 754, 756 cp-13.10.0 (#37848)
<!-- 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? --> In this PR, Updated Transaction Shield UI Bugs. Jira Link: - https://consensyssoftware.atlassian.net/browse/SUBS-759 - https://consensyssoftware.atlassian.net/browse/SUBS-760 - https://consensyssoftware.atlassian.net/browse/SUBS-765 - https://consensyssoftware.atlassian.net/browse/SUBS-754 - https://consensyssoftware.atlassian.net/browse/SUBS-756 Figma Link: - https://www.figma.com/design/HTAO1SrmixV4ppv7qIvLoa/Metamask-Transaction-Shield?node-id=14740-209891&m=dev - https://www.figma.com/design/agblIyQvyxSoqGMjQDAPBK/Transaction-Shield?node-id=277-14&p=f&t=apuyU6XgEuw694p7-0 [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/37722?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: Used feature flag to only show this change when sidepanel flag is enabled for chrome. Updated button on wallet creation successful page from 'Done' to 'Open wallet'. ## **Related issues** Fixes: ## **Manual testing steps** 1. Open extension 2. Create wallet and validate Transaction Shield from settings. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> <img width="382" height="938" alt="Screenshot 2025-11-14 at 3 58 50 PM" src="https://github.com/user-attachments/assets/b709385d-4179-49da-8c85-56d591594761" /> ![Uploading Screenshot 2025-11-14 at 4.45.54 PM.png…]() ## **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 Transaction Shield copy and i18n, improves responsive layouts and theming, replaces the entry modal animation with a static image, and renames the billing action to “Manage billing.” > > - **Frontend UI/Styles**: > - **Shield Entry Modal (`ui/components/app/shield-entry-modal/`)**: Replace animation with static image (`transaction-shield-modal.png`), add responsive title/spacing, full-height body, and new `shield-entry-modal-sheild-image` styles. > - **Settings Layout (`ui/pages/settings/index.scss`)**: On small screens, modules use flex column with scroll; similar adjustments in sidepanel selected view. > - **Transaction Shield Tab (`ui/pages/settings/transaction-shield-tab/`)**: Add light-theme inactive background (`--shield-membership-inactive-light`) with new modifier class; remove forced dark theme; minor styling. > - **Claims Form (`claims-form.tsx`)**: Add padding/margins, keep only section headers (remove descriptive subtext), retain dividers. > - **Shield Plan (`ui/pages/shield-plan/`)**: Tweak plan card padding/gaps and responsive price font; move spacing from props to CSS. > - **Colors (`ui/css/utilities/colors.scss`)**: Add `--shield-membership-inactive-light`. > - **i18n (`app/_locales/en*/messages.json`)**: > - Update copy: `shieldTxDetails1Title` to "Up to $10,000 transaction protection"; billing action to `"Manage billing"`. > - Remove unused: `shieldClaimIncidentDetailsDescription`, `shieldClaimPersonalDetailsDescription`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 1b81792. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 77d5e38 commit 238a703

File tree

12 files changed

+63
-50
lines changed

12 files changed

+63
-50
lines changed

app/_locales/en/messages.json

Lines changed: 2 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/_locales/en_GB/messages.json

Lines changed: 2 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
58.8 KB
Loading

ui/components/app/shield-entry-modal/index.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
.shield-entry-modal__title {
55
line-height: 1em;
66
font-size: 2.25rem;
7+
8+
@include design-system.screen-sm-max {
9+
font-size: 2rem;
10+
margin-top: 16px;
11+
}
712
}
813

914
.shield-entry-modal__content {
@@ -43,4 +48,13 @@
4348
width: 100%;
4449
}
4550
}
51+
52+
&-sheild-image {
53+
width: 346px;
54+
height: 252px;
55+
56+
@include design-system.screen-sm-max {
57+
width: 322px;
58+
}
59+
}
4660
}

ui/components/app/shield-entry-modal/shield-entry-modal.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ import {
4747
} from '../../../../shared/constants/subscriptions';
4848
import {
4949
AlignItems,
50+
BlockSize,
5051
Display,
5152
FlexDirection,
5253
} from '../../../helpers/constants/design-system';
5354
import { TRANSACTION_SHIELD_LINK } from '../../../helpers/constants/common';
5455
import { ThemeType } from '../../../../shared/constants/preferences';
55-
import ShieldIllustrationAnimation from './shield-illustration-animation';
5656

5757
const ShieldEntryModal = ({
5858
skipEventSubmission = false,
@@ -197,6 +197,7 @@ const ShieldEntryModal = ({
197197
flexDirection={FlexDirection.Column}
198198
gap={3}
199199
paddingTop={4}
200+
height={BlockSize.Full}
200201
>
201202
<Text
202203
fontFamily={FontFamily.Hero}
@@ -216,15 +217,11 @@ const ShieldEntryModal = ({
216217
? t('shieldEntryModalSubtitleA', ['$10,000'])
217218
: t('shieldEntryModalSubtitleB', ['$10,000'])}
218219
</Text>
219-
<Box className="grid place-items-center">
220+
<Box className="shield-entry-modal-sheild-image flex-1 flex items-center justify-center">
220221
<img
221-
src="/images/shield-entry-modal-bg.png"
222+
src="/images/transaction-shield-modal.png"
222223
alt="Shield Entry Illustration"
223-
className="col-start-1 row-start-1"
224-
/>
225-
<ShieldIllustrationAnimation
226-
containerClassName="shield-entry-modal-shield-illustration__container col-start-1 row-start-1"
227-
canvasClassName="shield-entry-modal-shield-illustration__canvas"
224+
className="mx-auto h-full w-full object-contain"
228225
/>
229226
</Box>
230227
</ModalBody>

ui/css/utilities/colors.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ Before adding a color here make sure that there isn't a design token available.
2424
--color-network-linea-mainnet-default: #121212;
2525
--color-network-linea-mainnet-inverse: #fcfcfc;
2626
--welcome-bg-light: #fff2eb;
27+
--shield-membership-inactive-light: #dadce5;
2728
}

ui/pages/settings/index.scss

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,9 @@
397397

398398
&__modules {
399399
@include design-system.screen-sm-max {
400-
display: block;
400+
display: flex;
401+
flex-flow: column;
402+
overflow-y: auto;
401403
}
402404
}
403405
}
@@ -547,7 +549,8 @@
547549
}
548550

549551
.settings-page__content__modules {
550-
display: block;
552+
display: flex;
553+
flex-flow: column;
551554
}
552555
}
553556
}

ui/pages/settings/transaction-shield-tab/claims-form/claims-form.tsx

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -386,9 +386,8 @@ const ClaimsForm = ({ isView = false }: { isView?: boolean }) => {
386386

387387
return (
388388
<Box
389-
className="submit-claim-page flex flex-col"
389+
className="submit-claim-page flex flex-col pt-4 px-4 pb-4"
390390
data-testid="submit-claim-page"
391-
padding={4}
392391
gap={4}
393392
>
394393
{!isView && pendingClaims.length > 0 && (
@@ -430,16 +429,9 @@ const ClaimsForm = ({ isView = false }: { isView?: boolean }) => {
430429
</Text>
431430
{/* Personal details */}
432431
<Box>
433-
<Text variant={TextVariant.HeadingSm}>
432+
<Text variant={TextVariant.HeadingSm} className="mb-2">
434433
{t('shieldClaimPersonalDetails')}
435434
</Text>
436-
<Text
437-
variant={TextVariant.BodySm}
438-
color={TextColor.TextAlternative}
439-
className="mb-2"
440-
>
441-
{t('shieldClaimPersonalDetailsDescription')}
442-
</Text>
443435
<Box
444436
borderColor={BoxBorderColor.BorderMuted}
445437
className="w-full h-[1px] border border-b-0"
@@ -495,17 +487,9 @@ const ClaimsForm = ({ isView = false }: { isView?: boolean }) => {
495487
/>
496488
{/* Incident details */}
497489
<Box className="mt-4">
498-
<Text variant={TextVariant.HeadingSm}>
490+
<Text variant={TextVariant.HeadingSm} className="mb-2">
499491
{t('shieldClaimIncidentDetails')}
500492
</Text>
501-
<Text
502-
variant={TextVariant.BodySm}
503-
color={TextColor.TextAlternative}
504-
className="mb-2"
505-
>
506-
{t('shieldClaimIncidentDetailsDescription')}
507-
</Text>
508-
509493
<Box
510494
borderColor={BoxBorderColor.BorderMuted}
511495
className="w-full h-[1px] border border-b-0"

ui/pages/settings/transaction-shield-tab/index.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@
3636
&--inactive {
3737
background-color: var(--color-background-subsection);
3838

39+
&-light {
40+
background-color: var(--shield-membership-inactive-light);
41+
}
42+
3943
.transaction-shield-page__membership-text {
4044
color: var(--color-text-default);
4145
}

ui/pages/settings/transaction-shield-tab/transaction-shield.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
} from '@metamask/subscription-controller';
1313
import { useLocation, useNavigate } from 'react-router-dom-v5-compat';
1414
import { NameType } from '@metamask/name-controller';
15+
import { useSelector } from 'react-redux';
1516
import {
1617
BannerAlert,
1718
BannerAlertSeverity,
@@ -85,6 +86,7 @@ import {
8586
ShieldErrorStateViewEnum,
8687
} from '../../../../shared/constants/subscriptions';
8788
import { ThemeType } from '../../../../shared/constants/preferences';
89+
import { getTheme } from '../../../selectors';
8890
import CancelMembershipModal from './cancel-membership-modal';
8991
import { isCryptoPaymentMethod } from './types';
9092

@@ -104,6 +106,8 @@ const TransactionShield = () => {
104106
}, [search]);
105107

106108
const { formatCurrency } = useFormatters();
109+
const theme = useSelector(getTheme);
110+
const isLightTheme = theme === ThemeType.light;
107111

108112
const {
109113
customerId,
@@ -645,7 +649,6 @@ const TransactionShield = () => {
645649
{membershipErrorBanner}
646650
<Box className="transaction-shield-page__container" marginBottom={4}>
647651
<Box
648-
data-theme={ThemeType.dark}
649652
className={classnames(
650653
'transaction-shield-page__row transaction-shield-page__membership',
651654
{
@@ -655,6 +658,8 @@ const TransactionShield = () => {
655658
isMembershipInactive && !showSkeletonLoader,
656659
'transaction-shield-page__membership--active':
657660
!isMembershipInactive && !showSkeletonLoader,
661+
'transaction-shield-page__membership--inactive-light':
662+
isLightTheme && isMembershipInactive && !showSkeletonLoader,
658663
},
659664
)}
660665
{...rowsStyleProps}

0 commit comments

Comments
 (0)