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.48k stars 2.83k forks source link

[HOLD for payment 2024-10-17] [HOLD for payment 2024-10-16] Invoices - Balance is cut off when device font size is small #50374

Open IuliiaHerets opened 1 week ago

IuliiaHerets commented 1 week 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!


Version Number: 9.0.46-1 Reproducible in staging?: Y Reproducible in production?: N/A - new feature, doesn't exist in prod Issue was found when executing this PR: https://github.com/Expensify/App/pull/46813 Email or phone of affected tester (no customers): applausetester+kh051001@applause.expensifail.com Issue reported by: Applause Internal Team

Action Performed:

Precondition:

  1. Launch New Expensify app.
  2. Go to workspace settings.
  3. Go to Invoices.

Expected Result:

The balance will not be cut off.

Actual Result:

The balance is cut off.

Workaround:

Unknown

Platforms:

Screenshots/Videos

https://github.com/user-attachments/assets/02f7b321-a954-44be-b888-161113c5e84a

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @stephanieelliott
melvin-bot[bot] commented 1 week ago

Triggered auto assignment to @mjasikowski (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

melvin-bot[bot] commented 1 week ago

Triggered auto assignment to @stephanieelliott (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

github-actions[bot] commented 1 week ago

:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.
IuliiaHerets commented 1 week ago

We think that this bug might be related to #vip-bills

abzokhattab commented 1 week ago

Proposal

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

When the device font size is small, the balance on invoices appears cut off.

What is the root cause of that problem?

The issue is due to the use of a static font size in the balance component, specifically styles.textXXXLarge: https://github.com/Expensify/App/blob/f8e79289ab1853ad9367250e94b2466644a899a8/src/components/Balance.tsx#L16 https://github.com/Expensify/App/blob/672a937b80e088402de664172068817f1e328b65/src/styles/index.ts#L451-L453 https://github.com/Expensify/App/blob/5b2a329edb9a4a96f521e889b74d709646cae26c/src/styles/variables.ts#L65 The textHeadline style within the balance component adjusts line height based on screen scale, which in our caseresults in the line height becoming smaller than the font size, causing the text to look cut off. https://github.com/Expensify/App/blob/672a937b80e088402de664172068817f1e328b65/src/styles/index.ts#L474 https://github.com/Expensify/App/blob/5b2a329edb9a4a96f521e889b74d709646cae26c/src/styles/variables.ts#L113

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

We should modify the fontSizeXXXLarge to utilize getValueUsingPixelRatio, as demonstrated here:

https://github.com/Expensify/App/blob/5b2a329edb9a4a96f521e889b74d709646cae26c/src/styles/variables.ts#L113

Result image

What alternative solutions did you explore? (Optional)

We could override the line height to remain at a constant 32 across all cases.

To implement this, we could initialize a new variable lineHeightFixedLarge:32 and override the height by placing it at the end of the style array

Result image
mjasikowski commented 1 week ago

Checking

mjasikowski commented 1 week ago

https://github.com/Expensify/App/pull/46813 this PR introduces the invoice balance view and is a part of this deployment

madmax330 commented 1 week ago

@rezkiy37 can you take a look?

rezkiy37 commented 1 week ago

Hi, I am Michael (Mykhailo) from Callstack, an expert agency and I can work on this issue. I am the author of this PR (https://github.com/Expensify/App/pull/46813).

allroundexperts commented 1 week ago

@mjasikowski Can you please assign me this issue since I reviewed the PR? Thanks!

mjasikowski commented 1 week ago

@allroundexperts done

melvin-bot[bot] commented 1 week ago

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

melvin-bot[bot] commented 1 week ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.46-5 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 2024-10-16. :confetti_ball:

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

melvin-bot[bot] commented 1 week 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:

melvin-bot[bot] commented 1 week ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.47-4 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 2024-10-17. :confetti_ball:

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

melvin-bot[bot] commented 1 week 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:

stephanieelliott commented 3 days ago

Hey @allroundexperts can you complete the BZ checklist when you get a sec?

melvin-bot[bot] commented 1 day ago

Payment Summary

[Upwork Job]()

BugZero Checklist (@stephanieelliott)