Conversation
Switching between outcome-group chips (game lines / exact score / halftime) made the screen jump down and the price chart bleed over the outcomes list. Two independent causes: - PredictGameDetailsContent fired an imperative scrollTo on every chip selection (plus a follow-up InteractionManager pass) to pin the sticky header to the top, propped up by a windowHeight-based minHeight on the tab content. That produced the downward jump. Removed the manual scroll machinery and the minHeight wrapper and now rely solely on the ScrollView's stickyHeaderIndices, matching how PredictMarketDetails handles stickiness. - PredictGameChartContent used flex-1 on its loaded/error/empty containers. Inside a ScrollView flex-1 collapses to zero height, so the fixed 200px chart View overflowed onto the chips and first outcome card. Switched to w-full so the container sizes to its content, as the market details chart already does. Tests: PredictGameChart + PredictGameDetailsContent suites pass (218 tests).
|
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. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Both changes are UI/layout improvements contained within the Predict feature. They could affect how the prediction market details screen renders and scrolls. Tag selection rationale:
No other tags are warranted as the changes are isolated to the Predict UI components with no impact on core wallet infrastructure, accounts, networks, or other features. Performance Test Selection: |
Description
This PR makes the Predict game details screen (
PredictGameDetailsContent) behave like the standardPredictMarketDetailsscreen when switching between outcome-group chips (game lines / exact score / halftime) or the Positions/Outcomes tabs. It fixes two visual issues:Screen jumping on tab/chip change. The component drove an imperative
scrollToon every chip selection (plus a follow-upInteractionManager.runAfterInteractionspass) to force the sticky header to the top, propped up by awindowHeight-basedminHeighton the tab content. This caused the screen to jump downward on every switch. The regular market details screen never does this — it relies solely on theScrollView'sstickyHeaderIndices. Removed the manual scroll machinery (scrollRef,stickyHeaderY,pendingChipScroll, the layout handler, and the effect) and theminHeightwrapper, so switching chips/tabs now only swaps the content below the sticky header and preserves scroll position.Chart overlapping the outcomes.
PredictGameChartContentusedflex-1on its loaded/error/empty containers. Inside aScrollView,flex-1collapses to zero height, so the fixed 200px chartViewoverflowed downward onto the chip bar and the first outcome card. Switched the containers tow-fullso they size to their content — matching the market details chart (PredictDetailsChart), which never usedflex-1.Both changes are layout-only. Existing unit tests for
PredictGameChartandPredictGameDetailsContent(218 tests) pass unchanged, including thereserves chart height only while loadingtest.Changelog
CHANGELOG entry: Fixed the Predict sports game details screen jumping and the price chart overlapping the outcomes when switching between markets
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/PRED-954
Manual testing steps
Screenshots/Recordings
Before
After
Screen.Recording.2026-06-09.at.18.05.28.mov
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
Layout-only Tailwind and scroll wiring changes in Predict game details UI with no auth, data, or business-logic impact.
Overview
Fixes Predict game details layout when users switch outcome chips or Positions/Outcomes tabs.
Game details scroll behavior: Removes imperative
scrollToon chip change (scrollRef,stickyHeaderY,pendingChipScroll, layout measurement, andInteractionManagerfollow-up) and drops thewindowHeight-basedminHeightwrapper around tab content. Chip selection now callshandleChipSelectdirectly, relying onScrollViewstickyHeaderIndiceslike standard market details so scroll position is preserved and the screen no longer jumps.Chart in
ScrollView: InPredictGameChartContent, replacesflex-1withw-fullon loaded, error, and empty chart containers so height follows content instead of collapsing inside the scroll view, preventing the fixed-height chart from overlapping the chip bar and outcome list.Reviewed by Cursor Bugbot for commit b15f4a1. Bugbot is set up for automated code reviews on this repo. Configure here.