Skip to content

Commit 10fdc2c

Browse files
authored
chore: update animation to pure black (#28731)
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** Updates the Market Insights animation to be pure Black. https://github.com/user-attachments/assets/a2efcd50-9bac-4ced-838b-2e9da5c5f304 <img height="800" alt="Simulator Screenshot - iPhone 16e - 2026-04-13 at 14 15 36" src="https://github.com/user-attachments/assets/f23cd7b4-e3e1-4622-80d8-aa4f98f61621" /> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: null ## **Related issues** Fixes: ## **Manual testing steps** ```gherkin 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** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I've included tests if applicable - [ ] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > UI-only changes to the Market Insights header animation/skeleton; main risk is minor visual regressions or layout issues across device sizes due to the new aspect ratio and gradient overlay. > > **Overview** > Tweaks the Market Insights hero animation area by reducing its height (updates the aspect ratio in both the real view and its loading skeleton). > > Adds a `LinearGradient` overlay at the bottom of the background video to fade into the current theme background color (improving the transition to a pure-black background). > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 0fe7d3a. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 174ff67 commit 10fdc2c

6 files changed

Lines changed: 10 additions & 2 deletions

File tree

app/components/UI/MarketInsights/Views/MarketInsightsView/MarketInsightsView.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
useColorScheme,
1717
} from 'react-native';
1818
import Video from 'react-native-video';
19+
import LinearGradient from 'react-native-linear-gradient';
1920
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires, import-x/no-commonjs
2021
const MarketInsightsBackgroundVideoLight = require('../../animations/market-insights-background-light.mp4');
2122
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires, import-x/no-commonjs
@@ -619,7 +620,7 @@ const MarketInsightsView: React.FC = () => {
619620
contentContainerStyle={tw.style('pb-4')}
620621
showsVerticalScrollIndicator={false}
621622
>
622-
<Box twClassName="w-full" style={{ aspectRatio: 786 / 340 }}>
623+
<Box twClassName="w-full" style={{ aspectRatio: 786 / 240 }}>
623624
{showLastFrame && (
624625
<Image
625626
source={lastFrameImage}
@@ -642,6 +643,13 @@ const MarketInsightsView: React.FC = () => {
642643
testID={MarketInsightsSelectorsIDs.BACKGROUND_ANIMATION}
643644
/>
644645
)}
646+
<LinearGradient
647+
colors={[
648+
`${theme.colors.background.default}00`,
649+
theme.colors.background.default,
650+
]}
651+
style={tw.style('absolute bottom-0 left-0 right-0 h-16')}
652+
/>
645653
</Box>
646654
<AnimatedSection delay={SECTION_ANIMATION_DELAYS_MS.topArticle}>
647655
<Box twClassName="px-4 pt-4 pb-3">

app/components/UI/MarketInsights/Views/MarketInsightsView/MarketInsightsViewSkeleton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const MarketInsightsViewSkeleton: React.FC<MarketInsightsViewSkeletonProps> = ({
3030
>
3131
<Skeleton
3232
width="100%"
33-
style={tw.style('w-full', { aspectRatio: 786 / 340 })}
33+
style={tw.style('w-full', { aspectRatio: 786 / 240 })}
3434
/>
3535

3636
<Box twClassName="px-4 pt-4 pb-3" gap={2}>
-32.6 KB
Loading
-148 KB
Binary file not shown.
-4.08 KB
Loading
14.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)