-
Notifications
You must be signed in to change notification settings - Fork 635
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
Trending tokens polishes #6331
Trending tokens polishes #6331
Conversation
* implement gql query to get trending tokens for selected network and display them * fix dragging issue with no chainId and tapping empty space resetting network to all networks * add mock handler for navigating to swaps flow * fix lint * shuffle files and break out network switcher to be composable * refactor SwapCoinIcon to use a size prop instead of small, large, xlarge, etc. * add view token analytics event * add time tracking to discover screen * add tracking for if user has swapped a trending token * decouple network selector from trending tokens and add rest of analytics events * fix customize network banner not being dismissable * revert white color token change
…plementation-phase-1
…thub.com/rainbow-me/rainbow into gregs/app-1958-ui-implementation-phase-1
hey @greg-schrammel if these are fixes for the reviews done in the other PR it would be helpful to detail what you fixed here. |
@greg-schrammel re: farcaster pfp Using our existing ImgixImage component should do the trick |
* remove arrows for price change * fix friend holders display * fix dupes * align and make friends looks better * remove spread * ops --------- Co-authored-by: gregs <[email protected]>
{trendingTokensEnabled && ( | ||
<> | ||
<Separator color="separatorSecondary" thickness={1} /> | ||
<TrendingTokens /> | ||
</> | ||
)} |
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.
seems like other discover sections are managing their own separators, maybe we want to do this in tt in the future
function useTrendingTokensData() { | ||
const { nativeCurrency } = useAccountSettings(); | ||
const remoteConfig = useRemoteConfig(); | ||
const { chainId, category, timeframe, sort } = useTrendingTokensStore(state => ({ | ||
chainId: state.chainId, | ||
category: state.category, | ||
timeframe: state.timeframe, | ||
sort: state.sort, | ||
})); | ||
|
||
const walletAddress = useFarcasterAccountForWallets(); | ||
|
||
return useTrendingTokens({ |
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.
Might be good to clean up the naming on this wrapper to something more specific
function getPriceChangeColor(priceChange: number) { | ||
if (priceChange === 0) return 'labelTertiary'; | ||
return priceChange > 0 ? 'green' : 'red'; | ||
} |
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.
util?
Navigation.handleAction(Routes.EXPANDED_ASSET_SHEET, { | ||
asset: token, | ||
type: 'token', | ||
}); |
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.
Do we need fromDiscover
here?
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.
Just checked with Matthew and we don't need it
* convert network accessors to functions * backend networks store * wrote a couple worklet functions to get swaps working * fix other calls * Update package.json * Update ios/Podfile.lock * move all functions into backendNetworksStore and replace calls * refresh podlock * no clue what happened during merge * fix: APP-2021 * fix: APP-2022 * fix build and lint
* handle raw response from contract call correctly * fix logic to reveal icons
* format price for amounts >1 different than fractal amounts * handle >6 figs native value different and show in compact notation to prevent row collision * prevent token symbol from growing beyond what it needs * Update src/components/Discover/TrendingTokens.tsx * remove DebugLayout
* fix spacing between items * Update src/components/Discover/TrendingTokens.tsx
* use sheet instead of absoluteportal * fix timings * add a little delay between transition expanded and collapsed
Fixes APP-####
What changed (plus any additional context for devs)
this pr is base branch is #6276
Trending tokens
Network Switcher
change customize networks hint banner to not show up again after dismissed
add a placeholder on the unpinned section for when all networks are pinned
makes it a bit better when dragging to pin/unpin and the sheet changes height (not sure about the solution, which rn is always having the height account for 1 more network on the unpinned section, so there is no layout shift when dragging between sections)
blocking
I think we need to proxy the farcaster pfp urls, or allowlist the urlstuff I dont think is blocking but would like to improve soon
Screen recordings / screenshots
What to test