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] Split Bill - Amount turns to grayed out when User press Ctrl+Enter in Group conversation IOU #27043

Closed
1 of 6 tasks
lanitochka17 opened this issue Sep 8, 2023 · 26 comments
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 Sep 8, 2023

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


Action Performed:

  1. Navigate to staging.new.expensify.com
  2. Click the '+' button in a Group conversation
  3. Select Split Bill option
  4. Enter an amount and press Next
  5. Deselect all the participants of the list by using the arrow keys and ENTER
  6. Press Ctrl+Enter

Expected Result:

Nothing should happens when user press Ctrl+Enter

Actual Result:

Amount field turns to grayed out

Workaround:

Unknown

Platforms:

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

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

Version Number: 1.3.66-1

Reproducible in staging?: Yes

Reproducible in production?: Yes

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

Bug6193153_Recording__936.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/~0138924214c461038e
  • Upwork Job ID: 1701240648855633920
  • Last Price Increase: 2023-09-18
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 8, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 8, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 8, 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

@bernhardoj
Copy link
Contributor

bernhardoj commented Sep 9, 2023

Proposal

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

Pressing CTRL+ENTER in the split bill confirmation list will disable the amount and description.

What is the root cause of that problem?

The money request confirmation list page uses OptionsSelector to show the list. On the page, we subscribe to CTRL+ENTER keyboard shortcut that will trigger onConfirmSelection.

this.unsubscribeCTRLEnter = KeyboardShortcut.subscribe(
CTRLEnterConfig.shortcutKey,
() => {
if (this.props.canSelectMultipleOptions) {
this.props.onConfirmSelection();
return;
}

onConfirmSelection will call confirm that sets didConfirm state to true.

onConfirmSelection={confirm}

const confirm = useCallback(
(paymentMethod) => {
setDidConfirm(true);
if (_.isEmpty(selectedParticipants)) {
return;
}
if (props.iouType === CONST.IOU.MONEY_REQUEST_TYPE.SEND) {
if (!paymentMethod) {
return;
}
Log.info(`[IOU] Sending money via: ${paymentMethod}`);
onSendMoney(paymentMethod);
} else {
onConfirm(selectedParticipants);
}
},
[selectedParticipants, onSendMoney, onConfirm, props.iouType],
);

If didConfirm is true, the amount and description will be disabled.

disabled={didConfirm || props.isReadOnly}

However, didConfirm is still set to true even though there is no participant selected.

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

Set the didConfirm state to true if there is some selected participant.

if (_.isEmpty(selectedParticipants)) return;
setDidConfirm(true);

We can take a safer approach by setting the didConfirm state to true before onSendMoney and onConfirm, but I didn't see any case where paymentMethod is empty.

What alternative solutions did you explore? (Optional)

  1. Pass a new props to OptionsSelector to disable onConfirmSelection. It will be disabled if selectedParticipants is empty.
  2. Pass nothing to onConfirmSelection if selectedParticipants is empty.
onConfirmSelection={_.isEmpty(selectedParticipants) ? undefined : onConfirm}

@melvin-bot melvin-bot bot added the Overdue label Sep 11, 2023
@maddylewis maddylewis added the External Added to denote the issue can be worked on by a contributor label Sep 11, 2023
@melvin-bot melvin-bot bot changed the title Split Bill - Amount turns to grayed out when User press Ctrl+Enter in Group conversation IOU [$500] Split Bill - Amount turns to grayed out when User press Ctrl+Enter in Group conversation IOU Sep 11, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 11, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 11, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 11, 2023

Current assignee @maddylewis is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Sep 11, 2023

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

@maddylewis
Copy link
Contributor

adding external label to review proposal

@melvin-bot melvin-bot bot removed the Overdue label Sep 11, 2023
@ArekChr
Copy link
Contributor

ArekChr commented Sep 13, 2023

It looks like I can't even select and unselect participants by mouse

Nagranie.z.ekranu.2023-09-13.o.11.41.11.mov

@ArekChr
Copy link
Contributor

ArekChr commented Sep 13, 2023

Set the didConfirm state to true if there is some selected participant.

@bernhardoj Where exactly do you suggest this change?

@bernhardoj
Copy link
Contributor

@ArekChr In confirm function

const confirm = useCallback(
(paymentMethod) => {
setDidConfirm(true);
if (_.isEmpty(selectedParticipants)) {
return;
}

We will switch the position of setDidConfirm and the if

@bernhardoj
Copy link
Contributor

bernhardoj commented Sep 13, 2023

It looks like I can't even select and unselect participants by mouse

I can't find any report yet, but looks like this is a recent regression.

EDIT: regression from #26501

isSelected={Boolean(_.find(selectedOptions, (option) => option.accountID === item.accountID || option.name === item.searchText))}

The PR add || option.name === item.searchText condition. On the money request page, both option.name and item.searchText is undefined, so it's always true.

@ArekChr
Copy link
Contributor

ArekChr commented Sep 14, 2023

I think we should put this issue on hold until regression with selecting participants will be fixed

@maddylewis
Copy link
Contributor

@ArekChr - will you link the fix that you're suggesting we hold for?

@bernhardoj
Copy link
Contributor

Here is the PR that fixes it and it's already merged. I tested on the main and it is fixed.

@melvin-bot melvin-bot bot added the Overdue label Sep 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 18, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 18, 2023

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

@maddylewis
Copy link
Contributor

@ArekChr will you confirm -- was issue #27043 totally fixed by a separate issue (#27350)?

are we good to close this one out without any further action?

@melvin-bot melvin-bot bot removed the Overdue label Sep 18, 2023
@bernhardoj
Copy link
Contributor

@maddylewis #27350 is to fix this issue #27043 (comment).

@ArekChr
Copy link
Contributor

ArekChr commented Sep 19, 2023

@maddylewis Confirming that issue has been fixed

@melvin-bot melvin-bot bot added the Overdue label Sep 21, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 22, 2023

@ArekChr @maddylewis this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot
Copy link

melvin-bot bot commented Sep 22, 2023

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

@maddylewis
Copy link
Contributor

thank you for confirming!

@melvin-bot melvin-bot bot removed the Overdue label Sep 22, 2023
@bernhardoj
Copy link
Contributor

@maddylewis this GH issue is still happening. The issue that we are talking about is this one.

@bernhardoj
Copy link
Contributor

@maddylewis please check the above comment.

@bernhardoj
Copy link
Contributor

@maddylewis bump

@bernhardoj
Copy link
Contributor

@maddylewis could you recheck this one?

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

4 participants