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

[HOLD for payment 2025-01-07] [HOLD for payment 2024-12-20] [$250] BNP-On entering number&decimal point, first digit moves inwards slightly #53286

Closed
2 of 8 tasks
IuliiaHerets opened this issue Nov 28, 2024 · 37 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Nov 28, 2024

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: V9.0.68-0
Reproducible in staging?: Y
Reproducible in production?: Y
Issue reported by: Applause Internal Team

Action Performed:

  1. Launch app
  2. Tap fab -- create expense
  3. Enter 3. In keypad

Expected Result:

On entering 3 and decimal point, the digit 3 must not move.

Actual Result:

On entering 3 and decimal point, the digit 3 moves inwards slightly in android but not in mweb.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6679447_1732823534311.az_recorder_20241129_011626.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021863570868574579192
  • Upwork Job ID: 1863570868574579192
  • Last Price Increase: 2024-12-02
  • Automatic offers:
    • brunovjk | Reviewer | 105212229
    • QichenZhu | Contributor | 105212231
Issue OwnerCurrent Issue Owner: @isabelastisser
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Nov 28, 2024
Copy link

melvin-bot bot commented Nov 28, 2024

Triggered auto assignment to @isabelastisser (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.

@melvin-bot melvin-bot bot added the Overdue label Dec 2, 2024
Copy link

melvin-bot bot commented Dec 2, 2024

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

@isabelastisser isabelastisser added 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 labels Dec 2, 2024
@melvin-bot melvin-bot bot changed the title BNP-On entering number&decimal point, first digit moves inwards slightly [$250] BNP-On entering number&decimal point, first digit moves inwards slightly Dec 2, 2024
Copy link

melvin-bot bot commented Dec 2, 2024

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

Copy link

melvin-bot bot commented Dec 2, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Dec 2, 2024
@QichenZhu
Copy link
Contributor

QichenZhu commented Dec 3, 2024

Proposal

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

The first digit briefly flickers when entering a money request amount.

What is the root cause of that problem?

The width of the amount input is designed to autogrow. Since React Native text input lacks the autogrow feature, we implement it using an underlying text view and synchronize the width of the input container and the underlying text.

(autoGrow || !!contentWidth) && StyleUtils.getWidthStyle(textInputWidth),

{/*
Text input component doesn't support auto grow by default.
We're using a hidden text input to achieve that.
This text view is used to calculate width or height of the input value given textStyle in this component.
This Text component is intentionally positioned out of the screen.
*/}
{(!!autoGrow || autoGrowHeight) && !isAutoGrowHeightMarkdown && (

The width of the text input is set to fit its container.

styles.flex1,
styles.w100,

When typing in the input, the content updates immediately, but the width takes time to grow because the process is asynchronous and requires communication between JS and native sides.

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

Now that we've limited the container width, there's no need to strictly limit the width of the text input itself.

Inspired by the approach on web platforms below, we could also add extra width on native platforms.

if (Browser.isMobileSafari() || Browser.isSafari() || Browser.isMobileChrome()) {
additionalWidth = 2;
}

  1. Replace the two lines with the next line.

styles.flex1,
styles.w100,

autoGrow ? {width: textInputWidth + 100} : [styles.flex1, style.w100],
  1. Insert a line under the code below.
    const newTextInputContainerStyles: StyleProp<ViewStyle> = StyleSheet.flatten([
    styles.textInputContainer,
autoGrow ? styles.overflowVisible : styles.overflowHidden,
Before After
Before After

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

This only involves stylesheet changes, so tests aren't necessary.

What alternative solutions did you explore? (Optional)

@brunovjk
Copy link
Contributor

brunovjk commented Dec 3, 2024

I think the RCA correctly identifies that the asynchronous width adjustment and lack of proper overflow control are the main causes of the flickering issue. I tested the proposal, and it works as expected, fixing the issue. @neil-marcellini what do you think about their solution? While we may need to confirm some details, the general idea seems sound. With that, I think we can go with @QichenZhu's proposal. I'll test further in the PR to avoid regressions.

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Dec 3, 2024

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

@neil-marcellini
Copy link
Contributor

I think the RCA correctly identifies that the asynchronous width adjustment and lack of proper overflow control are the main causes of the flickering issue. I tested the proposal, and it works as expected, fixing the issue. @neil-marcellini what do you think about their solution? While we may need to confirm some details, the general idea seems sound. With that, I think we can go with @QichenZhu's proposal. I'll test further in the PR to avoid regressions.

🎀👀🎀 C+ reviewed

I agree, it looks like a good solution.

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

melvin-bot bot commented Dec 5, 2024

📣 @brunovjk 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Dec 5, 2024

📣 @QichenZhu 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot removed the Overdue label Dec 5, 2024
@QichenZhu
Copy link
Contributor

Thanks for the offer. I'll open a PR on Monday.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Dec 9, 2024
Copy link

melvin-bot bot commented Dec 13, 2024

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

If no regressions arise, payment will be issued on 2024-12-20. 🎊

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

Copy link

melvin-bot bot commented Dec 13, 2024

@brunovjk @isabelastisser @brunovjk The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@brunovjk
Copy link
Contributor

Thanks for the effort @QichenZhu, I'll do some tests today and get back to you ASAP.

@brunovjk
Copy link
Contributor

After testing, skipping the fix for web and applying it only on native platforms resolves the issue effectively. So far, everything works as expected in my tests. Thanks again for the great work @QichenZhu! How have your tests been going? Let's test this very carefully before calling in the interns.

@QichenZhu
Copy link
Contributor

Thank you so much @brunovjk! I tested the steps in this issue, #53992, and this comment. Looks good so far.

@brunovjk
Copy link
Contributor

Great @QichenZhu! Could you update the Test Steps in your draft PR to include these cases? Can you think of any other cases where our changes might have affected? After that, I think we can release the PR to the design team for review. What do you think? Thanks.

@garrettmknight garrettmknight moved this from Bugs and Follow Up Issues to Hold for Payment in [#whatsnext] #expense Dec 17, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Weekly KSv2 labels Dec 18, 2024
@brunovjk
Copy link
Contributor

Update: Please ignore the payment warnings. The PR has been reverted and we are already working on the solution here.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Dec 20, 2024
@isabelastisser
Copy link
Contributor

Thanks for the heads up, @brunovjk!

@isabelastisser
Copy link
Contributor

FYI, I will be OOO from Dec 23 to Jan 6, so please reassign the issue to another team member for urgency, IF needed.

@brunovjk
Copy link
Contributor

Update: PR still under review.

Copy link

melvin-bot bot commented Dec 31, 2024

@neil-marcellini, @isabelastisser, @QichenZhu, @brunovjk Huh... This is 4 days overdue. Who can take care of this?

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Dec 31, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-12-20] [$250] BNP-On entering number&decimal point, first digit moves inwards slightly [HOLD for payment 2025-01-07] [HOLD for payment 2024-12-20] [$250] BNP-On entering number&decimal point, first digit moves inwards slightly Dec 31, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Dec 31, 2024
Copy link

melvin-bot bot commented Dec 31, 2024

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

Copy link

melvin-bot bot commented Dec 31, 2024

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

If no regressions arise, payment will be issued on 2025-01-07. 🎊

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

Copy link

melvin-bot bot commented Dec 31, 2024

@brunovjk @isabelastisser @brunovjk The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@brunovjk
Copy link
Contributor

brunovjk commented Jan 6, 2025

BugZero Checklist:

  • [Contributor] Classify the bug:
Bug classification

Source of bug:

  • 1a. Result of the original design (eg. a case wasn't considered)
  • 1b. Mistake during implementation
  • 1c. Backend bug
  • 1z. Other:

Where bug was reported:

  • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
  • 2b. Reported on staging (eg. found during regression or PR testing)
  • 2d. Reported on a PR
  • 2z. Other:

Who reported the bug:

  • 3a. Expensify user
  • 3b. Expensify employee
  • 3c. Contributor
  • 3d. QA
  • 3z. Other:
  • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

    Link to comment: N/A (No specific offending PR identified.

  • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

    Link to discussion:

  • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

Regression Test Proposal

Test:

  1. Launch the app.
  2. Tap the floating action button (FAB) to create a new expense.
  3. Enter the number '3' in the amount field.
  4. Enter a decimal point; verify that the digit '3' remains fully visible during the process.
  5. Delete the number and input a large number (at least 8 digits).
  6. Tap 'Next' and select a recipient.
  7. On the confirmation page, verify that the amount is displayed correctly without any flickering or misalignment.

Do we agree 👍 or 👎

@brunovjk
Copy link
Contributor

brunovjk commented Jan 6, 2025

Summary: We reverted the initial PR for this issue because it caused a regression/blocker. Subsequently, we raised a new PR, which I did not find to cause any regressions.

@isabelastisser
Copy link
Contributor

The payments are processed in Upwork. All set!

@github-project-automation github-project-automation bot moved this from Hold for Payment to Done in [#whatsnext] #expense Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
Status: Done
Development

No branches or pull requests

7 participants