feat(home): add homepage 8-button action grid AB test#33388
Conversation
Register homeTMCU1103AbtestActionButtonsGrid variants, analytics mapping, and feature-flag registry entry for the 3-arm homepage test.
Add sell/perps/predict/batch_swap/traders action names and positions 0–7 so the homepage 2×4 grid can track taps correctly.
Self-contained 2×4 circular action grid with per-button handlers, MMDS primitives, and skipActionButtonClickTracking on swap nav so home taps keep correct ACTION_BUTTON_CLICKED position.
Swap AssetDetailsActions for HomepageActionButtonsGrid on treatment variants behind the existing onboarding checklist gate.
Add grid unit tests for row order and tap analytics, and Wallet branch coverage for control vs treatment variants.
Use ramp goToBuy instead of FundActionMenu so Buy mirrors Sell as a direct ramp entrypoint from the action buttons grid.
Match Figma Token pill styling with a subtle border-muted ring on the circular HomepageActionButton container.
Introduce allowTwoLineLabel on HomepageActionButton and the grid, defaulting to false so labels stay single-line until toggled on.
Match Figma by showing multiple people instead of a single user icon.
Replace fixed 79px width so four columns share the row evenly and avoid clipping on narrow screens.
Scale down on press and switch the pill from bg-muted to bg-muted-pressed to match MainActionButton interaction cues.
Disable Buy when the account cannot sign, matching FundActionMenu, and expand grid unit tests for all eight button clicks and flag gates.
| navigation.navigate(Routes.BRIDGE.ROOT, { | ||
| screen: Routes.BRIDGE.BATCH_SELL_TOKEN_SELECT, | ||
| params: { | ||
| batchSellLocation: BatchSellMetricsLocation.Unknown, |
There was a problem hiding this comment.
@MetaMask/swaps-engineers I have added this value because the definition is strictly set to the enum. cc @DostoevskysPiano
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Dependent tags per tag descriptions:
The control variant preserves existing behavior (4-button AssetDetailsActions), so regression risk to existing tests is moderate. However, the new grid component introduces new navigation paths that need validation across all affected flows. Performance Test Selection: |
|
⚡ Performance Test Results
✅ All tests passed · 2 tests · 1 device 📱 Devices tested (1)Android: Google Pixel 8 Pro (v14.0) ✅ Passed Tests (2)
Branch: |



Description
Implements TMCU-1103: a 3-arm homepage AB test for the main wallet action-button slot.
Why: Validate whether an 8-button 2×4 circular grid (and which row order) outperforms the current 4 square
AssetDetailsActionsrow for trade entry.What:
homeTMCU1103AbtestActionButtonsGridwith variantscontrol|row1Top|row2Top(33/33/33 cumulative LD JSON thresholds)AssetDetailsActions; treatments render a self-containedHomepageActionButtonsGrid(Buy, Sell, Swap, Send / Perps, Predict, Batch Swap, Traders)Action Button Clickedwith extendedActionButtonType/ActionPosition(0–7); variant viaactive_ab_testsenrichment onHOME_VIEWED+ACTION_BUTTON_CLICKEDLaunchDarkly: Flag
homeTMCU1103AbtestActionButtonsGridis already created.Notes for reviewers / ops:
batchSellLocationfor Batch Swap isUnknownuntil analytics defines a home entrypoint.Changelog
CHANGELOG entry: null
Related issues
Refs: https://consensyssoftware.atlassian.net/browse/TMCU-1103
Manual testing steps
Screenshots/Recordings
Before
N/A — control path unchanged (existing four square buttons).
After
8button_ab_test.mp4
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist