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] Chat - Incorrect search result & Show More' Dropdown shown when one search result displayed #37267
Precondition: user Signed In with expensifail account
Tap on FAB
Tap on "Start Chat"
Search for any user e.g. "omp1"
Tap on "Show More" dropdown button
Expected Result:
The search result page should be properly displayed
Actual Result:
Incorrect search result counter and "Show More' Dropdown button shown when one search result displayed. When the user taps on the 'Show More' button, nothing happens.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-]Chat - Incorrect search result & Show More' Dropdown shown when one search result displayed[/-][+][$500] Chat - Incorrect search result & Show More' Dropdown shown when one search result displayed[/+]on Feb 27, 2024
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
BaseOptionList only re-renders based on the above conditions. Because of that when renderFooterContent changed, BaseOptionList won't re-render. That's the root cause.
What changes do you think we should make in order to solve the problem?
Add a new props called shouldShowFooter to our BaseOptionsList. We should only render the footer when shouldShowFooter is true. Also update the condition inside memo function to include shouldShowFooter props.
Please re-state the problem that we are trying to solve in this issue.
Incorrect search result counter and "Show More' Dropdown button shown when one search result displayed. When the user taps on the 'Show More' button, nothing happens.
What is the root cause of that problem?
This is the regression of this PR #31606, we pass the wrong sections prop into BaseOptionList that makes this component not re-render when the options is changed
Activity
melvin-bot commentedon Feb 27, 2024
Job added to Upwork: https://www.upwork.com/jobs/~0113928963c9c991f9
[-]Chat - Incorrect search result & Show More' Dropdown shown when one search result displayed[/-][+][$500] Chat - Incorrect search result & Show More' Dropdown shown when one search result displayed[/+]melvin-bot commentedon Feb 27, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane (
External)melvin-bot commentedon Feb 27, 2024
Triggered auto assignment to @puneetlath (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.github-actions commentedon Feb 27, 2024
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
melvin-bot commentedon Feb 27, 2024
Current assignee @puneetlath is eligible for the Engineering assigner, not assigning anyone new.
izarutskaya commentedon Feb 27, 2024
We think that this bug might be related to #vip-vsb
CC @quinthar
benjaminbennet commentedon Feb 27, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Incorrect search result & Show More' Dropdown shown when one search result displayed
What is the root cause of that problem?
Let's take a look here:
App/src/components/OptionsList/BaseOptionsList.tsx
Lines 276 to 284 in 668df99
BaseOptionListonly re-renders based on the above conditions. Because of that whenrenderFooterContentchanged,BaseOptionListwon't re-render. That's the root cause.What changes do you think we should make in order to solve the problem?
Add a new props called
shouldShowFooterto ourBaseOptionsList. We should only render the footer whenshouldShowFooteris true. Also update the condition insidememofunction to includeshouldShowFooterprops.Finally update the
BaseOptionsSelectorcomponent:What alternative solutions did you explore? (Optional)
N/A
dukenv0307 commentedon Feb 27, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Incorrect search result counter and "Show More' Dropdown button shown when one search result displayed. When the user taps on the 'Show More' button, nothing happens.
What is the root cause of that problem?
This is the regression of this PR #31606, we pass the wrong
sectionsprop intoBaseOptionListthat makes this component not re-render when the options is changedhttps://github.com/Expensify/App/pull/31606/files#diff-a9bb6f5b7c223e3c0a5f49b1a55692c74a63287a411527bbac37cabd95b2ffe2
What changes do you think we should make in order to solve the problem?
we should pass
sectionsstate here instead ofprops.sectionsApp/src/components/OptionsSelector/BaseOptionsSelector.js
Line 563 in 668df99
What alternative solutions did you explore? (Optional)
NA
sobitneupane commentedon Feb 27, 2024
I could not reproduce the issue.
@dukenv0307 @benjaminbennet Is the issue still reproducible? If yes, Can you please share the steps to reproduce the issue?
puneetlath commentedon Feb 27, 2024
I'm also not able to reproduce. Going to close, but feel free to comment if you're able to reproduce it.
melvin-bot commentedon Feb 28, 2024
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.