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:
- Remove
setTimeoutfrom this code - Set
isActive={true}there so the global create menu should show immediately - Rebuild app
- Close app completely on iOS simulator
- 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
- Idea from @marcaaron here
- 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
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 27 (24 by maintainers)
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 Wantedlabel since it’s on holdI’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.Upwork job: https://www.upwork.com/jobs/~01e9442bc5ff417a90