Skip to content

feat(market-insights): animated gradient border for Market Insights entry card#28047

Merged
xavier-brochard merged 10 commits into
TSA-324-mrkt-insights-card-ui-updatefrom
animated-gradient-border-improvements
Mar 27, 2026
Merged

feat(market-insights): animated gradient border for Market Insights entry card#28047
xavier-brochard merged 10 commits into
TSA-324-mrkt-insights-card-ui-updatefrom
animated-gradient-border-improvements

Conversation

@xavier-brochard

@xavier-brochard xavier-brochard commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

Description

Adds an animated gradient border to the Market Insights entry card on Asset Overview: a dashed stroke that sweeps around the card with a soft trailing gradient aligned to the path. The carousel that cycles trend descriptions now exposes onSlideStart so the border animation retriggers when each slide begins (not only when it finishes). Constants and easing were tuned for a smoother trail (fade-in/fade-out fractions, sweep path end). Includes SlidingTextCarousel, polyline helpers for the rounded rect, skeleton/test updates, and wiring from AssetOverviewContent.

Changelog

CHANGELOG entry: Improved the Market Insights card on the asset overview with an animated gradient border that highlights the card as trend descriptions rotate.

Related issues

Fixes:

Manual testing steps

Feature: Market Insights entry card animated border

  Scenario: User views asset overview with Market Insights
    Given the user is on the asset overview for a token that shows Market Insights
    When the screen loads and trend descriptions rotate in the entry card
    Then the card border shows a sweeping gradient animation aligned with slide changes

Screenshots/Recordings

Before

N/A

After

N/A

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

Medium Risk
UI-only changes but with non-trivial react-native-reanimated/SVG worklet math and new polyline sampling that could impact animation correctness/performance across devices.

Overview
Adds a new sweeping dashed border animation to the Market Insights entry card, using a trail-aligned SVG gradient (tail→head) and tuned sweep/opacity behavior (elastic trail length, eased timing, configurable fade-in/hold/fade-out).

Refactors the border implementation to compute a rounded-rect polyline + arc-length lookup (roundedRectBorderPolyline.ts) so the gradient endpoints track the moving dash segment, and centralizes shared chrome gradient tokens in constants.ts for the border, title, sparkle, and arrow.

Updates the carousel/card wiring so the border re-triggers when each description slide starts (onSlideStart), switches the card wrapper to TouchableOpacity + inner View for viewport tracking, hardens analytics to only include digest_id when present, and adjusts/adds tests for the new layout/slide-start behavior.

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

@xavier-brochard xavier-brochard self-assigned this Mar 27, 2026
@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-social-ai Social & AI team label Mar 27, 2026
@xavier-brochard xavier-brochard changed the base branch from main to TSA-324-mrkt-insights-card-ui-update March 27, 2026 14:34
@xavier-brochard xavier-brochard marked this pull request as ready for review March 27, 2026 14:42

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

There are 3 total unresolved issues (including 2 from previous reviews).

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.

- Use smoothstep for trail opacity fade-in
- Tune fade-in/fade-out timing (plateau before fade-out)

Made-with: Cursor
@github-actions github-actions Bot added size-L and removed size-XL labels Mar 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

⏭️ Smart E2E selection skipped - base branch is not main or a release branch (base: TSA-324-mrkt-insights-card-ui-update)

All E2E tests pre-selected.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarQube Cloud

@github-actions

Copy link
Copy Markdown
Contributor

E2E Fixture Validation — Schema is up to date
16 value mismatches detected (expected — fixture represents an existing user).
View details

@xavier-brochard xavier-brochard merged commit 22d0899 into TSA-324-mrkt-insights-card-ui-update Mar 27, 2026
95 of 98 checks passed
@xavier-brochard xavier-brochard deleted the animated-gradient-border-improvements branch March 27, 2026 16:22
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size-L team-social-ai Social & AI team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants