Skip to content

feat(predict): update World Cup banner#30480

Merged
matallui merged 4 commits into
mainfrom
predict/pred-895
May 20, 2026
Merged

feat(predict): update World Cup banner#30480
matallui merged 4 commits into
mainfrom
predict/pred-895

Conversation

@matallui

@matallui matallui commented May 20, 2026

Copy link
Copy Markdown
Contributor

Description

Updates the Predict World Cup main feed banner to match the latest Figma card design. The banner now renders as a muted card with the World Cup image, title, description, and a filled icon button in the footer.

Also updates the Predict World Cup feature flag image override from a single URL to a structured bannerImage object containing { url, width, height }, so remote images can preserve their intended aspect ratio while still falling back to a safe default aspect ratio when dimensions are missing or invalid.

Changelog

CHANGELOG entry: null

Related issues

Fixes: PRED-895

Manual testing steps

Feature: Predict World Cup main feed banner

  Scenario: user views the Predict feed with World Cup enabled
    Given the Predict World Cup feature flag is enabled
    And showMainFeedBanner and showWorldCupScreen are enabled

    When user opens the Predict feed
    Then the World Cup banner is displayed as a card with an image, title, description, and arrow button

  Scenario: user taps the World Cup banner
    Given the World Cup banner is visible on the Predict feed

    When user taps the banner
    Then user is navigated to the World Cup Predictions screen

Screenshots/Recordings

Before

N/A

After

Simulator Screenshot - mm-blue - 2026-05-20 at 15 16 24

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

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.

Testing

yarn jest app/components/UI/Predict/components/PredictWorldCupMainFeedBanner/PredictWorldCupMainFeedBanner.test.tsx app/components/UI/Predict/schemas/flags.test.ts app/components/UI/Predict/utils/resolvePredictFeatureFlags.test.ts --runInBand

Result: 3 test suites passed, 53 tests passed.


Note

Medium Risk
Moderate risk because it changes the remote feature-flag schema/type for the World Cup banner image (from bannerImageUrl to structured bannerImage) and updates banner sizing logic based on provided dimensions, which could impact rendering if remote config is malformed.

Overview
Updates the Predict World Cup main-feed banner to a card-style layout with footer copy (title/description) and a filled arrow ButtonIcon, while keeping the same navigation/tracking behavior.

Reworks the World Cup feature-flag image override from bannerImageUrl to a structured bannerImage object ({ url, width, height }) and introduces getPredictWorldCupBannerImageAspectRatio to compute banner height from configured dimensions with a safe default fallback; associated schema/type and unit tests are updated accordingly, and the English banner description string is revised.

Reviewed by Cursor Bugbot for commit 580875f. Bugbot is set up for automated code reviews on this repo. 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.

@metamaskbotv2 metamaskbotv2 Bot added the team-predict Predict team label May 20, 2026
@matallui matallui marked this pull request as ready for review May 20, 2026 21:19
@matallui matallui requested a review from a team as a code owner May 20, 2026 21:19
@matallui matallui changed the title feat: update World Cup predict banner feat(predict): update World Cup banner May 20, 2026
@matallui

Copy link
Copy Markdown
Contributor Author

Fixed Cursor Bugbot feedback. Updated the component-level and helper tests to use a configured aspect ratio of 3 instead of 2, so the configured-dimensions path is distinct from the default fallback aspect ratio.

@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 is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3b2fd8b. Configure here.

@matallui matallui force-pushed the predict/pred-895 branch from f17a728 to 3b2fd8b Compare May 20, 2026 22:12
@matallui

Copy link
Copy Markdown
Contributor Author

Fixed latest Cursor Bugbot feedback. Removed the ineffective useWindowDimensions mock and now calculates the expected banner image height from Dimensions.get("window").width, keeping the assertion consistent with the runtime dimensions used in the test environment.

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokePredictions, SmokeWalletPlatform, SmokeConfirmations
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 90%
click to see 🤖 AI reasoning details

E2E Test Selection:
The changes are scoped entirely to the Predict/World Cup feature area:

  1. Type/Schema refactor: bannerImageUrl?: stringbannerImage?: { url, width, height } in flags types and schemas. This is a breaking rename of a feature-flag field, but it's internal to the Predict module.

  2. UI enhancement: PredictWorldCupMainFeedBanner component updated to use the new bannerImage object for dynamic aspect ratio calculation, and the banner layout was enhanced with title/description text and a navigation arrow button.

  3. Localization: Minor text change for banner_description in en.json (cosmetic only).

  4. Test updates: Unit tests updated to match new API - no new E2E test files changed.

  5. Image asset: New/updated world-cup banner PNG asset.

Tag selection rationale:

  • SmokePredictions: Primary tag - directly covers Polymarket/Predictions UI including the main feed banner that was modified.
  • SmokeWalletPlatform: Required per SmokePredictions description - "Predictions is also a section inside the Trending tab (SmokeWalletPlatform); changes to Predictions views affect Trending."
  • SmokeConfirmations: Required per SmokePredictions description - "opening/closing positions are on-chain transactions."

No changes to core controllers, Engine, navigation infrastructure, or shared components that would warrant broader test coverage.

Performance Test Selection:
The changes are limited to UI layout adjustments within the Predict World Cup banner component (image aspect ratio calculation, text/button additions) and a type/schema refactor. There is no new data fetching, no list rendering changes, no state management modifications, and no impact on app startup or critical user flows. The performance impact is negligible.

View GitHub Actions results

@matallui matallui enabled auto-merge May 20, 2026 22:30
@sonarqubecloud

Copy link
Copy Markdown

@matallui matallui added this pull request to the merge queue May 20, 2026
Merged via the queue into main with commit 3fb3e97 May 20, 2026
191 of 198 checks passed
@matallui matallui deleted the predict/pred-895 branch May 20, 2026 23:31
@github-actions github-actions Bot locked and limited conversation to collaborators May 20, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.79.0 Issue or pull request that will be included in release 7.79.0 label May 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.79.0 Issue or pull request that will be included in release 7.79.0 size-M team-predict Predict team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants