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

[Awaiting Payment 2024-09-17][$250] iOS - Search - Inconsistency in selection mode behavior after holding and unholding expense #47446

Closed
1 of 6 tasks
lanitochka17 opened this issue Aug 14, 2024 · 52 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Aug 14, 2024

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: 9.0.20-4
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause - Internal Team

Action Performed:

  1. Launch New Expensify app
  2. Go to workspace chat
  3. Submit an expense
  4. Go to Search
  5. Long press on the expense
  6. Tap Select
  7. Tap on the dropdown > Hold > Enter a reason and save it
  8. Note that selection mode persists after holding the expense
  9. Refresh the Search page by switching between Expense and Shared tab (or restart app)
  10. Long press on the expense > Tap Select
  11. Tap on the dropdown > Unhold
  12. Note that selection mode is dismissed after unholding the expense

Expected Result:

There should be consistency in the selection mode after holding and unholding the expense from Search

Actual Result:

In Step 8, after holding the expense, selection mode persists
In Step 12, after unholding the expense, selection mode is dismissed

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

ScreenRecording_08-15-2024.00-12-00_1.MP4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~018d4437d2bef15d58
  • Upwork Job ID: 1824124311599546509
  • Last Price Increase: 2024-08-15
  • Automatic offers:
    • dukenv0307 | Reviewer | 103552021
    • cretadn22 | Contributor | 103552023
    • Krishna2323 | Contributor | 103692759
Issue OwnerCurrent Issue Owner: @sonialiap
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 14, 2024
Copy link

melvin-bot bot commented Aug 14, 2024

Triggered auto assignment to @sonialiap (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@lanitochka17
Copy link
Author

@sonialiap FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@lanitochka17
Copy link
Author

We think that this bug might be related to #wave-collect - Release 1

@cretadn22
Copy link
Contributor

cretadn22 commented Aug 14, 2024

Edited by proposal-police: This proposal was edited at 2024-08-14 18:02:24 UTC.

Proposal

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

What is the root cause of that problem?

Let's see the current code

onSelected: () => {
if (isOffline) {
setOfflineModalOpen?.();
return;
}
if (selectionMode?.isEnabled) {
turnOffMobileSelectionMode();
}
Navigation.navigate(ROUTES.TRANSACTION_HOLD_REASON_RHP);

shouldCloseModalOnSelect: true,
onSelected: () => {
if (isOffline) {
setOfflineModalOpen?.();
return;
}
clearSelectedTransactions();
if (selectionMode?.isEnabled) {
turnOffMobileSelectionMode();
}
SearchActions.unholdMoneyRequestOnSearch(hash, selectedTransactionsKeys);
},
});
}

As this implementation, we want to turn off selection mode when user click hold/unhold option

But when clicking in hold option we don't call clearSelectedTransactions function. Thus, the selection mode is toggle on again because this code

