-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Sign in, out, or navigate on transition mount #8257
Conversation
(sorry was doing a test of puller bear, removing @AndrewGable as reviewer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting.. so no componentDidUpdate()
at all? Does it work? If so - I like it.
e198054
to
191c02f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just asking some questions and trying to understand the changes for now. Will do a proper review / test after.
src/libs/actions/Session/index.js
Outdated
@@ -188,6 +189,7 @@ function createTemporaryLogin(authToken, email) { | |||
partnerUserSecret: autoGeneratedPassword, | |||
shouldRetry: false, | |||
forceNetworkRequest: true, | |||
shouldProcessImmediately, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here - I'm having trouble seeing how this is connected to the transition stuff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed this code and it doesn't seem to impact anything.
Gonna jump in and add some commits here and do some testing @roryabraham |
Looks like test steps are failing for me when logged in with a pre-existing different account for the first set of steps "A" "Setup my workspace from OldDot". |
Oh actually it's because of a dev quirk. A call to Push_Authenticate makes the API return 404 because of the |
For "Continue Setup" steps there's a super annoying bug where if you dismiss the bank account modal you get redirected to OldDot. I don't think that was introduced here though, but it's kinda of 🥔 |
Keeping track of the testing.. so far everything's good for the first and last test...
|
I think we should also test all three cases here...
As they are all slightly different. |
Adding some logs to make testing/debugging easier. |
@@ -68,7 +68,9 @@ function show({routes, toggleCreateMenu}) { | |||
// If we are rendering the SidebarScreen at the same time as a workspace route that means we've already created a workspace via workspace/new and should not open the global | |||
// create menu right now. | |||
const topRouteName = lodashGet(_.last(routes), 'name', ''); | |||
const isDisplayingWorkspaceRoute = topRouteName.toLowerCase().includes('workspace'); | |||
const loginWithShortLivedTokenRoute = _.find(routes, route => route.name === 'LogInWithShortLivedToken'); | |||
const exitingToWorkspaceRoute = lodashGet(loginWithShortLivedTokenRoute, 'params.exitTo', '') === 'workspace/new'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this otherwise we would pop open the create menu in some contexts. I guess the top route is not always "workspace" and sometimes still the LoginWithShortLivedToken
page.
I'm up-to-date on this branch and just tested:
And it correctly logged out account A and logged in account B, but it did not open the existing workspace |
Cool. Lemme re-test that flow. Share logs if can. |
It's working for me 😄 2022-03-23_13-17-18.mp4 |
Seems good to go from my end. Gonna do another round of tests in a bit. |
Screen.Recording.2022-03-23.at.4.21.45.PM.movMaybe a race condition because it doesn't seem to be working for me 😕 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought about it some more and if this inconsistently reproducible bug is the only one left, then we should just merge this and address it with a follow-up. I'm going to be offline until tomorrow but going to approve this so it's mergeable.
Cool. Seems like this is blocking the deploy. If so we can add a CP staging to it (though the flow breaking on the Growl might still be affected) will retest once it hits and try to check it off. |
|
Sign in, out, or navigate on transition mount (cherry picked from commit cea6cf0)
…8257 🍒 Cherry pick PR #8257 to staging 🍒
🚀 Cherry-picked to staging by @marcaaron in version: 1.1.44-4 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
Details
Fix endless loading on the transition page by navigating at the end of
componentDidMount
.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/201705
Tests
Below are tests for all of the transition flows from Web-Expensify to NewDot. I have outlined all of the flows here, but I have only included tests for the Web. The mobile flows haven't worked for a while, as far as I can tell, so I think those should be fixed in a follow up issue.
A. Set up my company for free
B. Select a free workspace
C. Clicking on the name of a free policy
This flow is a bit slow and will sometimes show a blank page for a little while.
D. Get Started Inbox Task
@gmail.com
addressE. Pricing select free
F. Continue setup Inbox task
@gmail.com
addressPR Review Checklist
Contributor (PR Author) Checklist
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
filesSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
displayName
propertythis
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)PR Reviewer Checklist
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
).src/languages/*
filesSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
displayName
propertythis
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)QA Steps
Same as above but on staging.
Screenshots
Web
Mobile Web
Desktop
iOS
Android