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

fix(earn-cards): handle large font sizes #6308

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

MuckT
Copy link
Collaborator

@MuckT MuckT commented Dec 5, 2024

Description

Large fonts and non-English languages resulted in off-screen text and uneven columns for the earn cards used on the src/earn/poolInfoScreen/EarnPoolInfoScreen.tsx.

Test plan

  • Tested locally on iOS
  • Tested locally on Android
  • Tested with Spanish as the preferred language

Android Large Text

Android Before Android After
Screen.Recording.2024-12-05.at.12.06.33.AM.mov
Screen.Recording.2024-12-05.at.11.30.42.AM.mov

iOS Large Text

iOS Before iOS after
Screen.Recording.2024-12-05.at.12.01.08.AM.mov
Screen.Recording.2024-12-05.at.11.32.06.AM.mov

Default Text (Spanish)

iOS Before iOS After Android Before Android After

Related issues

N/A

Backwards compatibility

Yes

Network scalability

N/A

Copy link

codecov bot commented Dec 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.02%. Comparing base (1421494) to head (e4f7b69).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6308      +/-   ##
==========================================
- Coverage   89.03%   89.02%   -0.02%     
==========================================
  Files         735      735              
  Lines       31327    31328       +1     
  Branches     5812     5812              
==========================================
- Hits        27892    27889       -3     
- Misses       3242     3394     +152     
+ Partials      193       45     -148     
Files with missing lines Coverage Δ
src/components/LabelWithInfo.tsx 100.00% <100.00%> (ø)
src/earn/EarnEnterAmount.tsx 93.40% <ø> (ø)
src/earn/poolInfoScreen/Cards.tsx 99.08% <100.00%> (ø)
src/earn/poolInfoScreen/SafetyCard.tsx 100.00% <ø> (ø)
src/send/EnterAmount.tsx 97.54% <ø> (ø)

... and 67 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1421494...e4f7b69. Read the comment docs.

Copy link
Contributor

@jophish jophish left a comment

Choose a reason for hiding this comment

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

It looks like there's some alignment issue with the pool age card
2024-12-09-121907_817x1723_scrot

though not sure if that's new to this PR

src/earn/poolInfoScreen/Cards.tsx Outdated Show resolved Hide resolved
flexShrink: {
flexShrink: 1,
flexLabel: {
flex: 1.2,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the non-standard flex value here? Is this to make up for the lack of the paddingRight that we used to have?

Copy link
Collaborator Author

@MuckT MuckT Dec 9, 2024

Choose a reason for hiding this comment

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

This is just for spacing, as having the columns of flex 1 and 1 values appear a bit cramped and gives a bit too much room to the labels; it is the same as flex: 6 to 5, with an 11 column 11-column layout.

}: {
label: string
onPress?: () => void
labelStyle?: StyleProp<TextStyle>
iconSize?: number
numberOfLines?: number | undefined
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if it's better to have 1 or undefined as the default

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

When I tried to set the default to 1 I ran into an issue where setting it to undefined wasn't overriding the default value. I can try setting the default to undefined and see how that works.

src/earn/poolInfoScreen/Cards.tsx Outdated Show resolved Hide resolved
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