Skip to content
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

CP-9925: Interactive Chart in Track Token Detail #2330

Merged
merged 7 commits into from
Feb 28, 2025
Merged

CP-9925: Interactive Chart in Track Token Detail #2330

merged 7 commits into from
Feb 28, 2025

Conversation

onghwan
Copy link
Contributor

@onghwan onghwan commented Feb 28, 2025

Description

Ticket: CP-9925

Screenshots/Videos

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2025-02-28.at.09.35.34.mp4
light dark

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To deprecate the useApp() hook, I extracted two currency format functions and turned them into a separate hook.

+ [circleX, isActive, pathEnd, pathRange.x, width]
)

const setIsActive = useCallback(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the previous graph, tracking the y-value of the finger’s position on the graph wasn’t necessary. However, in the graph within the new design, it is needed, so I modified the patch accordingly.

</Text>
<Text variant="heading2">
{formatTokenInCurrency(selectedData?.value ?? 0)}
</Text>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we can try the AnimatedText here later after resolving some performance issues. It was very laggy when I used it.

<Text
variant="subtitle2"
sx={{
color: percentChange < 0 ? '$textDanger' : '$textSuccess'
Copy link
Contributor

Choose a reason for hiding this comment

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

should we show neutral color for 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed.

</View>
<View sx={{ opacity: priceChange ? 1 : 0 }}>
<PriceChangeIndicator
formattedPrice={priceChange?.formattedPrice ?? '$0.00'}
Copy link
Contributor

Choose a reason for hiding this comment

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

should we keep the idea of using UNKNOWN_AMOUNT when there is no price?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Copy link
Contributor

@ruijialin-avalabs ruijialin-avalabs left a comment

Choose a reason for hiding this comment

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

:love

@onghwan onghwan merged commit fed8a7f into main Feb 28, 2025
4 checks passed
@onghwan onghwan deleted the CP-9925 branch February 28, 2025 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants