Skip to content

fix(pure-black): Network pill and enabled-network list styling#33143

Open
georgewrmarshall wants to merge 2 commits into
mainfrom
cursor/pure-black-network-selector-bg-muted-d768
Open

fix(pure-black): Network pill and enabled-network list styling#33143
georgewrmarshall wants to merge 2 commits into
mainfrom
cursor/pure-black-network-selector-bg-muted-d768

Conversation

@georgewrmarshall

@georgewrmarshall georgewrmarshall commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes Pure Black theming for the onboarding General network pill and the global Select a network enabled list (TMCU-1078).

PickerNetwork pill: PickerNetwork now defaults to background.muted instead of background.alternative so the "Choose your network" pill stays visible on Pure Black sheets. This is a component-level default (not feature-flag gated); callers can still override via style.

Enabled network list rows: In NetworkSelector, RPC rows that render a custom JSX title (with the "No network fee" tag) had collapsed to zero width inside CellSelectWithMenu, so network names were invisible while icons and tags still showed. The title row now stretches to full width and uses safer flex shrink/grow. ListItemMultiSelectButton also stops painting background.default on every idle row; only the selected row keeps background.muted, matching the transparent-idle ListItemSelect pattern from #33127.

Scope: PickerNetwork, NetworkSelector, and ListItemMultiSelectButton (all CellSelectWithMenu consumers inherit the idle-row change). Import NFT NetworkListBottomSheet is unchanged (#33131).

Changelog

CHANGELOG entry: Fixed Pure Black styling for the network selector pill and enabled network list rows

Related issues

Fixes: TMCU-1078

Refs: TMCU-622 (Pure Black epic)

Related: PR #33127 (ListItemSelect transparent idle rows), PR #33131 (Import NFT network sheet)

Manual testing steps

Feature: Pure Black network pill and enabled network list

  Scenario: muted pill on onboarding General screen
    Given MM_PURE_BLACK_PREVIEW="true" and the app in Dark mode
    When I open onboarding default settings → General (or wallet empty-state → Show tokens without balance)
    Then the "Choose your network" pill shows a muted background
    And tapping it opens the Select a network sheet

  Scenario: enabled network names are visible in the sheet
    Given MM_PURE_BLACK_PREVIEW="true" and the app in Dark mode
    When I open Select a network from General or the wallet network control
    Then every row under Enabled networks shows its network name (not just icons)
    And unselected rows do not show an extra default background patch
    And the selected row still shows muted selection feedback

  Scenario: non-Pure-Black themes remain unchanged
    Given the app is in Light or standard Dark mode (preview flag off)
    When I open General and Select a network
    Then the pill and list rows match previous behavior (no regression)

Screenshots/Recordings

Before

Simulator.Screen.Recording.-.iPhone.17.Pro.Max.-.2026-07-10.at.15.55.25.mov

After

Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-07-10.at.15.54.30.mov

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
  • I've tested with a power user scenario
  • I've instrumented key operations with Sentry traces for production performance metrics

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.

Slack Thread

Open in Web Open in Cursor 

@mm-token-exchange-service mm-token-exchange-service Bot added the team-design-system All issues relating to design system in Mobile label Jul 10, 2026
Set PickerNetwork default background to background.muted instead of
alternative so the first-screen network selector matches the elevated
surface spec (TMCU-1078) across themes without per-caller overrides.

Co-authored-by: Cursor <cursoragent@cursor.com>
@georgewrmarshall georgewrmarshall force-pushed the cursor/pure-black-network-selector-bg-muted-d768 branch from 5644917 to e1bed84 Compare July 10, 2026 22:47
@github-actions github-actions Bot added size-XS and removed size-S labels Jul 10, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Pure Black gating missing
    • Added Pure Black dark-mode gating so PickerNetwork uses background.muted only when the preview flag is on and theme is dark, otherwise background.alternative.

Create PR

Or push these changes by commenting:

@cursor push 817d2259fd
Preview (817d2259fd)
diff --git a/app/component-library/components/Pickers/PickerNetwork/PickerNetwork.styles.ts b/app/component-library/components/Pickers/PickerNetwork/PickerNetwork.styles.ts
--- a/app/component-library/components/Pickers/PickerNetwork/PickerNetwork.styles.ts
+++ b/app/component-library/components/Pickers/PickerNetwork/PickerNetwork.styles.ts
@@ -2,7 +2,8 @@
 import { StyleSheet, ViewStyle } from 'react-native';
 
 // External dependencies.
-import { Theme } from '../../../../util/theme/models';
+import { AppThemeKey, Theme } from '../../../../util/theme/models';
+import { isPureBlackEnabled } from '../../../../util/theme/themeUtils';
 
 // Internal dependencies.
 import { PickerNetworkStyleSheetVars } from './PickerNetwork.types';
@@ -31,7 +32,11 @@
         paddingHorizontal: 8,
         flexDirection: 'row',
         alignItems: 'center',
-        backgroundColor: colors.background.muted,
+        // Use muted background ONLY for Pure Black dark mode, otherwise keep previous alternative background
+        backgroundColor:
+          isPureBlackEnabled && theme.themeAppearance === AppThemeKey.dark
+            ? colors.background.muted
+            : colors.background.alternative,
         alignSelf: 'center',
       } as ViewStyle,
       style,

