-
Notifications
You must be signed in to change notification settings - Fork 87
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
feat(earn-info): keep token icon and name on the same line #6222
Conversation
@@ -212,7 +216,6 @@ export default function EarnPoolInfoScreen({ route, navigation }: Props) { | |||
}, [allPositionsWithBalance]) | |||
|
|||
const onPressWithdraw = () => { | |||
// TODO(tomm): once act-1385 is merge use the bottom sheet button presses |
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 is covered by the event EarnEvents.earn_select_withdraw_type
.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6222 +/- ##
==========================================
- Coverage 88.97% 88.97% -0.01%
==========================================
Files 736 736
Lines 31407 31422 +15
Branches 5809 5513 -296
==========================================
+ Hits 27944 27957 +13
- Misses 3265 3421 +156
+ Partials 198 44 -154
... and 76 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
startFadeInPosition: titleHeight - titleHeight * 0.9, | ||
animationDistance: titleHeight * 0.66, |
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.
can we document these magic numbers? And any reason why they are changing to different values, when compared to the existing one where both were 0.33
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.
These are the values I found when testing locally that rendered the title in the header best. Moving to a single line for the token icon and title means we want a higher fade-in position and a lower animation distance. Alternatively, we could move the chain name and protocol name out of the header and compute the title height better, but that was a bigger change.
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.
Added a comment and simplified a bit in e08941d.
<TokenIcons tokensInfo={tokensInfo} /> | ||
<Text style={styles.title}>{title}</Text> | ||
<View style={styles.titleTokenContainer}> | ||
<View style={styles.titleTokenIconContainer}> |
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.
for my understanding, what's the purpose of this extra wrapper View?
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.
Wrapped the token icon in an extra view to shrink it down; otherwise, it'll take up the whole line.
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.
ok, seems like having flexShrink: 1 does not really make a difference? and just the wrapper View without style should suffice, so maybe we can drop the style?
Description
Slight layout adjustment to keep the token icon and name on the same line.
Test plan
Related issues
Backwards compatibility
Yes
Network scalability
N/A