if (selectedKeys.length > 0 && !selectionMode?.isEnabled) {

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

I believe the best approach is to invoke clearSelectedTransactions() without turning off selection mode when the user clicks the hold/unhold button, similar to how we handle the delete button.

What alternative solutions did you explore? (Optional)

If we want to turn off selection mode, we need to invoke both clearSelectedTransactions and turnOffMobileSelectionMode.

If we want to keep selected option, we shouldn't invoke both clearSelectedTransactions and turnOffMobileSelectionMode.

We should apply the solution to the hold/unhold/delete button to ensure consistency.

@Krishna2323
Copy link
Contributor

Krishna2323 commented Aug 14, 2024

Edited by proposal-police: This proposal was edited at 2023-10-14T10:21:00Z.

Proposal

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

iOS - Search - Inconsistency in selection mode behavior after holding and unholding expense

What is the root cause of that problem?

Selected transactions are cleared when unhold is clicked.

clearSelectedTransactions();

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

We should not clear the selected transactions.

What alternative solutions did you explore? (Optional)

We can also remove turnOffMobileSelectionMode(); from all options.

if (selectionMode?.isEnabled) {
turnOffMobileSelectionMode();
}

@cretadn22
Copy link
Contributor

Updated proposal to detail the root cause and solution

@sonialiap sonialiap added the External Added to denote the issue can be worked on by a contributor label Aug 15, 2024
@melvin-bot melvin-bot bot changed the title iOS - Search - Inconsistency in selection mode behavior after holding and unholding expense [$250] iOS - Search - Inconsistency in selection mode behavior after holding and unholding expense Aug 15, 2024
Copy link

melvin-bot bot commented Aug 15, 2024

Job added to Upwork: https://www.upwork.com/jobs/~018d4437d2bef15d58

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 15, 2024
Copy link

melvin-bot bot commented Aug 15, 2024

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

@dukenv0307
Copy link
Contributor

@cretadn22's proposal look good to me. I think we should clear the selected transactions and dismiss the selection mode

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Aug 16, 2024

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

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 16, 2024
Copy link

melvin-bot bot commented Aug 16, 2024

📣 @dukenv0307 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Aug 16, 2024

📣 @cretadn22 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@sonialiap sonialiap added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Aug 16, 2024
Copy link

melvin-bot bot commented Aug 16, 2024

Triggered auto assignment to @dylanexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@sonialiap
Copy link
Contributor

@dylanexpensify I'm OOO Aug 19-30, adding leave buddy.
Status: proposal selected, waiting for build

@rlinoz
Copy link
Contributor

rlinoz commented Aug 16, 2024

I think we should clear the selected transactions and dismiss the selection mode

I am not 100% sure about this, I know we decided not to clear it when Downloading the CSV, not sure what we want to do here.

cc: @Expensify/design

@dannymcclain
Copy link
Contributor

@Expensify/design do you remember where we landed on this? I feel like we did have some convo back and forth about whether or not to keep items selected after performing an action.

It's interesting because if you use the Delete action we're definitely going to clear the selection and exit select mode (we pretty much have to haha). So I could definitely see an argument for just clearing the selection and exiting select mode after performing an action... But I can also see a case for keeping things selected so you can perform multiple bulk actions in succession. What do y'all think?

@Krishna2323
Copy link
Contributor

@dukenv0307, thanks a lot for checking again 🙏🏻

@cretadn22
Copy link
Contributor

cretadn22 commented Aug 16, 2024

@dukenv0307

First, the root cause in @Krishna2323's proposal missing a lot of ideas
Second, also see his solution

We should not clear the selected transactions.

It should be an output from the design team rather than a proposal from a contributor.

@Krishna2323
Copy link
Contributor

@rlinoz, can you please reassign it to me based on #47446 (comment) #47446 (comment) ?

@rlinoz
Copy link
Contributor

rlinoz commented Aug 20, 2024

Hey sorry about the confusion here we should not have assigned someone at the time we did, but in the end the solution is just very similar, like clearing the checkboxes or keeping them selected touches mostly the same area of the code, so let's keep things the way they are right now.

@Krishna2323
Copy link
Contributor

@rlinoz, while the solution might look similar, incorporating the solution from another proposal and claiming it as original isn't right in any way. Here, you were about to assign me, but @cretadn22 claimed that he also included the option to clear the selection. However, that wasn't true, he added the solution from my proposal. This doesn't seem fair to me at all 🥲. I'm sorry to argue🙏🏻, but it's very hard for me to accept this assignment. I don't know why I always get in these types of situation 😕. Still, I respect your decision, and I won’t ask for this assignment.

What @cretadn22 did is clearly a violation of the guidelines.

Note: Before submitting a proposal on an issue, be sure to read any other existing proposals. ALL NEW PROPOSALS MUST BE DIFFERENT FROM EXISTING PROPOSALS. The difference should be important, meaningful or considerable.

@dylanexpensify
Copy link
Contributor

Hi team, after discussing internally, we're going to do the following:

  • @Krishna2323 will be assigned the job given his solution (aka keep the checkboxes selection) was the one we're implementing after design input
  • Given @cretadn22's proposal had the solution we aren't implementing (aka clear the checkboxes), but only added after @Krishna2323's proposal the alternative solution of keeping them selected, we think it's fair to go with the proposal that had the original correct solution in place
  • We understand we had some communication issues here, and we definitely apologize for this as we tried to work through the scenario. As a result, we'd like to also pay the amount of $125 for the work you've already done @cretadn22

Thank you for your understanding of our decision, and we do apologize for the confusion here!

@Krishna2323
Copy link
Contributor

@rlinoz, could you please check the comment above and assign me? 🙏

@rlinoz rlinoz assigned Krishna2323 and unassigned cretadn22 Aug 26, 2024
Copy link

melvin-bot bot commented Aug 26, 2024

📣 @Krishna2323 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@rlinoz
Copy link
Contributor

rlinoz commented Aug 26, 2024

I though that was done already, sorry

@trjExpensify
Copy link
Contributor

Moving this into polish.

As a reminder for the BZ assigned, let's try not to leave ambiguous expected results in the OP when triaging.

Expected Result:
There should be consistency in the selection mode after holding and unholding the expense from Search

This doesn't tell us what the behaviour should be, just that it's not the same when you hold or unhold.

@Krishna2323
Copy link
Contributor

Sorry for delay, I missed this one as it was labeled weekly, will raise the PR within 24 hours.

@Krishna2323
Copy link
Contributor

@dukenv0307, PR ready for review ^

@dylanexpensify
Copy link
Contributor

merged!

@rlinoz rlinoz added Awaiting Payment Auto-added when associated PR is deployed to production and removed Reviewing Has a PR in review labels Sep 13, 2024
@rlinoz
Copy link
Contributor

rlinoz commented Sep 13, 2024

I think this has been deployed to prod 3 days ago #48791 (comment)

@melvin-bot melvin-bot bot added the Overdue label Sep 13, 2024
@rlinoz rlinoz changed the title [$250] iOS - Search - Inconsistency in selection mode behavior after holding and unholding expense [Awaiting Payment 2024-09-17][$250] iOS - Search - Inconsistency in selection mode behavior after holding and unholding expense Sep 13, 2024
@sonialiap
Copy link
Contributor

@rlinoz
Copy link
Contributor

rlinoz commented Sep 16, 2024

Just changing the ⭐

@melvin-bot melvin-bot bot removed the Overdue label Sep 16, 2024
@sonialiap
Copy link
Contributor

Everyone has been paid ✔️

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. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
No open projects
Status: Done
Development

No branches or pull requests

10 participants