[HOLD for payment 2024-02-09] [$500] New user engagement modal not showing for classicRedirect users
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: 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): [email protected] Logs: https://stackoverflow.com/c/expensify/questions/4856 Issue reported by: @MitchExpensify Slack conversation: https://expensify.slack.com/archives/C05NJ4SLBMF/p1706325026564799
Action Performed:
- Sign in using a public domain on expensify.com from a totally new email (This will apply the
classicRedirectNVP) - 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
- [x] 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
Job added to Upwork: https://www.upwork.com/jobs/~01add4b7ddd6365d45
Triggered auto assignment to Contributor-plus team member for initial proposal review - @fedirjh (External)
Triggered auto assignment to @alexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
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π [email protected]
Upworklink: [https://www.upwork.com/freelancers/~01094986abb8ef2924](Upwork profile )
π£ @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:
- Make sure you've read and understood the contributing guidelines.
- 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.
- 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.
- Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Hi @Bilal-Khursheed! To clarify, the process works as intended if the new account is created on new.expensify.com:
- Go to new.expensify.com
- Sign up with brand new public email (gmail etc.)
- See engagement modal
The process does not work as intended if the account is created on expensify.com and redirected:
- Go to expensify.com
- Sign up with a brand new public email (gmail etc.)
- User is redirected to new.expensify.com and signed in
- 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.
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.
- Connect to
key: ONYXKEYS.IS_LOADING_APP,Onyx key inPurposeForUsingExpensifyModalhere - Add
props.isLoadingto 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 ...>
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
Current assignee @stitesExpensify is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
π£ @fedirjh π An offer has been automatically sent to your Upwork account for the Reviewer role π Thanks for contributing to the Expensify app!
π£ @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 π
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!
+1 @dukenv0307, if you could prioritize this issue when you come online it would be greatly appreciated π
@fedirjh this PR is ready for review.
PR is merged!
Thanks for the quick turnaround on this one everybody!
Reviewing label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.35-7 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
- https://github.com/Expensify/App/pull/35450
If no regressions arise, payment will be issued on 2024-02-09. :confetti_ball:
For reference, here are some details about the assignees on this issue:
- @fedirjh requires payment automatic offer (Reviewer)
- @dukenv0307 requires payment automatic offer (Contributor)
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:
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?
@MitchExpensify This bug appears after Nav-Ideal. It will be fixed here https://github.com/Expensify/App/issues/35663
Ok great! Thanks
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!
All set here, everyone has been paid in Upwork and the job is closed too. It's time to close this GH!