Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.53k stars 2.88k forks source link

[HOLD for payment 2023-11-02] [$1000] Android - letter "g" is cut off from the bottom in the IOU card when the language is spanish #26985

Closed izarutskaya closed 1 year ago

izarutskaya commented 1 year ago

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Login the app with 2 different accounts as user A and user B, user A should be on android.
  2. As user A, Go to settings> preferences> language> choose spanish.
  3. As user B, send a money request to user A.
  4. From user A, go to user B chat report and notice the "g" letter in "pagar" is cut off from the bottom in the IOU card.

Expected Result:

"g" letter in "pagar" shouldn't be cut off from the bottom in the IOU card when the language is spanish.

Actual Result:

"g" letter in "pagar" is cut off from the bottom in the IOU card when the language is spanish.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

Version Number: v1.3.65-6

Reproducible in staging?: Y

Reproducible in production?:Y

If this was caught during regression testing, add the test name, ID and link from TestRail:

Email or phone of affected tester (no customers):

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

https://github.com/Expensify/App/assets/115492554/91d1147a-c1df-461e-b265-32985fc22c00

https://github.com/Expensify/App/assets/115492554/0b0fa278-4731-43e5-b004-57a59de80b4a

Expensify/Expensify Issue URL:

Issue reported by: @ahmedGaber93

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1693773598319289

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0113b4746fa8dbba09
  • Upwork Job ID: 1701250408489021440
  • Last Price Increase: 2023-09-29
melvin-bot[bot] commented 1 year ago

