perf(accessibility): fix iOS accessibility in Predict components and …#29122
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. |
715b17f to
9e4e916
Compare
9e4e916 to
aba8226
Compare
aba8226 to
9e4e916
Compare
…Homepage section - PredictMarketRowItem, PredictMarketCard, PredictPositionRow, PredictActivity: Pressable → TouchableOpacity - PredictMarketDetails (and sub-components): fix view nesting for iOS XCUITest element lookup - PredictDetailsChart, TimeframeSelector: align accessibility props - PredictionsSection (Homepage): remove redundant Box wrappers, –1 native node Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The accessibility patch removed hasClaimablePositions and hasAnyPositions, causing the section to skip rendering HomepagePredictPositions (and its claim button) when positions.length === 0 but totalClaimableValue > 0. Restore: - hasClaimablePositions / hasAnyPositions variables - isLoadingClaimable in isLoading guard - showTrendingAbove branch when claimable-only and markets exist - showHeader prop on HomepagePredictPositions for the carousel case - Corrected isEmpty / itemCount / willRender in PositionsOnly variant Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
9e4e916 to
613a795
Compare
…unts During the rebase conflict resolution, --theirs took our flattened Pressable/w-1/3 version instead of origin/main's TabsBar refactor. The hardcoded w-1/3 width breaks layouts with fewer than 3 tabs. Restore origin/main's TabsBar implementation which handles 1, 2, or 3 tabs correctly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The PnL row was originally grouped with the section header inside a showHeader conditional. After extracting the header into its own guard, the PnL row was left ungated and would render even when showHeader=false (i.e. when the trending carousel is shown above positions). Restore the original behaviour by adding showHeader to the PnL condition. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ctions Remove inner Box wrapper grouping SectionHeader and UnrealizedPnL row, making both elements direct children of the outer Box. This reduces DOM nesting, improves Appium accessibility, and aligns visual spacing between Perps and Predictions sections. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
recording.webm |
andrepimenta
left a comment
There was a problem hiding this comment.
Approving for mobile platform files
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: SmokePredictions: Directly required. Multiple Predict UI components were refactored:
SmokeWalletPlatform: Required per SmokePredictions tag description - Predictions is a section inside the Trending tab, and changes to Predictions views affect Trending. Also PerpsSection changes affect Trending. SmokeConfirmations: Required per SmokePredictions tag description - opening/closing positions are on-chain transactions that go through confirmations. SmokePerps: bitrise.yml: Only a version number bump (4532 → 4823), no functional CI change that would require additional test tags. ios/MetaMask.xcodeproj: Version-related iOS project file change, no functional impact on E2E tests. Performance Test Selection: |
|



…Homepage section
Description
Changelog
CHANGELOG entry:
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
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
Note
Low Risk
Primarily refactors layout/styling and view nesting to improve iOS accessibility/XCUITest element lookup, with minor navigation and rendering-guard tweaks; functional risk is low but UI regressions are possible.
Overview
Improves Predict and Homepage Predictions iOS accessibility/test reliability by simplifying view hierarchies and reducing unnecessary wrapper nodes (e.g., switching several layouts to direct
TouchableOpacitystyling, removing extraBox/Viewnesting, and returningnullinstead of empty containers).Adjusts Predict Market Details header/actions composition (padding moved into components; actions now self-wrap with bottom border/padding) and fixes a wallet back-navigation target. Adds a new Predict E2E selector prefix (
TRENDING_MARKET_CARD) and extendsPredictionsSectiontests to ensure the header and unrealized PnL row aren’t duplicated/shown when the trending carousel renders above positions.Bumps build/version numbers in
bitrise.ymland the iOS Xcode project (CURRENT_PROJECT_VERSIONto4823).Reviewed by Cursor Bugbot for commit 6aa6fca. Bugbot is set up for automated code reviews on this repo. Configure here.