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 2023-11-06][$500] Web - Split bill - Enter key in Edit amount page directly creates split bill #29051

Closed
2 of 6 tasks
izarutskaya opened this issue Oct 7, 2023 · 37 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@izarutskaya
Copy link

izarutskaya commented Oct 7, 2023

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
@izarutskaya izarutskaya 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 Oct 7, 2023
@melvin-bot melvin-bot bot 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 Oct 7, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 7, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 7, 2023

Triggered auto assignment to @mallenexpensify (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 Oct 7, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 7, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 7, 2023

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

@zzarcon
Copy link

zzarcon commented Oct 7, 2023

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?

@paultsimura
Copy link
Contributor

paultsimura commented Oct 7, 2023

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)

@zzarcon
Copy link

zzarcon commented Oct 7, 2023

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

@maxconnectAbhi
Copy link

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

@mallenexpensify
Copy link
Contributor

@eVoloshchak can you please review the proposals above?

@melvin-bot melvin-bot bot removed the Overdue label Oct 10, 2023
@mkhutornyi
Copy link
Contributor

I think this is regression from #28022 and PR author/reviewer should handle this as it's within regression period.

@mallenexpensify mallenexpensify changed the title [$500] Web - Split bill - Enter key in Edit amount page directly creates split bill [HOLD Possible regression #28022][$500] Web - Split bill - Enter key in Edit amount page directly creates split bill Oct 11, 2023
@mallenexpensify mallenexpensify removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 11, 2023
@mallenexpensify
Copy link
Contributor

Thanks @mkhutornyi , put on hold.

@parasharrajat
Copy link
Member

This was supposed to work based on what we implemented in the bubbling for Main Button. Looks like when the event bubbles, the page behind the screen gets focused just in time thus it ends up firing the event.

I was expecting that isFocused on the Button would prevent hidden buttons from firing.

@parasharrajat
Copy link
Member

Unfortunately, none of the proposals above make a best solution.

@mallenexpensify
Copy link
Contributor

@parasharrajat do you agree that this is a regression from #28022 that you worked on? Trying to figure out what the next step is here

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Oct 24, 2023
@parasharrajat
Copy link
Member

parasharrajat commented Oct 24, 2023

Because it is a regression from my PR, I have created a PR to fix this. There shouldn't be any need to make this change based on isFocused check but it is not working #29051 (comment). I do not want to implement any hacks so preventing bubbling on the edit page seems fine.

@melvin-bot
Copy link

melvin-bot bot commented Oct 25, 2023

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

@tylerkaraszewski
Copy link
Contributor

Fix is merged.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 30, 2023
@melvin-bot melvin-bot bot changed the title [HOLD Possible regression #28022][$500] Web - Split bill - Enter key in Edit amount page directly creates split bill [HOLD for payment 2023-11-06] [HOLD Possible regression #28022][$500] Web - Split bill - Enter key in Edit amount page directly creates split bill Oct 30, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 30, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 30, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 30, 2023

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)

@melvin-bot
Copy link

melvin-bot bot commented Oct 30, 2023

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:

@parasharrajat
Copy link
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 👎 ?

@parasharrajat
Copy link
Member

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

@mallenexpensify mallenexpensify 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 Oct 30, 2023
@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Nov 5, 2023
@mallenexpensify
Copy link
Contributor

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

@melvin-bot melvin-bot bot removed the Overdue label Nov 8, 2023
@parasharrajat
Copy link
Member

Yeah, No compensation on this.

@mallenexpensify
Copy link
Contributor

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

@eVoloshchak
Copy link
Contributor

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

@mallenexpensify
Copy link
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
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

9 participants