-
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
Global create opening in workspace configuration screen #5392
Comments
Triggered auto assignment to @Christinadobrzyn ( |
@MitchExpensify #5244 was reverted here |
Latest Slack thread here. Basically it's pretty easy to reproduce in dev, and was determined that currently there shouldn't be any race condition weirdness with one possible solution (@marcaaron 's PR: https://github.com/Expensify/App/pull/5394/files). However, @TomatoToaster is working on changing some of the flow so we're planning to hold on this until that change is done. |
Hmm so this is actually really tricky to solve now because of the latest changes. Basically when the Sidebar loads we need to know if we have a free policy, but we might not have created one yet. Before the most recent changes we were only redirecting after the policy was created. But now the sidebar loads (inside the I'm struggling to think of a clean way to get around this but we can hack it for now by looking at what route we're on. Unless someone has a better idea... I'm a little stumped since the sidebar doesn't know that we are trying to create a policy via |
Probably a better way to fix this would be to stop triggering the modal to open via the |
Ah wait are you seeing it |
Yeah global create thing pops open for |
Ahh wait sorry I'm getting this discussion and the inconsistent InvalidWorkspace thing mixed up. Ignore what I said there. This is kind of hacky behavior on top of hacky behavior, but one thing we could do is set this NVP which is called from Onyx here for the user while we're doing the transition in LogInWithShortToken or anywhere in its flow. Anyone who's coming in from OldDot is going to be routed to a Workspace so we don't need to automatically open the global create menu. |
It makes sense to me to move the |
It just that the logic should be synchronised to have the e.g. something like Promise.all([
firstUserCheck,
policyCheck,
delay(1500),
])
.then(results => /* open the create menu if any of the checks passed `true` */) |
@TomatoToaster Oh hmm so basically set them as "not a first time user"? That could work, but creates a weird condition where we must block navigating until after the NVP has been set + also block on the two API calls @kidroca is calling out. Either way I think we'll have to reorganize the code after, but looking at the route works for now. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
Global Create should not be open in the workspace configuration screen. This change was intended to fix that - Skip showing create for new users if user already has a workspace
Actual Result:
Global Create is open in the workspace configuration screen
Workaround:
Ignore it and click "Get Started". This is the mainline flow so we can't expect users to follow this workaround. They could easily select a global create option and get diverted from the mainline flow.
Platform:
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: