You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$500] Desktop/Web - IOU - CMD+Enter allows you to select users and WS into one Split Bill #29628
Prerequisites:
Use an HT account that already has WS in it or create one in advance.
Open New Expensify app
Log into your HT account
Click on the FAB button
Click on 'Request Money'
Choose 'Manual' and add an amount
Click on the "Split" button next to WS
Click on the "Split" button next to any user
Press CMD+Enter(CTRL+Enter)
Expected Result:
CMD+Enter commands should not work in forbidden cases such as Split Bill with normal user and WorkSpace at the same time
Actual Result:
The CMD+Enter command takes you to the final Split Bill page, which includes normal users and WS at the same time, although this is not allowed by the system
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
We allow onConfirmSelection to be carried out in NewChatPage also. Which tries to create a chat without selecting participants.
This results in abrupt navigation to Conceirge (as a fallback).
Current behaviour on pressing CTRL+Enter on newChat Page:
changed the title [-]Desktop/Web - IOU - CMD+Enter allows you to select users and WS into one Split Bill[/-][+][$500] Desktop/Web - IOU - CMD+Enter allows you to select users and WS into one Split Bill[/+]on Oct 16, 2023
@garrettmknight It seems the issue was fixed by another PR when we were about to merge this PR and if I remember correctly, we still should issue payment since this wasn't the contributor's fault. Could you handle it?
We've issued payment for work that turned out to be unnecessary, historically. I can do that this time, but @neonbhai I'd appreciate a little more urgency getting PRs up in the future. 🙇 Payment offer sent.
Activity
melvin-bot commentedon Oct 14, 2023
Triggered auto assignment to @garrettmknight (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Oct 14, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)neonbhai commentedon Oct 14, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
We can bypass Confirm button and navigate via shortcut even though confirm button is not shown.
What is the root cause of that problem?
We hide the confirm button when we don't want the user to progress. but we allow the shortcut to navigate without checking this.
What changes do you think we should make in order to solve the problem?
We should not navigate further if the confirm button is not on the screen.
In
BaseOptionsSelector, we will check for visibility of the confirm button before executing theonConfirmSelection()callback:App/src/components/OptionsSelector/BaseOptionsSelector.js
Lines 195 to 199 in fe282b4
Implementation:
shouldShowFooteris declared in the render block:App/src/components/OptionsSelector/BaseOptionsSelector.js
Lines 367 to 369 in fe282b4
We will have to declare it in the constructor to make it available to other functions. Add here:
And change
const shouldShowFootertothis.shouldShowFooterUpdate all mentions of
shouldShowFootertothis.shouldShowFooterUpdate this line to:
This makes sure we don't go to the invalid state of splitting with a workspace.
Behaviour After Change:
CTRLEnterstill allowsselectRowto to be called (equivalent of pressing enter):App/src/components/OptionsSelector/BaseOptionsSelector.js
Lines 195 to 207 in fe282b4
Which means user will go to manual request with the focused option. Same as pressing enter.
Making sure no regressions:
OptionsSelector is used in these places
Option lists that don't have a footer call
SelectRow()which is outside the condition we are focusing on.We will be blocking
onConfirmSelection()that is passed to option lists only when they have a footer. This is in Three Places in the app:MoneyRequestConfirmList
No regressions.
NewChatPage is also bugging:
We allow onConfirmSelection to be carried out in NewChatPage also. Which tries to create a chat without selecting participants.
This results in abrupt navigation to Conceirge (as a fallback).
Current behaviour on pressing CTRL+Enter on newChat Page:
Screencast.from.19-10-23.12.07.53.AM.IST.webm
This bug will also be fixed.
garrettmknight commentedon Oct 16, 2023
Reproduced, opening up.
melvin-bot commentedon Oct 16, 2023
Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.
melvin-bot commentedon Oct 16, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hoangzinh (
External)[-]Desktop/Web - IOU - CMD+Enter allows you to select users and WS into one Split Bill[/-][+][$500] Desktop/Web - IOU - CMD+Enter allows you to select users and WS into one Split Bill[/+]melvin-bot commentedon Oct 16, 2023
hoangzinh commentedon Oct 18, 2023
@neonbhai Thanks for your proposal. Can you check if it won't cause any regression bugs on options lists that don't have a footer?
55 remaining items
neonbhai commentedon Jan 8, 2024
PR ready for review!
pecanoro commentedon Jan 15, 2024
@garrettmknight It seems the issue was fixed by another PR when we were about to merge this PR and if I remember correctly, we still should issue payment since this wasn't the contributor's fault. Could you handle it?
garrettmknight commentedon Jan 16, 2024
We've issued payment for work that turned out to be unnecessary, historically. I can do that this time, but @neonbhai I'd appreciate a little more urgency getting PRs up in the future. 🙇 Payment offer sent.
garrettmknight commentedon Jan 16, 2024
Paid, closing.
neonbhai commentedon Jan 16, 2024
@garrettmknight Thank you!
hoangzinh commentedon Jan 16, 2024
Hi @garrettmknight can you help to issue payment for me as well? I helped review proposals, PR and completed the review check list already.
garrettmknight commentedon Jan 17, 2024
Sorry about that @hoangzinh - offer sent!
hoangzinh commentedon Jan 17, 2024
Accepted. Thanks @garrettmknight