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

[Hold for Payment 2024-09-19][$250][Search v2.1] Filters button should not be shown on Search page during "select mode". #48511

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

Comments

@m-natarajan
Copy link

m-natarajan commented Sep 3, 2024

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: 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:

  1. Go to staging.new.expensify.com
  2. 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
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

CleanShot 2024-09-03 at 11 13 12@2x

Snip - (32) New Expensify - Google Chrome

Add any screenshot/video evidence

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021832173197655902215
  • Upwork Job ID: 1832173197655902215
  • Last Price Increase: 2024-09-06
  • Automatic offers:
    • jjcoffee | Reviewer | 103886050
Issue OwnerCurrent Issue Owner: @mallenexpensify
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 3, 2024
Copy link

melvin-bot bot commented Sep 3, 2024

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.

@abzokhattab
Copy link
Contributor

abzokhattab commented Sep 3, 2024

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

<Button
text={translate('search.filtersHeader')}
icon={Expensicons.Filters}
onPress={() => Navigation.navigate(ROUTES.SEARCH_ADVANCED_FILTERS)}
medium
/>

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

Screen.Recording.2024-09-03.at.23.22.35.mov

@nyomanjyotisa
Copy link
Contributor

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

{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 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)

@Guccio163
Copy link
Contributor

Guccio163 commented Sep 4, 2024

Hi, I'm Wiktor Gut from SWM agency, please assign me this issue!

@melvin-bot melvin-bot bot added the Overdue label Sep 6, 2024
@mallenexpensify mallenexpensify added the External Added to denote the issue can be worked on by a contributor label Sep 6, 2024
Copy link

melvin-bot bot commented Sep 6, 2024

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

@melvin-bot melvin-bot bot changed the title Filters button should not be shown on Search page during "select mode". [$250] Filters button should not be shown on Search page during "select mode". Sep 6, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 6, 2024
Copy link

melvin-bot bot commented Sep 6, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Sep 6, 2024
@mallenexpensify mallenexpensify removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 6, 2024
@mallenexpensify
Copy link
Contributor

@jjcoffee plz review the proposals above, thx

@abzokhattab
Copy link
Contributor

Updated proposal

Added a minor clarification explaining why I used the headerButtonsOptions.length == 0 condition, but the overall solution idea remains unchanged

@Guccio163
Copy link
Contributor

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 🙏

@melvin-bot melvin-bot bot added the Overdue label Sep 9, 2024
@jjcoffee
Copy link
Contributor

jjcoffee commented Sep 9, 2024

Sounds like @Guccio163 is going to work on this!

🎀👀🎀 C+ reviewed

@melvin-bot melvin-bot bot removed the Overdue label Sep 9, 2024
Copy link

melvin-bot bot commented Sep 9, 2024

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

@nyomanjyotisa
Copy link
Contributor

I think the existing proposals need to be reviewed first base on this contributing guideline

@jjcoffee
Copy link
Contributor

jjcoffee commented Sep 9, 2024

@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.

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Sep 9, 2024

Current assignee @thienlnam is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@nyomanjyotisa
Copy link
Contributor

I believe the if-else condition proposed in my solution is necessary, since we want to prevent redundant/unnecessary checks and optimize performance

@luacmartins
Copy link
Contributor

Sorry everyone, this is part of the Search project and @Guccio163 is working on this already.

@luacmartins luacmartins assigned luacmartins and unassigned thienlnam Sep 9, 2024
@luacmartins luacmartins changed the title [$250] Filters button should not be shown on Search page during "select mode". [$250][Search v2.1] Filters button should not be shown on Search page during "select mode". Sep 9, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Sep 10, 2024
@mallenexpensify
Copy link
Contributor

@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.

@jjcoffee
Copy link
Contributor

@luacmartins I think you closed this by mistake?

@luacmartins
Copy link
Contributor

Oh for some reason my merge commit closed the issue. Reopening.

@luacmartins luacmartins reopened this Sep 12, 2024
@jjcoffee
Copy link
Contributor

Deployed to production Sept 12 so payment should be due 2024-09-19. cc @mallenexpensify

@mallenexpensify mallenexpensify changed the title [$250][Search v2.1] Filters button should not be shown on Search page during "select mode". [Hold for Payment 2024-09-19][$250][Search v2.1] Filters button should not be shown on Search page during "select mode". Sep 17, 2024
@mallenexpensify mallenexpensify added Daily KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Reviewing Has a PR in review Weekly KSv2 labels Sep 17, 2024
@jjcoffee
Copy link
Contributor

  • 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

  1. Open Search page
  2. Ensure no reports are selected
  3. Verify that the Filters button is visible and that X selected is not visible
  4. Select a few reports
  5. Verify that the Filters button is no longer visible and that the X selected button becomes visible

Do we agree 👍 or 👎

@luacmartins
Copy link
Contributor

Thanks! No need for regression tests at this time, we'll add them as part of the project wrap up

@melvin-bot melvin-bot bot added the Overdue label Sep 19, 2024
@mallenexpensify
Copy link
Contributor

Contributor: @jjcoffee paid $250 via Upwork

Thx!

@nyomanjyotisa
Copy link
Contributor

@mallenexpensify Any update about potential payment based on this?
Since the solution in my proposal was used in the PR

@abzokhattab
Copy link
Contributor

same, since my proposal was the selected solution. please let us know about any potential payments.

Thx!!

@luacmartins
Copy link
Contributor

@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.

@mallenexpensify
Copy link
Contributor

To provide more details...

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

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. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

8 participants