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. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Autofix Details
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Out-of-scope Predict snapshot change committed accidentally
- Reverted the unintended Predict snapshot change by restoring fontSize from 18 back to 20 to remove out-of-scope modifications.
Or push these changes by commenting:
@cursor push c40343e421
Preview (c40343e421)
diff --git a/app/components/UI/Predict/components/PredictGameDetailsContent/__snapshots__/PredictGameDetailsContent.test.tsx.snap b/app/components/UI/Predict/components/PredictGameDetailsContent/__snapshots__/PredictGameDetailsContent.test.tsx.snap
--- a/app/components/UI/Predict/components/PredictGameDetailsContent/__snapshots__/PredictGameDetailsContent.test.tsx.snap
+++ b/app/components/UI/Predict/components/PredictGameDetailsContent/__snapshots__/PredictGameDetailsContent.test.tsx.snap
@@ -115,7 +115,7 @@
{
"color": "#131416",
"fontFamily": "Geist-Bold",
- "fontSize": 18,
+ "fontSize": 20,
"fontWeight": 700,
"letterSpacing": 0,
"lineHeight": 24,
...t/components/PredictGameDetailsContent/__snapshots__/PredictGameDetailsContent.test.tsx.snap
Outdated
Show resolved
Hide resolved
578405d to
3d754d6
Compare
| completedStep: { backgroundColor: COMPLETED_COLOR }, | ||
| currentStep: { backgroundColor: CURRENT_COLOR }, | ||
| todoStep: { backgroundColor: TODO_COLOR }, | ||
| completedStep: { backgroundColor: mockCompletedColor }, | ||
| currentStep: { backgroundColor: mockCurrentColor }, | ||
| todoStep: { backgroundColor: mockTodoColor }, |
There was a problem hiding this comment.
for some reason these fail without the mock prefix
yarn jest app/components/UI/Ramp/Deposit/components/DepositProgressBar/DepositProgessBar.test.tsx --updateSnapshot --no-coverage
FAIL app/components/UI/Ramp/Deposit/components/DepositProgressBar/DepositProgessBar.test.tsx
● Test suite failed to run
Note: This is a precaution to guard against uninitialized mock variables. If it is ensured that the mock is required lazily, variable names prefixed with `mock` (case insensitive) are permitted.
13 | container: { flexDirection: 'row', paddingVertical: 12 },
14 | step: { height: 5, flex: 1, borderRadius: 10 },
> 15 | completedStep: { backgroundColor: COMPLETED_COLOR },
| ^^^^^^^^^^^^^^^
16 | currentStep: { backgroundColor: CURRENT_COLOR },
17 | todoStep: { backgroundColor: TODO_COLOR },
18 | stepGap: { marginRight: 10 },
.eslintrc.js
Outdated
| }, | ||
| }, | ||
| { | ||
| files: ['app/components/UI/Ramp/**/*.{js,jsx,ts,tsx}'], |
There was a problem hiding this comment.
Adding a Ramp-specific color-no-hex override keeps enforcement targeted to this migration batch without changing behavior in unrelated folders. This makes lint adoption incremental and easier to bisect if regressions appear.
| }, | ||
| themeAppearance: 'light', | ||
| }; | ||
| let mockCurrentTheme: Theme = mockTheme; |
There was a problem hiding this comment.
Using a mutable mockCurrentTheme lets this test validate keyboardAppearance behavior for both light and dark modes with one consistent style hook mock. That keeps coverage focused on theme-dependent behavior instead of fixture duplication.
| }); | ||
|
|
||
| describe('generateThemeParameters', () => { | ||
| const mockDarkTheme = { |
There was a problem hiding this comment.
This test now anchors light-mode expectations to mockTheme and only swaps dark token colors where needed. It reduces hardcoded palette assumptions while still validating both output modes of generateThemeParameters.
| @@ -1,3 +1,4 @@ | |||
| /* eslint-disable @metamask/design-tokens/color-no-hex -- SVG illustration uses hardcoded brand colors without design token equivalents */ | |||
There was a problem hiding this comment.
This file-level exception is scoped to the SVG illustration so we preserve exact brand artwork colors while still enforcing token usage across the rest of Ramp. The inline rationale helps prevent blanket disables from spreading.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Autofix Details
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: New test name uses prohibited "should" prefix
- Renamed the new test to remove the 'should' prefix per guidelines.
Or push these changes by commenting:
@cursor push 53093bd574
Preview (53093bd574)
diff --git a/app/components/UI/Ramp/Deposit/components/DepositTextField/DepositTextField.test.tsx b/app/components/UI/Ramp/Deposit/components/DepositTextField/DepositTextField.test.tsx
--- a/app/components/UI/Ramp/Deposit/components/DepositTextField/DepositTextField.test.tsx
+++ b/app/components/UI/Ramp/Deposit/components/DepositTextField/DepositTextField.test.tsx
@@ -57,7 +57,7 @@
);
});
- it('should use dark keyboard appearance in dark theme', () => {
+ it('uses dark keyboard appearance in dark theme', () => {
mockCurrentTheme = {
...mockTheme,
themeAppearance: AppThemeKey.dark,
app/components/UI/Ramp/Deposit/components/DepositTextField/DepositTextField.test.tsx
Show resolved
Hide resolved
86cfab5 to
5a5d005
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Autofix Details
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Rewards directory accidentally included in ESLint override
- Removed the Rewards path from the color-no-hex error override to prevent unintended linting of unmigrated Rewards tests.
Or push these changes by commenting:
@cursor push a7f9a53a16
Preview (a7f9a53a16)
diff --git a/.eslintrc.js b/.eslintrc.js
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -122,7 +122,6 @@
'app/components/Snaps/**/*.{js,jsx,ts,tsx}',
'app/components/UI/Predict/**/*.{js,jsx,ts,tsx}',
'app/components/UI/Ramp/**/*.{js,jsx,ts,tsx}',
- 'app/components/UI/Rewards/**/*.{js,jsx,ts,tsx}',
],
rules: {
'@metamask/design-tokens/color-no-hex': 'error',715eaf4 to
7f2bb7e
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Rewards eslint override accidentally removed instead of kept
- Re-added the Rewards glob to the ESLint override alongside Ramp to restore color-no-hex enforcement.
Or push these changes by commenting:
@cursor push 0ee9b31c1c
Preview (0ee9b31c1c)
diff --git a/.eslintrc.js b/.eslintrc.js
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -122,6 +122,7 @@
'app/components/Snaps/**/*.{js,jsx,ts,tsx}',
'app/components/UI/Predict/**/*.{js,jsx,ts,tsx}',
'app/components/UI/Ramp/**/*.{js,jsx,ts,tsx}',
+ 'app/components/UI/Rewards/**/*.{js,jsx,ts,tsx}',
],
rules: {
'@metamask/design-tokens/color-no-hex': 'error',
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Performance Test Selection: |
|




Description
This PR is the Ramp-only split of the
color-no-hexbatch work, extracted from the original umbrella PR #26651.Scope:
app/components/UI/Ramp/**)app/components/UI/Ramp/**/*.{js,jsx,ts,tsx}DepositProgressBartest withmockThemeReference PR: #26651
Changelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
N/A (test/lint/config updates only)
After
N/A (test/lint/config updates only)
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Low risk: changes are limited to ESLint override scope and test-only theme mocks/assertions, with no production logic changes aside from a local lint-disable comment on an SVG component.
Overview
Enables
@metamask/design-tokens/color-no-hexenforcement forapp/components/UI/Ramp/**via an ESLint override, as part of the incremental rollout.Updates multiple Ramp tests to stop using hardcoded hex colors by reusing
util/theme'smockTheme(includingDepositProgressBar,DepositTextField,generateThemeParameters,PaymentMethodSelector,BankDetails, anduseTransakRouting), and adds a targeted file-level lint disable inShapesBackgroundAnimationwhere the SVG uses fixed brand colors without token equivalents.Written by Cursor Bugbot for commit ff93cb5. This will update automatically on new commits. Configure here.