-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 2024-04-03] [$500] IOU - CMD+ENTER command takes you to the IOU confirmation page without selecting members #35377
Comments
Triggered auto assignment to @muttmuure ( |
Job added to Upwork: https://www.upwork.com/jobs/~01072c9895579ae1ce |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.IOU - CMD+ENTER command takes you to the IOU confirmation page without selecting members What is the root cause of that problem?The main problem with issue is that we don't have any condition for confirm selection App/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js Lines 274 to 280 in 8c0eee2
What changes do you think we should make in order to solve the problem?To fix this issue we can add new condition
App/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js Lines 274 to 280 in 8c0eee2
And here App/src/pages/iou/request/MoneyTemporaryForRefactorRequestParticipantsSelector.js Lines 262 to 268 in c53276d
What alternative solutions did you explore? (Optional)As an alternative, we can select a current participant and use logic during selecting an element when we have selectedOptions === 0 In order to preserve the old logic and make these changes for all lists for uniformity (Which is logical for me, but we can always add a param if we want to disable new logic)
App/src/components/SelectionList/BaseSelectionList.tsx Lines 372 to 376 in 82ae62f
|
This comment was marked as off-topic.
This comment was marked as off-topic.
ProposalPlease re-state the problem that we are trying to solve in this issue.IOU - CMD+ENTER command takes you to the IOU confirmation page without selecting members What is the root cause of that problem?We return from onConfirm when the participants length is not greater than one. App/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js Lines 274 to 280 in 8c0eee2
What changes do you think we should make in order to solve the problem?We should check the length of the participants, if there is only one participant we will call Steps:
Update second parameter to: () => {
if (onConfirm && flattenedSections.selectedOptions.length) {
onConfirm();
return;
}
selectFocusedOption();
},
App/src/pages/iou/request/MoneyTemporaryForRefactorRequestParticipantsSelector.js Line 262 in 82ae62f
Add a if check here and use the parameter passed from const handleConfirmSelection = useCallback(
(lastfocusedOption) => {
if (participants.length === 0 && lastfocusedOption) {
addSingleParticipant(lastfocusedOption);
}
Add
We pass onConfirm callback in from multiple components, we should also update there if needed, we use in Resultaccess.mp4AlternativeWe can call Add a if check here and use the parameter passed from () => {
if (onConfirm && flattenedSections.selectedOptions.length) {
onConfirm();
return;
}
selectFocusedOption();
}, |
@ZhenjaHorbach, your proposal was updated with alternative after mine initial solution. |
Oh, sorry |
Yeah, the first one was closed. |
@ZhenjaHorbach I think it's better we alternatively select the focused option instead blocking it. @Krishna2323 Could you elaborate on this?
What to update? |
@mollfpr, proposal updated to include more details. |
In fact, being able to select the current element creates a lot of questions How should it behave when we have already selected several elements? But if we want to save old logic and only add the ability to choose an element when we don't have selected elements |
Go to confirm page.
Select the focused element and go to the confirm page. Both scenarios conclude the same instinct. |
@mollfpr, the only change here will be to select and go to confirm page with the currently focused option if we haven't selected any participant and we press cmd+enter, currently we go to confirm page without selecting any member. Everything else will work the same way. |
@mollfpr, sorry I thought you were asking. |
@ZhenjaHorbach, I already mentioned that in my alternative solution. |
@Krishna2323 I try your main solution but it's not working well when multiple member selected and press CMD+Enter. Screen.Recording.2024-02-01.at.23.52.19.mp4@ZhenjaHorbach Have you encountered a similar issue on the other options list? I might be considering your first proposal. It's similar to the member invite page where it does nothing on pressing CMD+Enter when there's no member selected. |
Actually yes ) Plus I found an additional place where this should be fixed) |
@mollfpr, I think blocking isn't a great idea and in the result section in my proposal, you can see that it works fine with multiple participants. We should edit the behaviour of blocking if some component already uses it. |
@Krishna2323 Yeah, in your video, it works fine without any focused option.
Also, your proposal seems to not resolve the main issue. I still navigate to the confirm page without selecting any members. Screen.Recording.2024-02-02.at.01.25.33.mp4It's not entirely blocking, but there's nothing to process. Also, the expected result seems toward it. @muttmuure May I get your opinion on the expected behavior? Is pressing CMD+Enter on no member selected and there's an option focused should process the selection or not? |
@mollfpr, yeah, thanks for the feedback, will update proposal for that fix once we confirm the expected result. |
@Krishna2323 please raise your PR when ready |
@mollfpr, PR ready for review. |
@mollfpr friendly bump for review. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.56-8 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 2024-04-03. 🎊 For reference, here are some details about the assignees on this issue:
|
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:
|
@muttmuure, friendly bump for payments :) |
I couldn't find the offending PR.
The regression step should be enough.
@muttmuure Could you create the payment summary? I'll do manual request in NewDot |
@muttmuure, bump for payments 🙇🏻 |
Friendly bump @muttmuure |
Looking! |
$500 for @mollfpr for C+ $500 for @Krishna2323 C (paid in Upwork |
QA added, payment summary above. Sorry for the delay. |
$500 approved for @mollfpr |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 1.4.33-0
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
Expensify/Expensify Issue URL:
Issue reported by: Applause internal team
Slack conversation:
Action Performed:
Expected Result:
The CMD + ENTER command should not work in the member selection menu without selected members.
Actual Result:
The CMD + ENTER command takes you to the IOU confirmation page without selecting members.
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6360685_1706608112809.Recording__1215.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: