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

[$500] Referral - Referral banner is not permanently dismissed in Search #35895

Closed
6 tasks done
izarutskaya opened this issue Feb 6, 2024 · 22 comments
Closed
6 tasks done
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@izarutskaya
Copy link

izarutskaya commented Feb 6, 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!


Found when validating PR: #34842

Version Number: v.1.4-37.0
Reproducible in staging?: Y
Reproducible in production?: N
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: Applause-Internal Team
Slack conversation:

Action Performed:

  1. Go to staging.new.expensify.com
  2. Click on the Search bar.
  3. Dismiss referral banner.
  4. Close the search modal.
  5. Reopen the search modal.

Expected Result:

The referral banner will not permanently dismissed.

Actual Result:

The referral banner reappears after reopening the Search modal.

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

Bug6369092_1707216580629.bandicam_2024-02-06_08-45-04-820.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01fa00f6ce5b45ba2f
  • Upwork Job ID: 1754832589427269632
  • Last Price Increase: 2024-02-13
@izarutskaya izarutskaya added DeployBlockerCash This issue or pull request should block deployment External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 6, 2024
@melvin-bot melvin-bot bot changed the title Referral - Referral banner is not permanently dismissed in Search [$500] Referral - Referral banner is not permanently dismissed in Search Feb 6, 2024
Copy link

melvin-bot bot commented Feb 6, 2024

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

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

melvin-bot bot commented Feb 6, 2024

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

Copy link

melvin-bot bot commented Feb 6, 2024

Triggered auto assignment to @JmillsExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Feb 6, 2024
Copy link
Contributor

github-actions bot commented Feb 6, 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:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

Copy link

melvin-bot bot commented Feb 6, 2024

Triggered auto assignment to @MariaHCD (Engineering), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@izarutskaya
Copy link
Author

We think that this bug might be related to #wave8-collect-admins
CC @zanyrenney

@eucool
Copy link
Contributor

eucool commented Feb 6, 2024

Proposal

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

Referral banner is not permanently dismissed in Search

What is the root cause of that problem?

We have the shouldShowReferralCTA, passed to the list but we never have the logic for the check

shouldShowReferralCTA

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

We should use a useState to keep track of the state of the dismissible banner,

We can Add the logic for the check similar to:

const [shouldShowReferralCTA, setShouldShowReferralCTA] = useState(!dismissedReferralBanners[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.REFER_FRIEND]);

What alternative solutions did you explore? (Optional)

N/A

@BhuvaneshPatil
Copy link
Contributor

BhuvaneshPatil commented Feb 6, 2024

Proposal

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

Referral - Referral banner is not permanently dismissed in Search

What is the root cause of that problem?

We are not passing two props in OptionsSelector in SearchPage component.
They are - shouldShowReferralCTA (it is true by default, we are not checking if it's already dismissed)
onCallToActionClosed this is method that is called when we close CTA in BaseOptionsSelector. That's why when we open the search page, CTA shows up.

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

we need to pass following two props in OptionsSelector component of SearchPage -

  1. Pass the shouldShowReferralCTA prop's value based on the ONYX value
dismissedReferralBanners: {
        key: ONYXKEYS.ACCOUNT,
        selector: (data) => data.dismissedReferralBanners || {},
    },

and calculate the value like -

shouldShowReferralCTA={!dismissedReferralBanners[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.REFER_FRIEND]}
  1. pass a prop - onCallToActionClosed and it will call - User.dismissReferralBanner(referralContentType);
const dismissCallToAction = (referralContentType) => {
        User.dismissReferralBanner(referralContentType);
    };

What alternative solutions did you explore? (Optional)

@MariaHCD
Copy link
Contributor

MariaHCD commented Feb 6, 2024

cc: @tgolen @hoangzinh

@MariaHCD
Copy link
Contributor

MariaHCD commented Feb 6, 2024

Looking through #34842, it looks like the SearchPage component is being deprecated in favor of SearchPage/index.js as per: #35058

@lukemorawski
Copy link
Contributor

looks like it's going to be fixed in #35058

@hoangzinh
Copy link
Contributor

should we remove DB blocker for this issue and put it holding for #35058?

@MariaHCD MariaHCD added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Feb 6, 2024
@MariaHCD MariaHCD changed the title [$500] Referral - Referral banner is not permanently dismissed in Search [HOLD App #35058] [$500] Referral - Referral banner is not permanently dismissed in Search Feb 6, 2024
@tgolen
Copy link
Contributor

tgolen commented Feb 6, 2024

Ah yes, thanks for putting a hold on this. This was by design for now and I'm sorry I forgot to update the QA instructions to account for the SearchPage.js deprecation.

@melvin-bot melvin-bot bot added the Overdue label Feb 8, 2024
Copy link

melvin-bot bot commented Feb 9, 2024

@JmillsExpensify, @MariaHCD, @DylanDylann Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@DylanDylann
Copy link
Contributor

#35058 is merged, let's remove hold in the title

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Feb 10, 2024
@MariaHCD MariaHCD changed the title [HOLD App #35058] [$500] Referral - Referral banner is not permanently dismissed in Search [$500] Referral - Referral banner is not permanently dismissed in Search Feb 12, 2024
@MariaHCD
Copy link
Contributor

Off hold.

@melvin-bot melvin-bot bot removed the Overdue label Feb 12, 2024
Copy link

melvin-bot bot commented Feb 13, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@DylanDylann
Copy link
Contributor

@codinggeek2023 @BhuvaneshPatil COuld you reproduce this issue anymore?

@eucool
Copy link
Contributor

eucool commented Feb 13, 2024

Not reproducible on staging, ig this was fixed in the PR which you mentioned above :)

@DylanDylann
Copy link
Contributor

@JmillsExpensify I also can't reproduce. Let's close this one

@eucool
Copy link
Contributor

eucool commented Feb 13, 2024

lets rest this issue in peace 😆

@melvin-bot melvin-bot bot added the Overdue label Feb 15, 2024
@MariaHCD
Copy link
Contributor

Thanks, all. Confirmed that the issue is no longer reproducible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

9 participants