App: [HOLD] [iOS] Figure out why setTimeout is needed when viewing SidebarScreen on load, replace with better solution

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Remove setTimeout from this code
  2. Set isActive={true} there so the global create menu should show immediately
  3. Rebuild app
  4. Close app completely on iOS simulator
  5. Reopen app

Expected Result:

Global create menu should show up. Since it doesn’t, we were forced to introduce a 200ms timeout here, but we want to understand why & how to remove that and still make the global create menu display when a new expensify user opens the app for the first time (unless they already have a workspace)

Actual Result:

Global create menu doesn’t show up

See @mateomorris 's tests in this comment

Workaround:

Keep the code as it is, it works but we don’t know why it’s necessary 👎

Possible solutions / ideas so far

  1. Idea from @marcaaron here
  2. Some notes from @mateomorris in his comment here

Platform:

Where is this issue occurring?

  • iOS

Version Number: latest Notes/Photos/Videos: Any additional supporting documentation Issue reported by: @mateomorris here Slack conversation: N/A

View all open jobs on GitHub

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 27 (24 by maintainers)

Most upvoted comments

// This is a short-term workaround

This is precisely why we shouldn’t ever put these comments in the code 😬

I’m dropping this to Monthly since I’ve got a bunch of other priorities at the moment, I’ll try to take a look this month

Removed Help Wanted label since it’s on hold

I’ll try to get to this later this week or early next - not top priority for now since nothing’s “broken”

Yeah might work. It would see pretty out of place in <Expensify /> since the public routes have no use for the fab.