Skip to content

Commit 7a7cc5d

Browse files
authored
chore: Polish Money patterns for visual cohesion (#28712)
<!-- 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** This PR polishes the Money feature so the patterns for Headers, List, Sections, Filtering and Spacing are visually cohesive. ## **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: null ## **Related issues** Fixes: ## **Manual testing steps** ```gherkin Feature: Money account activity and hub layout polish Scenario: User opens Money activity from the Money hub Given the user is logged in with a Money account that can show activity And the user is on the Money hub (home) screen When the user navigates to Money activity (Activity) Then the activity screen loads with the expected header and back affordance And activity is grouped and readable (date sections and list items render without layout overlap) Scenario: User filters Money activity by type Given the user is on the Money activity screen And there is activity data available for more than one filter category When the user changes the activity filter (e.g. All / Deposits / Transfers as applicable) Then the list updates to match the selected filter And section headers and row content remain correctly aligned and legible Scenario: User reviews Money hub summary and quick actions after layout updates Given the user is on the Money hub (home) screen When the user views the balance summary and the primary action buttons row Then balances and labels use the updated typography and spacing (no clipped text or misaligned controls) And primary actions remain tappable with expected labels and icons ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <img width="1462" height="680" alt="Screenshot 2026-04-13 at 4 30 22 PM" src="https://github.com/user-attachments/assets/38255e3a-a6c7-4ada-9a5b-7a0b5406eba0" /> ### **After** <img width="1442" height="643" alt="Screenshot 2026-04-13 at 4 30 37 PM" src="https://github.com/user-attachments/assets/5bf37578-baf5-4b7f-8391-2a9611bb11c1" /> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/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-mobile/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] > **Low Risk** > Low risk visual-only tweaks to layout, spacing, and typography within Money screens; main risk is minor UI regressions like truncation/clipping on edge device sizes. > > **Overview** > Improves visual cohesion across Money hub and activity screens by adjusting padding/spacing, alignment, and typography in headers, section headers, lists, and filter buttons. > > Updates action buttons and activity rows to better handle sizing and truncation (larger icons/avatars, centered/stretch layouts, `min-w-0`/`shrink` Tailwind classes), and lightly refines secondary text weights and button container padding for consistency. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 5ae2126. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 98d0713 commit 7a7cc5d

8 files changed

Lines changed: 41 additions & 34 deletions

File tree

app/components/UI/Money/Views/MoneyActivityView/MoneyActivityView.tsx

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import {
1313
ButtonIcon,
1414
ButtonSize,
1515
ButtonVariant,
16-
FontWeight,
1716
IconName,
1817
Text,
1918
TextColor,
@@ -30,12 +29,6 @@ import { MoneyActivityViewTestIds } from './MoneyActivityView.testIds';
3029

3130
const styles = StyleSheet.create({
3231
safeArea: { flex: 1 },
33-
filterButtonSpacing: {
34-
minWidth: 0,
35-
paddingHorizontal: 16,
36-
paddingVertical: 12,
37-
minHeight: 48,
38-
},
3932
});
4033

4134
interface DateSection {
@@ -134,8 +127,8 @@ const MoneyActivityView = () => {
134127
flexDirection={BoxFlexDirection.Row}
135128
alignItems={BoxAlignItems.Center}
136129
justifyContent={BoxJustifyContent.Start}
137-
paddingHorizontal={1}
138130
paddingVertical={2}
131+
twClassName="px-2"
139132
>
140133
<ButtonIcon
141134
iconName={IconName.ArrowLeft}
@@ -149,7 +142,6 @@ const MoneyActivityView = () => {
149142
<Box paddingHorizontal={4} paddingTop={4} paddingBottom={6}>
150143
<Text
151144
variant={TextVariant.HeadingLg}
152-
fontWeight={FontWeight.Medium}
153145
testID={MoneyActivityViewTestIds.TITLE}
154146
>
155147
{strings('money.activity.title')}
@@ -169,7 +161,7 @@ const MoneyActivityView = () => {
169161
: ButtonVariant.Secondary
170162
}
171163
size={ButtonSize.Md}
172-
style={styles.filterButtonSpacing}
164+
twClassName="min-w-0 shrink"
173165
onPress={() => setFilter(MoneyActivityFilter.All)}
174166
testID={MoneyActivityViewTestIds.FILTER_ALL}
175167
>
@@ -182,7 +174,7 @@ const MoneyActivityView = () => {
182174
: ButtonVariant.Secondary
183175
}
184176
size={ButtonSize.Md}
185-
style={styles.filterButtonSpacing}
177+
twClassName="min-w-0 shrink"
186178
onPress={() => setFilter(MoneyActivityFilter.Deposits)}
187179
testID={MoneyActivityViewTestIds.FILTER_DEPOSITS}
188180
>
@@ -195,7 +187,7 @@ const MoneyActivityView = () => {
195187
: ButtonVariant.Secondary
196188
}
197189
size={ButtonSize.Md}
198-
style={styles.filterButtonSpacing}
190+
twClassName="min-w-0 shrink"
199191
onPress={() => setFilter(MoneyActivityFilter.Transfers)}
200192
testID={MoneyActivityViewTestIds.FILTER_TRANSFERS}
201193
>

app/components/UI/Money/components/MoneyActionButtonRow/MoneyActionButtonRow.tsx

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@ import {
33
Box,
44
BoxAlignItems,
55
BoxFlexDirection,
6+
BoxJustifyContent,
67
ButtonBase,
78
FontWeight,
89
Icon,
10+
IconColor,
911
IconName,
1012
IconSize,
1113
Text,
14+
TextColor,
1215
TextVariant,
1316
} from '@metamask/design-system-react-native';
1417
import { strings } from '../../../../../../locales/i18n';
@@ -32,17 +35,29 @@ const ActionButton = ({
3235
testID: string;
3336
}) => (
3437
<ButtonBase
35-
twClassName="flex-1 rounded-xl bg-muted h-auto px-0 py-3"
38+
twClassName="flex-1 self-stretch h-full min-h-12 rounded-xl bg-muted px-1 py-3"
3639
onPress={onPress}
3740
testID={testID}
3841
>
3942
<Box
4043
flexDirection={BoxFlexDirection.Column}
4144
alignItems={BoxAlignItems.Center}
42-
twClassName="gap-0.5"
45+
justifyContent={BoxJustifyContent.Center}
46+
twClassName="w-full flex-1"
4347
>
44-
<Icon name={iconName} size={IconSize.Md} />
45-
<Text variant={TextVariant.BodySm} fontWeight={FontWeight.Medium}>
48+
<Icon
49+
name={iconName}
50+
size={IconSize.Lg}
51+
color={IconColor.IconAlternative}
52+
/>
53+
<Text
54+
variant={TextVariant.BodySm}
55+
fontWeight={FontWeight.Medium}
56+
color={TextColor.TextDefault}
57+
numberOfLines={1}
58+
ellipsizeMode="tail"
59+
twClassName="mt-0.5 w-full shrink-0 min-w-0 text-center"
60+
>
4661
{label}
4762
</Text>
4863
</Box>
@@ -64,7 +79,7 @@ const MoneyActionButtonRow = ({
6479
return (
6580
<Box
6681
flexDirection={BoxFlexDirection.Row}
67-
alignItems={BoxAlignItems.Center}
82+
alignItems={BoxAlignItems.Stretch}
6883
twClassName="px-4 pt-4 pb-7 gap-2"
6984
testID={MoneyActionButtonRowTestIds.CONTAINER}
7085
>

app/components/UI/Money/components/MoneyActivityItem/MoneyActivityItem.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,15 @@ const MoneyActivityItem = ({
8383
<AvatarToken
8484
name={MUSD_TOKEN.name}
8585
imageSource={MUSD_TOKEN.imageSource}
86-
size={AvatarSize.Md}
86+
size={AvatarSize.Lg}
8787
/>
8888
</BadgeWrapper>
8989
) : (
9090
<Box twClassName="self-center">
9191
<AvatarToken
9292
name={MUSD_TOKEN.name}
9393
imageSource={MUSD_TOKEN.imageSource}
94-
size={AvatarSize.Md}
94+
size={AvatarSize.Lg}
9595
/>
9696
</Box>
9797
)}
@@ -107,7 +107,7 @@ const MoneyActivityItem = ({
107107
{display.description ? (
108108
<Text
109109
variant={TextVariant.BodySm}
110-
fontWeight={FontWeight.Regular}
110+
fontWeight={FontWeight.Medium}
111111
color={TextColor.TextAlternative}
112112
numberOfLines={1}
113113
>
@@ -126,7 +126,7 @@ const MoneyActivityItem = ({
126126
</Text>
127127
<Text
128128
variant={TextVariant.BodySm}
129-
fontWeight={FontWeight.Regular}
129+
fontWeight={FontWeight.Medium}
130130
color={TextColor.TextAlternative}
131131
twClassName="text-right"
132132
>

app/components/UI/Money/components/MoneyActivityList/MoneyActivityList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const MoneyActivityList = ({
5050
/>
5151
))}
5252
{onViewAllPress && (
53-
<Box twClassName="px-3 my-3">
53+
<Box twClassName="px-4 my-3">
5454
<Button
5555
variant={ButtonVariant.Secondary}
5656
isFullWidth

app/components/UI/Money/components/MoneyBalanceSummary/MoneyBalanceSummary.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ const MoneyBalanceSummary = ({ apy }: MoneyBalanceSummaryProps) => (
3232
<Box twClassName="px-4">
3333
<Text
3434
variant={TextVariant.DisplayLg}
35-
fontWeight={FontWeight.Medium}
35+
fontWeight={FontWeight.Bold}
3636
testID={MoneyBalanceSummaryTestIds.BALANCE}
3737
twClassName="mb-1"
3838
>
3939
{HARDCODED_BALANCE}
4040
</Text>
4141
<Text
42-
variant={TextVariant.BodySm}
42+
variant={TextVariant.BodyMd}
4343
fontWeight={FontWeight.Medium}
4444
color={TextColor.SuccessDefault}
4545
testID={MoneyBalanceSummaryTestIds.APY}

app/components/UI/Money/components/MoneyHeader/MoneyHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const MoneyHeader = ({ onBackPress, onMenuPress }: MoneyHeaderProps) => (
2626
flexDirection={BoxFlexDirection.Row}
2727
alignItems={BoxAlignItems.Center}
2828
justifyContent={BoxJustifyContent.Between}
29-
twClassName="px-1 pt-2 pb-5"
29+
twClassName="px-2 pt-2 pb-5"
3030
testID={MoneyHeaderTestIds.CONTAINER}
3131
>
3232
<ButtonIcon

app/components/UI/Money/components/MoneySectionHeader/MoneySectionHeader.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {
44
Box,
55
BoxAlignItems,
66
BoxFlexDirection,
7-
FontWeight,
87
Icon,
98
IconColor,
109
IconName,
@@ -38,7 +37,6 @@ const MoneySectionHeader = ({ title, onPress }: MoneySectionHeaderProps) => {
3837
>
3938
<Text
4039
variant={TextVariant.HeadingMd}
41-
fontWeight={FontWeight.Medium}
4240
testID={MoneySectionHeaderTestIds.TITLE}
4341
>
4442
{title}

app/components/UI/Money/components/MoneyWhyMetaMaskMoney/MoneyWhyMetaMaskMoney.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,16 @@ interface MoneyWhyMetaMaskMoneyProps {
2727
const BenefitRow = ({ children }: { children: React.ReactNode }) => (
2828
<Box
2929
flexDirection={BoxFlexDirection.Row}
30-
alignItems={BoxAlignItems.Center}
31-
twClassName="gap-2"
30+
alignItems={BoxAlignItems.Start}
31+
twClassName="gap-3"
3232
>
33-
<Icon
34-
name={IconName.Check}
35-
size={IconSize.Sm}
36-
color={IconColor.SuccessDefault}
37-
/>
33+
<Box twClassName="shrink-0 pt-1">
34+
<Icon
35+
name={IconName.Check}
36+
size={IconSize.Sm}
37+
color={IconColor.SuccessDefault}
38+
/>
39+
</Box>
3840
<Box twClassName="flex-1">{children}</Box>
3941
</Box>
4042
);

0 commit comments

Comments
 (0)