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-02-09] [$500] New user engagement modal not showing for classicRedirect users #35334

Closed
1 of 6 tasks
stitesExpensify opened this issue Jan 29, 2024 · 24 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 Improvement Item broken or needs improvement.

Comments

@stitesExpensify
Copy link
Contributor

stitesExpensify commented Jan 29, 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:
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: NA
Email or phone of affected tester (no customers): michaelconorward+748462972@googlemail.com
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: @MitchExpensify
Slack conversation: https://expensify.slack.com/archives/C05NJ4SLBMF/p1706325026564799

Action Performed:

  1. Sign in using a public domain on expensify.com from a totally new email (This will apply the classicRedirect NVP)
  2. Get redirected to new.expensify and see the new user engagement modal

Expected Result:

See the new user engagement modal (Can see example: https://github.com/Expensify/Expensify/issues/335513?notification_referrer_id=NT_kwDOAivQrbM4Mzc2OTQ3OTUwOjM2NDI1OTAx#issuecomment-1819919022)

Actual Result:

No new user engagement modal

Workaround:

None

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

Not sure if helpful but its throwing this error too on new.expensify.com

Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'nonce-MGM1MGNiMGE1MD/MDliMDdiMGJkMDQzMGM0MDVlMDQw' 'unsafe-eval' https://d2k5nsl2zxldvw.cloudfront.net/ https://apis.google.com/ https://client-registry.mutinycdn.com/ https://polyfill.io/ https://cdn.plaid.com/ https://www.woopra.com/ https://assets.onfido.com/ https://sentry.io/ https://*.sardine.ai/ https://appleid.cdn-apple.com/ https://accounts.google.com/gsi/client". Either the 'unsafe-inline' keyword, a hash ('sha256-xi4n6UDpWEPLJKRLXrmCeuho8/bLgloH4zA76JQKwXA='), or a nonce ('nonce-...') is required to enable inline execution.

[View all open jobs on GitHub](https://github.com/Expensify/App/issues?

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01add4b7ddd6365d45
  • Upwork Job ID: 1752078066585288704
  • Last Price Increase: 2024-01-29
  • Automatic offers:
    • fedirjh | Reviewer | 28130975
    • dukenv0307 | Contributor | 28130976
@stitesExpensify stitesExpensify added External Added to denote the issue can be worked on by a contributor Daily KSv2 Improvement Item broken or needs improvement. Help Wanted Apply this label when an issue is open to proposals by contributors Bug Something is broken. Auto assigns a BugZero manager. labels Jan 29, 2024
@stitesExpensify stitesExpensify self-assigned this Jan 29, 2024
@melvin-bot melvin-bot bot changed the title New user engagement modal not showing for classicRedirect users [$500] New user engagement modal not showing for classicRedirect users Jan 29, 2024
Copy link

melvin-bot bot commented Jan 29, 2024

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

Copy link

melvin-bot bot commented Jan 29, 2024

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

Copy link

melvin-bot bot commented Jan 29, 2024

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

@Bilal-Khursheed
Copy link

Bilal-Khursheed commented Jan 29, 2024

Proposal

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

Engagement model for new users is not working properly.

What is the root cause of that problem?
We are not showing model to the user, there we did not test it properly with the new users.
Need proper testing before moving it or may be it just because of regression.

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

We have to check is condition for poping up model is working fine for mew users or not, by creating new user and testing conditions line by line by using debug and have to find out what makes it work not properly. Most probably a new code merger may took the conditions in a different way so have figured it out.
What alternative solutions did you explore? (Optional

First need to have a proper scenarios of how it was working and why its not right now

Here is my email for Expensify😁 bilal.khursheed617@gmail.com

Upworklink: [https://www.upwork.com/freelancers/~01094986abb8ef2924](Upwork profile )

Copy link

melvin-bot bot commented Jan 29, 2024

📣 @Bilal-Khursheed! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@stitesExpensify
Copy link
Contributor Author

stitesExpensify commented Jan 29, 2024

Hi @Bilal-Khursheed! To clarify, the process works as intended if the new account is created on new.expensify.com:

  1. Go to new.expensify.com
  2. Sign up with brand new public email (gmail etc.)
  3. See engagement modal

The process does not work as intended if the account is created on expensify.com and redirected:

  1. Go to expensify.com
  2. Sign up with a brand new public email (gmail etc.)
  3. User is redirected to new.expensify.com and signed in
  4. Engagement modal should be shown, but it isn't

This is the logic for when to show the modal. We will need a more detailed and code focused problem/solution (the specific condition that is causing this) before we can choose you to fix the issue.

@dukenv0307
Copy link
Contributor

dukenv0307 commented Jan 30, 2024

Proposal

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

No new user engagement modal

What is the root cause of that problem?

When we're transitioning into NewDot, we'll be on the TransitionBetweenApps route, at this time the Sidebar and along with it, the PurposeForUsingExpensifyModal are already rendering. Then it will come to this check and see that the route is not correct, and early return. The useEffect is never rerendered due to no dependencies, so the Welcome.show is never run and the new user engagement modal doesn't show.

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

We had the same problem before with the FAB not opening upon registration (the previous equivalent of the new user engagement modal) and it was fixed via this PR so we should follow the same approach there to fix this issue.

  1. Connect to key: ONYXKEYS.IS_LOADING_APP, Onyx key in PurposeForUsingExpensifyModal here
  2. Add props.isLoading to the list of dependencies here so that the route check here will be evaluated again once the app is fully loaded.

We can optionally early return here if isLoading is still true, to avoid the Welcome.show to be shown in any case when the app is still loading.

What alternative solutions did you explore? (Optional)

Instead of isLoading, the currentRoute or just route can be used as dependency of the useEffect, but this will likely lead to more rerendering because route changes a lot (We can minimize rerendering by using isFirstRender). I still prefer the main solution because it was already used before and works well, and doesn't have any considerable downside.

Another approach is we can avoid rendering PurposeForUsingExpensifyModal if the app is still loading/the route is not the route we want to show it. Something like:

{shouldShowPurposeForUsingExpensifyModal && <PurposeForUsingExpensifyModal ...>

@fedirjh
Copy link
Contributor

fedirjh commented Jan 30, 2024

Thanks @dukenv0307 For the proposal, It looks good to me. I think we should go with the main solution with using ONYXKEYS.IS_LOADING_APP

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Jan 30, 2024

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

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 30, 2024
Copy link

melvin-bot bot commented Jan 30, 2024

📣 @fedirjh 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Jan 30, 2024

📣 @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 📖

@stitesExpensify
Copy link
Contributor Author

Hey @dukenv0307 if you could prioritize this issue that would be great! Most of our newDot traffic that should be seeing this modal is coming from oldDot, so the sooner we get this live the sooner 100% of our new customers will see it!

@MitchExpensify
Copy link
Contributor

+1 @dukenv0307, if you could prioritize this issue when you come online it would be greatly appreciated 🙇

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jan 31, 2024
@dukenv0307
Copy link
Contributor

dukenv0307 commented Jan 31, 2024

@fedirjh this PR is ready for review.

@stitesExpensify
Copy link
Contributor Author

PR is merged!

@stitesExpensify
Copy link
Contributor Author

Thanks for the quick turnaround on this one everybody!

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Feb 2, 2024
@melvin-bot melvin-bot bot changed the title [$500] New user engagement modal not showing for classicRedirect users [HOLD for payment 2024-02-09] [$500] New user engagement modal not showing for classicRedirect users Feb 2, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Feb 2, 2024
Copy link

melvin-bot bot commented Feb 2, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Feb 2, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.35-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-02-09. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Feb 2, 2024

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:

  • [@fedirjh] The PR that introduced the bug has been identified. Link to the PR:
  • [@fedirjh] 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:
  • [@fedirjh] 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:
  • [@fedirjh] Determine if we should create a regression test for this bug.
  • [@fedirjh] 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.
  • [@alexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@MitchExpensify
Copy link
Contributor

Something has happened here @dukenv0307 - I am not seeing the engagement modal when I sign up on expensify.com on a public domain and get redirected to new.expensify.com - Are you?

@dukenv0307
Copy link
Contributor

@MitchExpensify This bug appears after Nav-Ideal. It will be fixed here #35663

@MitchExpensify
Copy link
Contributor

Ok great! Thanks

@melvin-bot melvin-bot bot added Daily KSv2 Monthly KSv2 and removed Weekly KSv2 labels Feb 9, 2024
@alexpensify alexpensify removed the Monthly KSv2 label Feb 9, 2024
@alexpensify
Copy link
Contributor

Here is the payment summary:

  • External issue reporter - N/A
  • Contributor that fixed the issue @dukenv0307 $500
  • Contributor+ that helped on the issue and/or PR @fedirjh $500

Upwork Job: https://www.upwork.com/jobs/~01add4b7ddd6365d45

Notes: @fedirjh - please accept the job in Upwork and then I can complete the process. Thanks!

@melvin-bot melvin-bot bot added the Overdue label Feb 12, 2024
@alexpensify
Copy link
Contributor

All set here, everyone has been paid in Upwork and the job is closed too. It's time to close this GH!

@melvin-bot melvin-bot bot removed the Overdue label Feb 12, 2024
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 Improvement Item broken or needs improvement.
Projects
None yet
Development

No branches or pull requests

6 participants