Closed izarutskaya closed 1 year ago
Triggered auto assignment to @puneetlath (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Platforms
in OP are ✅)Letter g
is cut off in the IOU card when the language is Spanish
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.
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
@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.
Yeah we should fix. Any idea why this only affects Android?
Job added to Upwork: https://www.upwork.com/jobs/~0113b4746fa8dbba09
Current assignee @puneetlath is eligible for the External assigner, not assigning anyone new.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (External
)
For anyone providing a proposal, please include in your RCA why this issue is only happening on Android (cc @s-alves10).
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?
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.
@puneetlath, @parasharrajat Whoops! This issue is 2 days overdue. Let's get this updated quick!
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
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?
@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!
Upwork job price has been updated to $1000
Raising bounty to try to get proposals.
@parasharrajat mind taking a look at the updated proposal?
I am hoping that the issue won't be present on all Android devices. Let me check.
@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!
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
@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.
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
What do you think @parasharrajat?
@puneetlath @parasharrajat this issue is now 4 weeks old and preventing us from maintaining WAQ, can you:
Thanks!
Current assignee @parasharrajat is eligible for the Internal assigner, not assigning anyone new.
@puneetlath, @parasharrajat Eep! 4 days overdue now. Issues have feelings too...
@parasharrajat bump.
@puneetlath, @parasharrajat Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Reviewing it...
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.
@puneetlath, @parasharrajat Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Sounds good @parasharrajat. Let us know what you find.
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
Triggered auto assignment to @flodnv, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
Sounds good
PR is ready for review https://github.com/Expensify/App/pull/30192
Reviewing
label has been removed, please complete the "BugZero Checklist".
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:
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:
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:
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
Payment summary:
@parasharrajat please go ahead and make the request on NewDot.
@puneetlath
Applied. Thanks
@puneetlath
Accepted the offer. Thanks
Upwork contracts paid. @parasharrajat will request on NewDot.
Thanks y'all!
Payment requested as per https://github.com/Expensify/App/issues/26985#issuecomment-1795728956
$1,000 payment approved for @parasharrajat based on this comment.
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:
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