Triggered auto assignment to @puneetlath (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

melvin-bot[bot] commented 1 year ago

Bug0 Triage Checklist (Main S/O)

s-alves10 commented 1 year ago

Proposal

Please re-state the problem that we are trying to solve in this issue.

Letter g is cut off in the IOU card when the language is Spanish

What is the root cause of that problem?

The button in IOU card is a ButtonWithDropdownMenu component(in SettlementButton)

In ButtonWithDropdownMenu, we set the button height with StyleUtils.getDropDownButtonHeight function https://github.com/Expensify/App/blob/b119f9ab54e7cc7272702e270693896b352b61e0/src/styles/StyleUtils.ts#L1172-L1181

As you can see, we limit the button height to 40(for normal button). For normal button, font size is 13, and padding is 16 for both top and bottom. So the text height would be 16. This isn't enough for 13px font

I think the reason that this issue happens only on android is the difference in font rendering between iOS, android, and desktop.

What changes do you think we should make in order to solve the problem?

We have min heights for buttons already here https://github.com/Expensify/App/blob/b119f9ab54e7cc7272702e270693896b352b61e0/src/styles/styles.js#L490 https://github.com/Expensify/App/blob/b119f9ab54e7cc7272702e270693896b352b61e0/src/styles/styles.js#L499 https://github.com/Expensify/App/blob/b119f9ab54e7cc7272702e270693896b352b61e0/src/styles/styles.js#L509

Solution 1 Don't limit the height of buttons to constants. We can use fit-content instead or simply remove height css.

Solution 2 Remove padding top, padding bottom, and text height and add alignItems: 'center'

This works as expected

Result ![image](https://github.com/Expensify/App/assets/126839717/2d35276c-44af-41dc-bece-7c63ab0f3046)

What alternative solutions did you explore? (Optional)

puneetlath commented 1 year ago

@Expensify/design thoughts on this? I think it's probably worth fixing if our button height isn't enough for our default font size and padding.

But if we decide to fix it, I'm going to reduce the bounty to $250 since this is a minor design issue rather than a bug that is impeding user action.

shawnborton commented 1 year ago

Yeah we should fix. Any idea why this only affects Android?

melvin-bot[bot] commented 1 year ago

Job added to Upwork: https://www.upwork.com/jobs/~0113b4746fa8dbba09

melvin-bot[bot] commented 1 year ago

Current assignee @puneetlath is eligible for the External assigner, not assigning anyone new.

melvin-bot[bot] commented 1 year ago

Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (External)

puneetlath commented 1 year ago

For anyone providing a proposal, please include in your RCA why this issue is only happening on Android (cc @s-alves10).

parasharrajat commented 1 year ago

Agreed.

As you can see, we limit the button height to 40(for normal button). For normal button, font size is 13, and padding is 16 for both top and bottom. So the text height would be 16. This isn't enough for 13px font

We would love to know why is it not enough?

shawnborton commented 1 year ago

Ah, I wonder if instead of using so much vertical padding, can we just use some kind of flex display to align the text in the vertical center of the button? Otherwise we should reduce the padding and increase the line height I suppose.

melvin-bot[bot] commented 1 year ago

@puneetlath, @parasharrajat Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] commented 1 year ago

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

puneetlath commented 1 year ago

Looks like we're still waiting on a proposal with full RCA. @s-alves10 do you want try to update yours to answer the questions above?

melvin-bot[bot] commented 1 year ago

@puneetlath @parasharrajat this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

melvin-bot[bot] commented 1 year ago

Upwork job price has been updated to $1000

puneetlath commented 1 year ago

Raising bounty to try to get proposals.

s-alves10 commented 1 year ago

Proposal

Updated

puneetlath commented 1 year ago

@parasharrajat mind taking a look at the updated proposal?

parasharrajat commented 1 year ago

I am hoping that the issue won't be present on all Android devices. Let me check.

melvin-bot[bot] commented 1 year ago

@puneetlath @parasharrajat this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!

melvin-bot[bot] commented 1 year ago

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

puneetlath commented 1 year ago

@parasharrajat have you had a chance to review?

Also, @s-alves10 you said this:

I think the reason that this issue happens only on android is the difference in font rendering between iOS, android, and desktop.

Could you expand on that? How is font rendering different on these devices? I also noticed the "g" getting cuttoff in the compose box of my iPhone SE recently and I'm wondering if it's the same problem.

IMG_003AC0DE59AB-1

s-alves10 commented 1 year ago

I think digging into font-rendering details beyond the scope of this issue But we can see various operating systems renders text differently in this article

Also we have similar issue in react native font rendering https://github.com/facebook/react-native/issues/32384

puneetlath commented 1 year ago

What do you think @parasharrajat?

melvin-bot[bot] commented 1 year ago

@puneetlath @parasharrajat this issue is now 4 weeks old and preventing us from maintaining WAQ, can you:

Thanks!

melvin-bot[bot] commented 1 year ago

Current assignee @parasharrajat is eligible for the Internal assigner, not assigning anyone new.

melvin-bot[bot] commented 1 year ago

@puneetlath, @parasharrajat Eep! 4 days overdue now. Issues have feelings too...

puneetlath commented 1 year ago

@parasharrajat bump.

melvin-bot[bot] commented 1 year ago

@puneetlath, @parasharrajat Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

parasharrajat commented 1 year ago

Reviewing it...

parasharrajat commented 1 year ago

Yes, the system renders font differently. But that's what we are trying to fix by configuration. Due to there being various DPI Android phones available, Android is more prone to rendering issues. I have mentioned several times that we should try to create a responsive UI that fits into all Android devices and elements expand/shrink proportionally. On a few devices, an element looks smaller if it has a high DPI and the same element looks bigger on smaller DPI devices. This should not happen and that is what responsive UI will solve for us. However, this will require refactoring all style rules which us really out of the scope of this issue.


For immediate solutions,

Solution 1 can't be done as it breaks our UI. Solution 2 is a possibility and looks completely fine to do. We should still test it against a few devices to make sure. I will try to test it.

melvin-bot[bot] commented 1 year ago

@puneetlath, @parasharrajat Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

puneetlath commented 1 year ago

Sounds good @parasharrajat. Let us know what you find.

parasharrajat commented 1 year ago

So I tested it on a few devices and it looks fine. But it is still hard to say that there are no regressions from it because of the many types of button content.

Still, we can give it a try IMO. so @s-alves10 's solution 2 looks fine to me.

:ribbon: :eyes: :ribbon: C+ reviewed

melvin-bot[bot] commented 1 year ago

Triggered auto assignment to @flodnv, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

flodnv commented 1 year ago

Sounds good

s-alves10 commented 1 year ago

PR is ready for review https://github.com/Expensify/App/pull/30192

melvin-bot[bot] commented 1 year ago

Reviewing label has been removed, please complete the "BugZero Checklist".

melvin-bot[bot] commented 1 year ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.3.91-8 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-11-02. :confetti_ball:

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

For reference, here are some details about the assignees on this issue:

melvin-bot[bot] commented 1 year ago

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

parasharrajat commented 1 year ago

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

puneetlath commented 1 year ago

Weird. I'm not sure why upwork offers weren't automatically sent.

@s-alves10 @ahmedGaber93 could you please apply to this job? https://www.upwork.com/jobs/~0140dad38648f3fa4e

puneetlath commented 1 year ago

Payment summary:

@parasharrajat please go ahead and make the request on NewDot.

s-alves10 commented 1 year ago

@puneetlath

Applied. Thanks

s-alves10 commented 1 year ago

@puneetlath

Accepted the offer. Thanks

puneetlath commented 1 year ago

Upwork contracts paid. @parasharrajat will request on NewDot.

Thanks y'all!

parasharrajat commented 11 months ago

Payment requested as per https://github.com/Expensify/App/issues/26985#issuecomment-1795728956

JmillsExpensify commented 11 months ago

$1,000 payment approved for @parasharrajat based on this comment.