Skip to content

feat(predict): cp-7.62.0 implement game details action buttons and about sheet #24540

Merged
matallui merged 13 commits intomainfrom
predict/game-action-buttons
Jan 15, 2026
Merged

feat(predict): cp-7.62.0 implement game details action buttons and about sheet #24540
matallui merged 13 commits intomainfrom
predict/game-action-buttons

Conversation

@matallui
Copy link
Copy Markdown
Contributor

@matallui matallui commented Jan 15, 2026

Description

This PR implements the action buttons and about bottom sheet for the Predict NFL game details screen.

Key changes:

  1. PredictActionButtons - New component providing betting buttons (YES/NO or team-based) with proper styling and loading states
  2. PredictBetButton - Individual bet button with dynamic pricing display
  3. PredictClaimButton - Button for claiming winnings with two variants (hero style with amount, standard style without)
  4. PredictGameDetailsFooter - Footer component showing "Pick a winner" label, info icon, volume display, and action buttons
  5. PredictGameAboutSheet - Bottom sheet displaying market description and terms link
  6. usePredictBottomSheet - Hook for managing bottom sheet visibility state

Architecture improvement: The about bottom sheet is rendered at the root level (inside SafeAreaView in PredictGameDetailsContent) rather than inside the footer to ensure the overlay covers the full screen, allowing tap-to-dismiss to work correctly.

Changelog

CHANGELOG entry: null

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/PRED-480

Manual testing steps

Feature: NFL Game Details Action Buttons

  Scenario: User views game details footer
    Given user is on an NFL game details screen

    When user views the footer
    Then user sees "Pick a winner" label with info icon
    And user sees volume display (e.g., "$1.5M Vol")
    And user sees two team betting buttons with prices

  Scenario: User taps info button to view about sheet
    Given user is on an NFL game details screen

    When user taps the info icon
    Then the about bottom sheet appears with market description
    And user can see "Read the full contract terms and conditions" link

    When user taps outside the sheet
    Then the bottom sheet closes

  Scenario: User places a bet
    Given user is on an NFL game details screen with open market

    When user taps a team betting button (e.g., "SEA · 65¢")
    Then the buy preview screen opens

  Scenario: User claims winnings
    Given user is on an NFL game details screen with claimable winnings

    When user views the footer
    Then user sees a claim button with the amount (e.g., "Claim $75.50")

    When user taps the claim button
    Then the claim flow initiates

Screenshots/Recordings

Before

After

Screenshot 2026-01-14 at 8 48 30 PM Screenshot 2026-01-14 at 9 23 20 PM Screenshot 2026-01-14 at 9 45 31 PM

Pre-merge author checklist

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.

Note

Implements game-specific actions and info surfaces on the Predict game details screen.

  • Adds PredictActionButtons (bet YES/NO or team labels with colors; claim button; loading skeleton) and integrates into game views
  • New PredictGameDetailsFooter showing “Pick a winner”, volume, info button, and hosting action buttons; wired into PredictGameDetailsContent
  • Adds PredictGameAboutSheet bottom sheet with market description and a terms link (POLYMARKET_TERMS_URL)
  • Introduces usePredictBottomSheet to manage sheet visibility (simplified open/close behavior)
  • Wires handlers and claimable amounts into PredictMarketDetails and PredictGameDetailsContent
  • Adds/updates i18n strings and tests for all new components and hook

Written by Cursor Bugbot for commit 038c465. This will update automatically on new commits. Configure here.

@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.

@metamaskbot metamaskbot added the team-predict Predict team label Jan 15, 2026
@matallui matallui marked this pull request as ready for review January 15, 2026 04:27
@matallui matallui requested a review from a team as a code owner January 15, 2026 04:27
- Return null when market is closed/resolved and user has no claimable winnings
- Hide 'Pick a winner' info row when showing claim button
- Add tests for footer visibility logic
The size prop was defined but never used in PredictBetButton.
Remove size prop, PredictBetButtonSize type, and BUTTON_SIZE_MAP constant.
Derive hasClaimableWinnings from claimableAmount > 0 instead of passing
both as separate props. This eliminates the edge case where they could
disagree and simplifies the component API.
Show loading skeleton while claimable positions are being fetched to
prevent jarring UI transition from bet buttons to claim button.
Copy link
Copy Markdown
Contributor

@caieu caieu left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokePredictions
  • Risk Level: medium
  • AI Confidence: 92%
click to see 🤖 AI reasoning details

This PR introduces new UI components and modifies existing ones within the Predict (Predictions) feature. The changes include:

  1. New Components: PredictActionButtons, PredictBetButton, PredictBetButtons, PredictClaimButton, PredictGameDetailsFooter, and PredictGameAboutSheet - all related to betting and claiming functionality in prediction markets.

  2. Modified Components: PredictGameDetailsContent now includes a footer with action buttons and an info sheet. PredictMarketDetails was updated to pass bet/claim handlers and loading state.

  3. Hook Fix: usePredictBottomSheet was simplified to fix stale closure issues.

  4. Localization: New strings added for game details footer (pick_a_winner, volume_display, read_terms, claim_winnings_text).

  5. Constants: Added POLYMARKET_TERMS_URL for the about sheet.

All changes are self-contained within the app/components/UI/Predict/ directory and directly relate to the Predictions feature. The E2E tests under e2e/specs/predict/ are tagged with SmokePredictions and cover scenarios like claiming positions, cash out, opening positions, and API/geo restrictions - all relevant to validating these UI changes.

No other features are impacted by these changes, so only the SmokePredictions tag is needed.

View GitHub Actions results

@matallui matallui enabled auto-merge January 15, 2026 20:51
@sonarqubecloud
Copy link
Copy Markdown

@matallui matallui added this pull request to the merge queue Jan 15, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 15, 2026
@matallui matallui changed the title feat(predict): implement game details action buttons and about sheet feat(predict): cp-7.62.0implement game details action buttons and about sheet Jan 15, 2026
@matallui matallui changed the title feat(predict): cp-7.62.0implement game details action buttons and about sheet feat(predict): cp-7.62.0 implement game details action buttons and about sheet Jan 15, 2026
@matallui matallui added this pull request to the merge queue Jan 15, 2026
Merged via the queue into main with commit 85ed4b9 Jan 15, 2026
153 of 156 checks passed
@matallui matallui deleted the predict/game-action-buttons branch January 15, 2026 22:25
@github-actions github-actions bot locked and limited conversation to collaborators Jan 15, 2026
@metamaskbot metamaskbot added the release-7.63.0 Issue or pull request that will be included in release 7.63.0 label Jan 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.63.0 Issue or pull request that will be included in release 7.63.0 size-XL team-predict Predict team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants