Skip to content

Conversation

@matallui
Copy link
Contributor

@matallui matallui commented Nov 20, 2025

Description

Currently the GTM modal for Predict looks funky as it seems to render different pieces at different times.
This PR attempts to fix this by introducing two main changes:

  • Animate opacity for the whole modals 0 -> 1
  • Only start animation when the background image finishes loading

Changelog

CHANGELOG entry: null

Related issues

Fixes:

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

RPReplay_Final1763676703.MP4

After

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2025-11-20.at.15.53.07.mov

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

Adds a reanimated opacity fade-in for the Predict GTM modal that starts once the background image finishes loading.

  • UI/Animation:
    • Wraps modal root in Animated.View and animates opacity from 0→1 with withTiming.
    • Starts animation on background image onLoad via useState + useEffect and useSharedValue/useAnimatedStyle.
    • Ensures content appears only after image loads for smoother reveal.

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

@github-actions
Copy link
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.

@matallui matallui requested review from caieu and kevinbluer November 20, 2025 23:56
@matallui matallui changed the title fix(predict): fade in gtm modal after image loads fix(predict): cp-7.60.0 fade in gtm modal after image loads Nov 20, 2025
@metamaskbot metamaskbot added the team-predict Predict team label Nov 20, 2025
@matallui matallui added the skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. label Nov 20, 2025
@github-actions
Copy link
Contributor

🔍 Smart E2E Test Selection

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

The changes are isolated to the PredictGTMModal component, which is a Go-To-Market modal for the Predictions feature. The modifications add a fade-in animation using react-native-reanimated when the background image loads (500ms duration transition from opacity 0 to 1).

While the changes are primarily cosmetic/presentational, they affect a user-facing component in the Predictions onboarding flow. The animation could potentially introduce visual issues or timing problems that should be validated through E2E testing.

The SmokePredictions tag is the most appropriate choice because:

  1. The modal is part of the Predictions feature navigation stack (Routes.PREDICT.MODALS.GTM_MODAL)
  2. The GTM modal is used as part of the user's first-time experience with Predictions
  3. E2E tests in e2e/specs/predict/ already test prediction flows and could catch issues with modal behavior
  4. The modal contains navigation logic (navigate to Predictions market list) and analytics tracking that should be validated

Risk is assessed as medium (not low) because:

  • This is a user-facing UI component in the onboarding flow
  • Animation timing could affect the user experience or introduce race conditions
  • The modal is displayed as part of the initial Predictions feature experience
  • While not critical infrastructure, proper functioning is important for feature adoption

No other tags are necessary as the changes are completely isolated to the Predictions feature area.

View GitHub Actions results

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
66.7% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@matallui matallui enabled auto-merge November 21, 2025 00:27
Copy link
Member

@kevinbluer kevinbluer left a comment

Choose a reason for hiding this comment

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

Nice approach 👍

@matallui matallui added this pull request to the merge queue Nov 21, 2025
Merged via the queue into main with commit 2c0b340 Nov 21, 2025
91 of 93 checks passed
@matallui matallui deleted the predict/fix-gtm-modal branch November 21, 2025 01:15
@github-actions github-actions bot locked and limited conversation to collaborators Nov 21, 2025
@metamaskbot metamaskbot added the release-7.61.0 Issue or pull request that will be included in release 7.61.0 label Nov 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.61.0 Issue or pull request that will be included in release 7.61.0 size-S skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. team-predict Predict team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants