-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
chore: trending tokens section #22400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
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. |
| } | ||
| }, []); | ||
|
|
||
| const pricePercentChange1d = 3.44; // TODO ; this should come from the trending hook |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be added by platform api team; putting a placeholder value for now
| const trendingTokens = trendingTokensResults.slice(0, 3); | ||
|
|
||
| const handleViewAll = useCallback(() => { | ||
| // TODO: Implement view all logic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will be implemented on a separate PR
| const handleTokenPress = useCallback((token: TrendingAsset) => { | ||
| // eslint-disable-next-line no-console | ||
| console.log('🚀 ~ TrendingTokensSection ~ token:', token); | ||
| // TODO: Implement token press logic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will be implemented on a separate PR
| <Text variant={TextVariant.BodyMDMedium} color={TextColor.Default}> | ||
| {token.name} | ||
| </Text> | ||
| <Icon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an ongoing discussion around this badge; it should come from the trending api itself; thinking about removing the icon for now til we have something from API
...mponents/Views/TrendingView/TrendingTokensSection/TrendingTokenLogo/TrendingTokenBgConfig.ts
Outdated
Show resolved
Hide resolved
...ts/Views/TrendingView/TrendingTokensSection/TrendingTokensList/TrendingTokenRowItem/index.ts
Outdated
Show resolved
Hide resolved
Should be fixed now 🙏 |
app/components/Views/TrendingView/TrendingTokensSection/TrendingTokensSection.tsx
Show resolved
Hide resolved
...gView/TrendingTokensSection/TrendingTokensList/TrendingTokenRowItem/TrendingTokenRowItem.tsx
Outdated
Show resolved
Hide resolved
app/components/Views/TrendingView/TrendingTokensSection/TrendingTokensSection.tsx
Outdated
Show resolved
Hide resolved
juanmigdr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
app/components/Views/TrendingView/TrendingTokensSection/TrendingTokensSection.tsx
Show resolved
Hide resolved
|



Description
PR to add trending tokens card. This should be under a feature flag( selector
selectAssetsTrendingTokensEnabled)Changelog
CHANGELOG entry: No functional changes, this is still under a feature flag.
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Introduces a Trending Tokens UI section integrated into TrendingView with a shared token logo hook, updates the trending fetch hook to default to popular networks, and adds comprehensive tests and i18n.
TrendingTokensSectionwithTrendingTokensList,TrendingTokenRowItem,TrendingTokenLogo, andTrendingTokensSkeleton, integrated intoTrendingView(header tweak, scroll container).useTokenLogofor shared image loading/error/background logic; refactorsPerpsTokenLogoto use it.useTrendingRequestnow accepts optionalchainIds, defaults to popular networks viauseNetworksByNamespace/useNetworksToUse, sets initial loading to true, and fixes debounce dependencies.formatCompactUSDandformatMarketStatsfor market cap/volume.en.jsonwithtrending.title,trending.view_all, andtrending.tokensstrings.Written by Cursor Bugbot for commit 49ddd1a. This will update automatically on new commits. Configure here.