Closed thienlnam closed 10 months ago
Triggered auto assignment to @dylanexpensify (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Platforms
in OP are β
)Waiting to add external until we confirm this is the desired functionality https://expensify.slack.com/archives/C05RECHFBEW/p1697553482299739
Remove the selected participants from the search results in the split / group chat flow
We always pass selected participants to the options selector here:
https://github.com/Expensify/App/blob/8bc86cc83447a0597ed5fcad0a904eaff12fec43/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js#L107-L115
Once selected, the option will always appear.
We have to make sure the selected participants react to the searchTerm
.
We need to:
We will be modifying the behaviour of the this section to filter according to searchTerm: https://github.com/Expensify/App/blob/f626744aa9bdac9c994164af7611a132be2d93c0/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js#L107-L115
We will filter out participants when searchTerm is not empty.
data: _.chain(participants)
.filter((participant) => searchTerm === '' || participant.searchText.includes(searchTerm))
.map((participant) => {
const isPolicyExpenseChat = lodashGet(participant, 'isPolicyExpenseChat', false);
return isPolicyExpenseChat ? OptionsListUtils.getPolicyExpenseReportOption(participant) : OptionsListUtils.getParticipantsOption(participant, personalDetails);
})
.value(),
Before mapping the participants, we will filter them by checking the presence of searchTerm in searchText
key for participants.
Job added to Upwork: https://www.upwork.com/jobs/~016fdba16a8b2fba60
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 (External
)
As a reminder, we still want to show the selected participant if they show up as part of the search results
Selected participants are always in the option list, it should only show up it matching the search term, if there's no search term then all should show up.
In here, we're pushing in the list of participants regardless of the search results, so all the participants will show at all time.
[],
, so the participants are not excluded from the search result.newChatOptions
and push it in the section instead. That means if there's search term, we'll only show participants that are contained in the search resultdata
so we don't have a duplicate participant.In 2, we can simplify by removing this part if the search term is empty, we'll push the section of participants normally
, since all the participants are likely already in each of the newChatOptions
list, so we'll filter the list of participants in the search result
should also work well in the no-search-term case.
An alternative is to fix inside getFilteredOptions
to have another section like filteredSelectedOptions
which will contains the "selected options that match the search result", we'll not exclude the participants
from the search result but push it in another section, with similar logic as above. And use a flag variable to control if we want this behavior when we use filteredSelectedOptions
in different places, or we want to keep existing behavior of filtering out the selected options.
@dukenv0307 's proposal here https://github.com/Expensify/App/issues/29836#issuecomment-1767485951 looks good and works well.
π π π C+ Reviewed
Current assignee @thienlnam is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
Due to the urgency on this - I'm going to take the PR so we can get it merged today, since I'm using part of Dukes solution we can do a partial payment since it appears to be 1am in your time
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.3.87-12 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-10-27. :confetti_ball:
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.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External 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:
@danielrvidal, @kevinksullivan, @thienlnam, @abdulrahuman5196 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
The PR that introduced the bug has been identified. Link to the PR: 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: 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:
Not a regression. Implementation of new expectation.
Determine if we should create a regression test for this bug.
Yes.
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.
1) From the FAB, send a message or split bill 2) On the participants selector, add a couple participants to the group / split 3) Verify that you see them at the top 4) Start searching for a user and verify the selected participants are gone 5) Search for a user that you have selected and verify they show up in the search results 6) Verify that when you search for something, the selected participants disappear unless they are part of the search results
@kevinksullivan
I think @kevinksullivan is off until next week so will get back to it then. I don't have test rail set up unfortunately so couldn't figure out where to put the tests.
Due to the urgency on this - I'm going to take the PR so we can get it merged today, since I'm using part of Dukes solution we can do a partial payment since it appears to be 1am in your time
@thienlnam can you assign me to this issue for payment purpose, thanks!
π£ @abdulrahuman5196 π An offer has been automatically sent to your Upwork account for the Reviewer role π Thanks for contributing to the Expensify app!
π£ @dukenv0307 π 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 π
Just a note here @kevinksullivan when you get back, this was a deploy blocker and required an urgent fix so I used part of @dukenv0307's solution and added it myself so that only requires a partial payment (I believe 50% is fair?)
And then full payment for the C+ that reviewed the PR
You may need to adjust the automated offers that were sent out
I used part of @dukenv0307's solution and added it myself so that only requires a partial payment (I believe 50% is fair?)
I'm good with this, thank you!
@abdulrahuman5196 can you accept the offer in upwork? Lmk here once you've done so!
Paid @dukenv0307
@kevinksullivan accepted the offer
all set
If you havenβt already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: Version 1.3.83-1 (1.3.83-1) 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: Slack conversation: https://expensify.slack.com/archives/C05RECHFBEW/p1697553482299739
Action Performed:
Break down in numbered steps
Expected Result:
When you start searching, the selected participants should not show up unless they are part of the search results. When the search text is empty, the selected participants should show up again
Actual Result:
Selected participants are always in the option list
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Yes, but it's confusing on smaller screens
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop
https://files.slack.com/files-pri/T047TPA624F-F061DSHBHAS/screenshot_2023-10-17_at_3.55.35_pm.pngView all open jobs on GitHub
Upwork Automation - Do Not Edit