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.46k stars 2.81k forks source link

IOU - Empty suggestion pop-up appears below numeric keyboard, preventing number input #50057

Open lanitochka17 opened 1 week ago

lanitochka17 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.43 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Email or phone of affected tester (no customers): applausetester+omqq1@applause.expensifail.com Issue reported by: Applause - Internal Team

Action Performed:

Precondition: user has signed in

  1. Open app
  2. Tap on FAB
  3. Select Submit Expense
  4. Try to enter value with multiple numbers e.g. "3456"

Expected Result:

The user should be able to continuously input numbers in the Amount field without any interruptions, and all taps on the numeric keyboard should be properly registered. The "Next" button should remain fully accessible

Actual Result:

The empty keyboard suggestion is displayed below the numeric keyboard and also overlaps the "Next" button. It prevents continuous input in the Amount field because tapping a number on the numeric keyboard only dismisses the empty suggestion pop-up without registering the number. The empty suggestion pop-up appears with each tap on the numeric keyboard. This issue also makes it difficult to proceed, as the empty suggestion pop-up covers the "Next" button

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/user-attachments/assets/dbd0e4ef-066c-462a-8ca1-828d212a5808

View all open jobs on GitHub

melvin-bot[bot] commented 1 week ago

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

lanitochka17 commented 1 week ago

@garrettmknight FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

melvin-bot[bot] commented 1 week ago

Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.

melvin-bot[bot] commented 1 week ago

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

rezkiy37 commented 1 week ago

Hi, I am Michael (Mykhailo) from Callstack, an expert agency and I can work on this issue.

rezkiy37 commented 6 days ago

For context:

  1. There was a similar issue - https://github.com/Expensify/App/issues/38349.
  2. It was fixed - https://github.com/Expensify/App/pull/38728.

However, this issue describes a little bit different problem.

rezkiy37 commented 6 days ago

Actively working on the issue.

rezkiy37 commented 2 days ago

Discussing a proposal internally.

melvin-bot[bot] commented 1 day ago

@garrettmknight, @shubham1206agra Eep! 4 days overdue now. Issues have feelings too...

garrettmknight commented 1 day ago

@rezkiy37 is there anywhere I can follow along with the proposal in slack?

rezkiy37 commented 1 day ago

Proposal

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

The empty keyboard suggestion is displayed below the numeric keyboard and overlaps the "Next" button. It prevents continuous input in the Amount field because tapping a number on the numeric keyboard only dismisses the empty suggestion pop-up without registering the number. The empty suggestion pop-up appears with each tap on the numeric keyboard. This issue also makes proceeding difficult, as the empty suggestion pop-up covers the "Next" button.

What is the root cause of that problem?

The empty suggestion pop-up cannot be hidden from React Native programmatically. There was a PR that helped to hide the QuickType bar, but not this particular empty bar.

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

Since this text input is controlled by the custom numeric buttons, it is not actually an input on native platforms. Moreover, the app passes tons of props and does many other work such as computing, lifecycle, and hooks. However, it is just a text for the user. So I am proposing to simplify AmountTextInput for native platforms. It should use the Text component with same styles.

function AmountTextInput(
    {style, containerStyle, formattedAmount, placeholder}: AmountTextInputProps,
    // eslint-disable-next-line @typescript-eslint/no-unused-vars
    _ref: ForwardedRef<BaseTextInputRef>,
) {
    const theme = useTheme();
    const shouldShowPlaceholder = !formattedAmount;

    return (
        <View style={containerStyle}>
            <Text style={[style, shouldShowPlaceholder && {color: theme.placeholderText}]}>{shouldShowPlaceholder ? placeholder : formattedAmount}</Text>
        </View>
    );
}

What alternative solutions did you explore? (Optional)

  1. Do nothing. Because it is an edge case and replicable only after some scenario. It shows the micro suggestion bar by default. It blocks the first interaction as well.
rezkiy37 commented 1 day ago

I've posted a proposal. cc @garrettmknight @shubham1206agra