Show Pop-over on Workspace Welcome#16962
Conversation
…rkspace-popover-welcome
|
Looking good. Just left a comment. |
…rkspace-popover-welcome
|
I think the issue is happening because we only update the That's why I can replicate the error in Web (if the screen is small like mWeb) but refreshing the page fixes the problem. |
|
Both problems are coming from this branch, trying to fix here! Edit: Nevermind, I replicated the |
|
The console logs were already reported and discussed and has a closed issue. Not sure what happened or how/if it was solved but I'll focus on the actual bug where you can't leave the chat on first sign-in now. |
… on first sign-in
|
The problem was happening because So as I first imagined the problem is related to the fact that we only update the I fixed this by setting the local Onyx value for the |
|
@PauloGasparSv is this ready for review? |
Not yet @luacmartins still adding evidences! |
|
The behavior doesn't work in mWeb! I investigated a bit but still have no idea why that's happening. Screen.Recording.2023-04-12.at.20.33.08.mov |
…rkspace-popover-welcome
|
All right, this has to do with Problem is that the screen and chat lifecycle is a bit different in that mode because of how the LNH works there in comparison to a fullscreen Web/Desktop. I'm still trying to figure a way to bypass this. |
…rkspace-popover-welcome
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-04-18.at.1.52.54.AM.movMobile Web - ChromeScreen.Recording.2023-04-18.at.1.47.16.AM.movMobile Web - SafariScreen.Recording.2023-04-18.at.1.44.04.AM.movDesktopScreen.Recording.2023-04-18.at.1.59.53.AM.moviOSScreen.Recording.2023-04-18.at.1.37.10.AM.movAndroidScreen.Recording.2023-04-18.at.2.04.05.AM.mov |
thesahindia
left a comment
There was a problem hiding this comment.
Works well!
cc: @luacmartins
|
🎯 @thesahindia, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #17533. |
|
@chiragsalian all yours |
chiragsalian
left a comment
There was a problem hiding this comment.
I think code LGTM, just left some minor clarifying comments and a suggestion to remove "state" from your comments since I initially thought it was a react state variable. So removing it makes it easier to read imo.
| initWithStoredValues: false, | ||
| callback: (val) => { | ||
| isFirstTimeNewExpensifyUser = val; | ||
| // If this is a first time new expensify user, let's only update the state of isFirstTimeNewExpensifyUser from true to false |
There was a problem hiding this comment.
| // If this is a first time new expensify user, let's only update the state of isFirstTimeNewExpensifyUser from true to false | |
| // If this is a first time new Expensify user, let's only update isFirstTimeNewExpensifyUser from true to false |
having a mention of "state" is tripping me up a little bit since it's not a state variable (in a react sense). Just my opinion to make it simpler.
| isFirstTimeNewExpensifyUser = val; | ||
| // If this is a first time new expensify user, let's only update the state of isFirstTimeNewExpensifyUser from true to false | ||
| // after running all Welcome related logic in Welcome.show | ||
| if (!isFirstTimeNewExpensifyUser) { |
There was a problem hiding this comment.
I'm a bit confused, you mention in the comment above this block updates isFirstTimeNewExpensifyUser from true to false.
But for a new user, isFirstTimeNewExpensifyUser is first null from the top and then when backend returns true for ONYXKEYS.NVP_IS_FIRST_TIME_NEW_EXPENSIFY_USER won't this be set from null to true?
Additionally from logic here if isFirstTimeNewExpensifyUser is true it will never set it to false. The condition here will give true only for !false so you can only change isFirstTimeNewExpensifyUser from false or null to true/false here.
So maybe your comment needs to be rephrased. Let me know if I'm mistaken.
There was a problem hiding this comment.
I think my comment is very poorly written @chiragsalian so I'll explain each question and rework the comment too.
But for a new user, isFirstTimeNewExpensifyUser is first null from the top and then when backend returns true for ONYXKEYS.NVP_IS_FIRST_TIME_NEW_EXPENSIFY_USER won't this be set from null to true?
Yes, the first time this logic is reached is when we first set isFirstTimeNewExpensifyUser to true.
Additionally from logic here if isFirstTimeNewExpensifyUser is true it will never set it to false. The condition here will give true only for !false so you can only change isFirstTimeNewExpensifyUser from false or null to true/false here.
Yes! It only updates the value of isFirstTimeNewExpensifyUser if it already was falsy.
Since we never update isFirstTimeNewExpensifyUser to true, we only set isFirstTimeNewExpensifyUser when it first loads through Onyx.
| Onyx.set(ONYXKEYS.NVP_IS_FIRST_TIME_NEW_EXPENSIFY_USER, false); | ||
| Navigation.navigate(ROUTES.getReportRoute(workspaceChatReport.reportID)); | ||
|
|
||
| // If showPopoverMenu exists and returns true then it opened the Popover Menu succesfully and we can update the state of isFirstTimeNewExpensifyUser |
There was a problem hiding this comment.
| // If showPopoverMenu exists and returns true then it opened the Popover Menu succesfully and we can update the state of isFirstTimeNewExpensifyUser | |
| // If showPopoverMenu exists and returns true then it opened the Popover Menu successfully, and we can update isFirstTimeNewExpensifyUser |
| showCreateMenu(); | ||
| } | ||
|
|
||
| // Update state of isFirstTimeNewExpensifyUser so the Welcome logic doesn't run again |
There was a problem hiding this comment.
| // Update state of isFirstTimeNewExpensifyUser so the Welcome logic doesn't run again | |
| // Update isFirstTimeNewExpensifyUser so the Welcome logic doesn't run again |
|
@PauloGasparSv let's address Chirag's comment above and get this one merged today! |
luacmartins
left a comment
There was a problem hiding this comment.
We also have conflicts now
af0539e
|
Fixed the conflicts with Re-testing everything here. |
|
Re-tested and so far everything is working. WebWeb.movWeb.small.screen.movMobile Web - ChromemWeb.Chrome.movMobile Web - SafarimWeb.Safari.movDesktopDesktop.moviOSScreen.Recording.2023-04-19.at.16.37.15.movAndroidhttps://user-images.githubusercontent.com/6564265/233170196-44c52cfc-2376-465c-98aa-7bc83037ecb9.mov |
|
Going ahead and merging since it was mostly minor changes since the latest approvals. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/chiragsalian in version: 1.3.3-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.3-2 🚀
|



Details
This changes our logic for new accounts that access newDot for the first time!
If the new account is part of a workspace because it was invited then in their first signin the app should:
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/270487
PROPOSAL: GH_LINK_ISSUE(COMMENT)
Tests
This requires creating multiple accounts to test/QA!
isFirstTimeNewExpensifyUser:Offline tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Web
Screen.Recording.2023-04-14.at.16.02.10.mov
Screen.Recording.2023-04-14.at.16.06.12.mov
Mobile Web - Chrome
Screen.Recording.2023-04-14.at.16.14.27.mov
Mobile Web - Safari
Screen.Recording.2023-04-14.at.16.16.20.mov
Desktop
Screen.Recording.2023-04-14.at.16.13.14.mov
iOS
Screen.Recording.2023-04-14.at.16.38.31.mov
Android
Screen.Recording.2023-04-14.at.16.20.29.mov