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

[$500] IOS - Decimal and currency goes out of the screen when currency with 3 digits selected #35212

Closed
1 of 6 tasks
lanitochka17 opened this issue Jan 25, 2024 · 17 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@lanitochka17
Copy link

lanitochka17 commented Jan 25, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 1.4.32-2
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
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

Precondition: Large text enabled on iPhone settings (Settings > Display & Brightness > Display Zoom > Large Text)

  1. Open app
  2. Tap on FAB
  3. Tap on Request Money
  4. Select UAH currency
  5. Write 8 numbers and 2 decimals

Expected Result:

Decimal and currency should be displayed properly

Actual Result:

Decimal and currency goes out of the screen when currency with 3 digits selected and Large Text enabled on iPhone settings

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6355256_1706223640303.RPReplay_Final1706055975.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0177fc294299afae8c
  • Upwork Job ID: 1750656599886901248
  • Last Price Increase: 2024-02-01
@lanitochka17 lanitochka17 added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jan 25, 2024
@melvin-bot melvin-bot bot changed the title IOU - Decimal and currency goes out of the screen when currency with 3 digits selected [$500] IOU - Decimal and currency goes out of the screen when currency with 3 digits selected Jan 25, 2024
Copy link

melvin-bot bot commented Jan 25, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0177fc294299afae8c

Copy link

melvin-bot bot commented Jan 25, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 25, 2024
Copy link

melvin-bot bot commented Jan 25, 2024

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

@jeremy-croff
Copy link
Contributor

Proposal

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

On IOS when having font zoom on, it overflows the amount field in the send money flow.

What is the root cause of that problem?

We don't have allowFontScaling={false} on the AmountTextInput to prevent it from scaling with display zoom.
We use this pattern on some other inputs as well:

allowFontScaling={false}

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

pass allowFontScaling={false} in the AmountTextInput to TextInput

What alternative solutions did you explore? (Optional)

Adding line-break css to wrap the number to a new line

@melvin-bot melvin-bot bot added the Overdue label Jan 29, 2024
Copy link

melvin-bot bot commented Jan 29, 2024

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

@allroundexperts
Copy link
Contributor

Reviewing now!

@melvin-bot melvin-bot bot removed the Overdue label Jan 29, 2024
@allroundexperts
Copy link
Contributor

Thanks for your proposal @jeremy-croff. I think your RCA is correct but I was not able to test your solution on a simulator. Can you post a screen recording of your solution in action on a real device? Thanks!

@jeremy-croff
Copy link
Contributor

Thanks for your proposal @jeremy-croff. I think your RCA is correct but I was not able to test your solution on a simulator. Can you post a screen recording of your solution in action on a real device? Thanks!

Does it have to be a real ios device or can a simulator be used?

@allroundexperts
Copy link
Contributor

I could only reproduce this on a real device. If you can reproduce on a simulator, do let me know the steps and I can give it a shot.

@jeremy-croff
Copy link
Contributor

I could only reproduce this on a real device. If you can reproduce on a simulator, do let me know the steps and I can give it a shot.

To reproduce this on the emulator,
You go into the developer settings, and set display Zoom to larger text.
Screenshot 2024-01-29 at 6 42 50 PM

My proposed solution does not fix this, as it actually is zoom related not font scaling.

@jeremy-croff
Copy link
Contributor

jeremy-croff commented Jan 30, 2024

Proposal

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

When using a zoomed IOS experience, the amount text input overflows the screen as it scales beyond the screen size.

What is the root cause of that problem?

We have no way in react-native to prevent display zoom from effecting font-size.
Only fontScaling is disable-able.

Android allows a way to not zoom https://github.com/react-native-webview/react-native-webview/blob/master/docs/Reference.md#scalespagetofit
But this is not supported for IOS.

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

We can introduce a new styling utility to remove zoom:

function getValueDisablingZoom(defaultValue: number): number {
    return defaultValue/PixelRatio.getFontScale();
}

We can use that to fix the font-size to 40 for this component:

iouAmountTextSize: 40,

What alternative solutions did you explore? (Optional)

Disabling zoom on the entire web view.

Changing the amount input to wrap

@NicMendonca NicMendonca removed the Bug Something is broken. Auto assigns a BugZero manager. label Jan 31, 2024
@NicMendonca NicMendonca removed their assignment Jan 31, 2024
@NicMendonca NicMendonca added the Bug Something is broken. Auto assigns a BugZero manager. label Jan 31, 2024
Copy link

melvin-bot bot commented Jan 31, 2024

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

@NicMendonca
Copy link
Contributor

Starting leave so re-assigning!

@trjExpensify
Copy link
Contributor

trjExpensify commented Feb 1, 2024

The chances of somebody requesting the equivalent of £1.8m for reimbursement are about the same as me winning the lottery! I'd love to be proved wrong though and see a customer report this bug.

@allroundexperts, I'm inclined to close this. What do you think?

Copy link

melvin-bot bot commented Feb 1, 2024

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

@kbecciv kbecciv changed the title [$500] IOU - Decimal and currency goes out of the screen when currency with 3 digits selected [$500] IOS - Decimal and currency goes out of the screen when currency with 3 digits selected Feb 2, 2024
@allroundexperts
Copy link
Contributor

The chances of somebody requesting the equivalent of £1.8m for reimbursement are about the same as me winning the lottery! I'd love to be proved wrong though and see a customer report this bug.

@allroundexperts, I'm inclined to close this. What do you think?

Yep, I agree. The solution is sort of a work around as well. Not worth the time IMO.

@melvin-bot melvin-bot bot added the Overdue label Feb 5, 2024
@trjExpensify
Copy link
Contributor

Cool, thanks for the sense check. Closing!

@melvin-bot melvin-bot bot removed the Overdue label Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

5 participants