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

Initial charts cleanup #6387

Merged
merged 5 commits into from
Jan 10, 2025
Merged

Initial charts cleanup #6387

merged 5 commits into from
Jan 10, 2025

Conversation

christianbaroni
Copy link
Member

@christianbaroni christianbaroni commented Jan 7, 2025

What changed (plus any additional context for devs)

  • Adjusts loading logic to fix the height change jank that occurs if the chart isn't yet loaded when opening the chart expanded state
  • Converts the animated chart header text to AnimatedText which cuts down on jank when interacting with the chart
  • Fixes chart haptic feedback
  • Starts converting the charts code to TS
  • Improves price/decimal formatting when interacting with the chart

Screen recordings / screenshots

What to test

@brunobar79
Copy link
Member

Launch in simulator or device for a97ef6b

@brunobar79 brunobar79 added the release for release blockers and release candidate branches label Jan 9, 2025
@derHowie derHowie self-requested a review January 9, 2025 17:38
Copy link
Member

@derHowie derHowie left a comment

Choose a reason for hiding this comment

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

I have a couple questions but neither are blocking. LGTM

(!hasBalance && 68) +
additionalContentHeight +
(additionalContentHeight === 0 ? 0 : scrollableContentHeight),
carouselHeight + heightWithChart - (!hasBalance && 68) + additionalContentHeight + (additionalContentHeight === 0 ? 0 : true),
Copy link
Member

@derHowie derHowie Jan 9, 2025

Choose a reason for hiding this comment

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

I know this isn't yours originally but I'm having a hard time understanding this code. Specifically the purpose of the final conditional: (additionalContentHeight === 0 ? 0 : true).

True here is a 1. What is the significance of adding 1 when additionalContentHeight is 0?
Screenshot 2025-01-09 at 3 33 16 PM

Comment on lines +47 to +52
if (!value) {
return defaultPriceValue || '';
}
if (value === 'undefined') {
return nativeSelected?.alignment === 'left' ? `${nativeSelected?.symbol}0.00` : `0.00 ${nativeSelected?.symbol}`;
}
Copy link
Member

Choose a reason for hiding this comment

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

Not really an issue, but curious why we handle these two cases differently. Is it so that we don't ever flash $0.00 on tokens with actual value?

@christianbaroni christianbaroni added merge when ready performance performance related improvements labels Jan 10, 2025
@brunobar79
Copy link
Member

Launch in simulator or device for fa87083

@brunobar79 brunobar79 merged commit c768946 into develop Jan 10, 2025
8 checks passed
@brunobar79 brunobar79 deleted the @christian/charts-cleanup branch January 10, 2025 16:59
Copy link

sentry-io bot commented Jan 12, 2025

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ React ErrorBoundary Error: malformed path data parse(index.android) View Issue

Did you find this useful? React with a 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge when ready performance performance related improvements release for release blockers and release candidate branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants