Skip to content

[HOLD for payment 2023-11-06][$500] Web - Split bill - Enter key in Edit amount page directly creates split bill #29051

Closed

Description

@izarutskaya

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:

  1. Go to staging.new.expensify.com.
  2. Go to any group chat.
  3. Go to + > Split amount > Enter amount > Next.
  4. Click on the amount.
  5. Enter new amount.
  6. Hit Enter on keyboard.
    Note that the new amount is not saved and the split bill with the old amount is created instantly.

Expected Result:

The new amount is saved and user lands in confirmation page.

Actual Result:

The new amount is not saved and Enter key triggers the creation of split bill with the previous amount.

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: v1.3.79-3

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

Bug6228586_1696671157367.bandicam_2023-10-07_13-42-13-411.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause-Internal Team

Slack conversation: @

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01f4cfb0b4e5279620
  • Upwork Job ID: 1710595541472288768
  • Last Price Increase: 2023-10-07

Activity

  1. added
    External
    Daily
    Bug
    on Oct 7, 2023
  2. changed the title [-]Web - Split bill - Enter key in Edit amount page directly creates split bill[/-] [+][$500] Web - Split bill - Enter key in Edit amount page directly creates split bill[/+] on Oct 7, 2023
  3. melvin-bot commented on Oct 7, 2023

    @melvin-bot
  4. melvin-bot commented on Oct 7, 2023

    @melvin-bot

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

  5. added
    Help Wanted
    on Oct 7, 2023
  6. melvin-bot commented on Oct 7, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  7. melvin-bot commented on Oct 7, 2023

    @melvin-bot

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

  8. zzarcon commented on Oct 7, 2023

    @zzarcon

    I'm trying to reproduce the issue but I can't, it seems like when I get to the split bill action we have an exception in where we try to parse the participant login but is undefined

    split_bill.mov

    I believe we need to first fix this issue?

  9. paultsimura commented on Oct 7, 2023

    @paultsimura
    Contributor

    Proposal

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

    When editing the amount on the request confirmation page, hitting Enter submits the request instead of just updating the amount.

    What is the root cause of that problem?

    The reason for this is that when we are editing the amount, we have 2 buttons with pressOnEnter:

    <Button
    success
    allowBubble
    pressOnEnter
    medium={isExtraSmallScreenHeight}
    style={[styles.w100, canUseTouchScreen ? styles.mt5 : styles.mt2]}
    onPress={submitAndNavigateToNextPage}
    text={buttonText}
    />

    <ButtonWithDropdownMenu
    pressOnEnter
    isDisabled={shouldDisableButton}
    onPress={(_event, value) => confirm(value)}
    options={splitOrRequestOptions}
    buttonSize={CONST.DROPDOWN_BUTTON_SIZE.LARGE}
    style={[styles.mt2]}
    />

    Since we explicitly allow bubbling on the button in MoneyRequestAmountForm, these 2 buttons are pressed on hitting Enter at once.

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

    We need to make the allowBubble conditional and disable it when in editing mode:

                    <Button
                        success
    -                   allowBubble
    +                   allowBubble={!isEditing}
                        pressOnEnter
                        medium={isExtraSmallScreenHeight}
                        style={[styles.w100, canUseTouchScreen ? styles.mt5 : styles.mt2]}
                        onPress={submitAndNavigateToNextPage}
                        text={buttonText}
                    />

    Result:

    split-editing-web.mov

    What alternative solutions did you explore? (Optional)

  10. zzarcon commented on Oct 7, 2023

    @zzarcon

    Proposal

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

    Pressing enter on the edit amount view when focused on the amount text field creates the split bills instead of going back to the confirmation page

    What is the root cause of that problem?

    The footer button on <MoneyRequestAmountForm> bubbles the enter event, causing a double action enter action, subsequently creating the bill when landing on the confirmation view.

    By removing the allowBubble from the button we will prevent the event to happen twice

    image
  11. maxconnectAbhi commented on Oct 7, 2023

    @maxconnectAbhi

    Proposal

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

    Pressing enter on the edit amount view when focused on the amount text field creates the split bills instead of going back to the confirmation page

    What is the root cause of that problem?

    The footer button on <MoneyRequestAmountForm> bubbles the enter event, causing a double action on enter action.

    <Button
    success
    allowBubble
    pressOnEnter
    medium={isExtraSmallScreenHeight}
    style={[styles.w100, canUseTouchScreen ? styles.mt5 : styles.mt2]}
    onPress={submitAndNavigateToNextPage}
    text={buttonText}
    />

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

    We need to remove the allowBubble from the button.

                     <Button
                        success
                        pressOnEnter
                        medium={isExtraSmallScreenHeight}
                        style={[styles.w100, canUseTouchScreen ? styles.mt5 : styles.mt2]}
                        onPress={submitAndNavigateToNextPage}
                        text={buttonText}
                    />
    

    What alternative solutions did you explore? (Optional)

    NA

  12. 40 remaining items

  13. melvin-bot commented on Oct 30, 2023

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.92-4 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 2023-11-06. 🎊

    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.

    • External issue reporter
    • Contributor that fixed the issue
    • Contributor+ that helped on the issue and/or PR

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

    • @eVoloshchak does not require payment (Eligible for Manual Requests)
    • @parasharrajat does not require payment (Eligible for Manual Requests)
  14. melvin-bot commented on Oct 30, 2023

    @melvin-bot

    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:

    • [@eVoloshchak / @parasharrajat] The PR that introduced the bug has been identified. Link to the PR:
    • [@eVoloshchak / @parasharrajat] 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:
    • [@eVoloshchak / @parasharrajat] A discussion in #expensify-bugs 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:
    • [@eVoloshchak / @parasharrajat] Determine if we should create a regression test for this bug.
    • [@eVoloshchak / @parasharrajat] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
    • [@mallenexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  15. parasharrajat commented on Oct 30, 2023

    @parasharrajat
    Member

    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:

    Regression Test Steps

    Web | Desktop
    1. Open the app.
    2. Click request money from FAB menu.
    3. Select Manual Tab and enter some amount.
    4. Press Enter key on keyboard, page should move to participant selection page.
    5. Select a participant and continue.
    6. Click on Amount section on the confirm page.
    7. Change amount and press Enter on keyboard.
    8. Observe that you are navigated back to Confirm page.
    9. Press Enter and observe that the request is submitted.

    Do you agree 👍 or 👎 ?

  16. parasharrajat commented on Oct 30, 2023

    @parasharrajat
    Member

    @mallenexpensify Please remove [HOLD Possible regression https://github.com//issues/28022] from the title.

  17. changed the title [-][HOLD for payment 2023-11-06] [HOLD Possible regression #28022][$500] Web - Split bill - Enter key in Edit amount page directly creates split bill[/-] [+][HOLD for payment 2023-11-06][$500] Web - Split bill - Enter key in Edit amount page directly creates split bill[/+] on Oct 30, 2023
  18. added
    Daily
    and removed
    Weekly
    on Nov 5, 2023
  19. mallenexpensify commented on Nov 8, 2023

    @mallenexpensify
    Contributor

    Is compensation due here? Wasn't sure because it looks like this was related to a regression.

  20. parasharrajat commented on Nov 8, 2023

    @parasharrajat
    Member

    Yeah, No compensation on this.

  21. mallenexpensify commented on Nov 8, 2023

    @mallenexpensify
    Contributor

    And... lastly(?) @eVoloshchak, are you owed any compensation?

  22. eVoloshchak commented on Nov 8, 2023

    @eVoloshchak
    Contributor

    No compensation for me either, this issue is just a regression from another PR

  23. mallenexpensify commented on Nov 9, 2023

    @mallenexpensify
    Contributor

    K, thanks! Closing (since I'm assuming, since this is a regression, any regression tests would be created as part of the original issue, comment if ya disagree).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions