App
App copied to clipboard
[$250] Filters button should not be shown on Search page during "select mode".
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.28-2 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: @dannymcclain Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1725380044951249
Action Performed:
- Go to staging.new.expensify.com
- Click Search and select few expenses
Expected Result:
Filters button should not be shown on search during select mode
Actual Result:
Filters button are shown on search during select mode
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
- [ ] Android: Native
- [ ] Android: mWeb Chrome
- [ ] iOS: Native
- [ ] iOS: mWeb Safari
- [x] MacOS: Chrome / Safari
- [ ] MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidence
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~021832173197655902215
- Upwork Job ID: 1832173197655902215
- Last Price Increase: 2024-09-06
Issue Owner
Current Issue Owner: @jjcoffee
Triggered auto assignment to @mallenexpensify (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.
Edited by proposal-police: This proposal was edited at 2024-09-07 20:52:11 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
Filters button should not be shown on Search page during "select mode".
What changes do you think we should make in order to solve the problem?
currently the filter button is always shown https://github.com/Expensify/App/blob/adc29abfa4bb354176966d70b0d52471a5c94a40/src/components/Search/SearchPageHeader.tsx#L314-L319
What alternative solutions did you explore? (Optional)
We should modify this to ensure the button is only shown if selectedTransactionsKeys.length==0
or Alternatively, we can use headerButtonsOptions.length == 0 unlike the condition of the selected button :
{selectedTransactionsKeys.length === 0 && (
<Button
text={translate('search.filtersHeader')}
icon={Expensicons.Filters}
onPress={() => Navigation.navigate(ROUTES.SEARCH_ADVANCED_FILTERS)}
medium
/>
)}
POC
https://github.com/user-attachments/assets/821acbc9-28a3-4612-a6cb-5fcddd3c4224
Proposal
Please re-state the problem that we are trying to solve in this issue.
Filters button should not be shown on Search page during "select mode".
What is the root cause of that problem?
We show the selected button if headerButtonsOptions.length > 0 and always showing the filters button without any conditioning
https://github.com/Expensify/App/blob/6e500c23d601110f3ed36d7c278edd35706395af/src/components/Search/SearchPageHeader.tsx#L303-L319
What changes do you think we should make in order to solve the problem?
We should update it to if-else condition, to show the selected button if headerButtonsOptions.length > 0, and else show the filters button
{headerButtonsOptions.length > 0 ? (
<ButtonWithDropdownMenu
onPress={() => null}
shouldAlwaysShowDropdownMenu
pressOnEnter
buttonSize={CONST.DROPDOWN_BUTTON_SIZE.MEDIUM}
customText={translate('workspace.common.selected', {selectedNumber: selectedTransactionsKeys.length})}
options={headerButtonsOptions}
isSplitButton={false}
/>
) : (
<Button
text={translate('search.filtersHeader')}
icon={Expensicons.Filters}
onPress={() => Navigation.navigate(ROUTES.SEARCH_ADVANCED_FILTERS)}
medium
/>
)}
What alternative solutions did you explore? (Optional)
Hi, I'm Wiktor Gut from SWM agency, please assign me this issue!
Job added to Upwork: https://www.upwork.com/jobs/~021832173197655902215
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee (External)
@jjcoffee plz review the proposals above, thx
Updated proposal
Added a minor clarification explaining why I used the headerButtonsOptions.length == 0 condition, but the overall solution idea remains unchanged
Hi @luacmartins, can you please take a peek at this bug and assign it? It's a pretty small thing connected directly to Search, so I'd love to handle it quickly as part of SWM π
Sounds like @Guccio163 is going to work on this!
:ribbon::eyes::ribbon: C+ reviewed
Triggered auto assignment to @thienlnam, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
I think the existing proposals need to be reviewed first base on this contributing guideline
@nyomanjyotisa Oh sorry, I hadn't encountered that before! In that case both proposals are basically the same, so I think we're good to go with @abzokhattab's proposal since his was first.
:ribbon::eyes::ribbon: C+ reviewed
Current assignee @thienlnam is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
I believe the if-else condition proposed in my solution is necessary, since we want to prevent redundant/unnecessary checks and optimize performance
π£ @jjcoffee π An offer has been automatically sent to your Upwork account for the Reviewer role π Thanks for contributing to the Expensify app!
Sorry everyone, this is part of the Search project and @Guccio163 is working on this already.
@abzokhattab and @nyomanjyotisa , once the linked PR has been on production for 7 days, without a regression, I'll review this issue for potential payment. One key point to consider here is this from CONTRIBUTING.md .
You can propose solutions on any issue at any time, but if you propose solutions to jobs before the Help Wanted label is applied, you do so at your own risk. Proposals will not be reviewed until the label is added and there is always a chance that we might not add the label or hire an external contributor for the job.
That doesn't guarantee that no one else will be eligible for compensation, I'll update everyone at the end.
@luacmartins I think you closed this by mistake?
Oh for some reason my merge commit closed the issue. Reopening.
Deployed to production Sept 12 so payment should be due 2024-09-19. cc @mallenexpensify
- The PR that introduced the bug has been identified. Link to the PR: N/A - just a missed feature
- 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: N/A
- 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: B/A
- 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.
Regression Test Proposal
- Open Search page
- Ensure no reports are selected
- Verify that the
Filtersbutton is visible and thatX selectedis not visible - Select a few reports
- Verify that the
Filtersbutton is no longer visible and that theX selectedbutton becomes visible
Do we agree π or π
Thanks! No need for regression tests at this time, we'll add them as part of the project wrap up
Contributor: @jjcoffee paid $250 via Upwork
Thx!
@mallenexpensify Any update about potential payment based on this? Since the solution in my proposal was used in the PR
same, since my proposal was the selected solution. please let us know about any potential payments.
Thx!!
@nyomanjyotisa @abzokhattab sorry, but this was within the regression period and the Search project is being handled by SWM and myself, so we won't be able to issue additional payments at this time.
To provide more details...
- Proposals were submitted before
Help Wantedwas added. - @Guccio163 from SWM posts that they want to work on it.
- I add the
Externallabel to assign a C+ - I remove the
Help Wantedlabel
Based on the above, compensation isn't due. @Guccio163 if you referenced the proposals and used any code from those (for all or part of the PR), please comment and provide details. Thx