You can send follow-ups to the cloud agent here.

Reviewed by Cursor Bugbot for commit e1bed84. Configure here.

Custom RPC row titles collapsed to zero width inside CellSelectWithMenu,
and ListItemMultiSelectButton painted background.default on every idle row.
Stretch the title row, fix flex shrink, and only apply muted fill when selected.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
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.

@georgewrmarshall georgewrmarshall marked this pull request as ready for review July 10, 2026 22:56
@georgewrmarshall georgewrmarshall requested review from a team as code owners July 10, 2026 22:56
@georgewrmarshall georgewrmarshall self-assigned this Jul 10, 2026
@github-actions github-actions Bot added size-S and removed size-XS labels Jul 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeNetworkAbstractions
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 88%
click to see 🤖 AI reasoning details

E2E Test Selection:
All 4 changed files are purely styling/layout changes:

  1. ListItemMultiSelectButton.styles.ts: Removes backgroundColor: theme.colors.background.default from the container style — a visual fix to allow the background to be inherited from the parent.
  2. PickerNetwork.styles.ts: Changes backgroundColor from colors.background.alternative to colors.background.muted — a color token adjustment for the network picker pill.
  3. NetworkSelector.styles.ts: Changes flex: 1 to flexGrow: 1 + flexShrink: 1 — a layout fix for network name text truncation.
  4. NetworkSelector.tsx: Removes a wrapping <View> around a <Box> component and adds w-full self-stretch Tailwind classes — a layout restructuring to fix alignment/sizing of the network name + "No network fee" tag row.

These changes affect the visual rendering of the NetworkSelector (network management UI), PickerNetwork (network picker pill), and ListItemMultiSelectButton (used in multi-select network lists). No functional logic, state management, navigation, or data flows are changed.

SmokeNetworkAbstractions is selected because it directly tests the Network Manager UI, network selector bottom sheet, and network selection flows — exactly the components modified here. No other tags are warranted since the changes are isolated to styling of network-related UI components with no impact on confirmations, accounts, swaps, browser, snaps, or other flows.

Performance Test Selection:
All changes are purely CSS/styling adjustments (background colors, flex layout properties, removal of a wrapping View). These have no impact on app performance metrics such as render times, data fetching, or computational load. No performance tests are warranted.

View GitHub Actions results

@github-actions github-actions Bot added the risk:medium AI analysis: medium risk label Jul 10, 2026
flexDirection: 'row',
alignItems: 'center',
backgroundColor: colors.background.alternative,
backgroundColor: colors.background.muted,

@georgewrmarshall georgewrmarshall Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The network pill uses background.muted as the default fill instead of alternative

container: Object.assign(
{
backgroundColor: theme.colors.background.default,
flexDirection: 'row',

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Idle rows no longer paint background.default on every CellSelectWithMenu row. Selected state still uses background.muted; unselected rows inherit the sheet surface, matching the ListItemSelect transparent-idle pattern from #33127.

variant={TextVariant.BodyMD}
numberOfLines={1}
style={styles.networkNameText}
<Box twClassName="w-full flex-row gap-2 items-center self-stretch">

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Custom JSX titles for RPC rows with the No network fee tag must span the full cellBaseInfo width. Without w-full and self-stretch the nested Text with flex collapsed to zero width, which is why enabled-network names disappeared while icons and tags still rendered.

},
networkNameText: {
flex: 1,
flexGrow: 1,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

flexGrow and flexShrink with minWidth 0 let the label ellipsize beside the tag instead of flex:1 fighting an auto-sized parent. Pair this with the stretched Box in the title JSX when reviewing row truncation.

@georgewrmarshall georgewrmarshall changed the title fix(pure-black): Use muted background for first-screen Network selector fix(pure-black): Network pill and enabled-network list styling Jul 10, 2026
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:medium AI analysis: medium risk size-S team-design-system All issues relating to design system in Mobile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants