Conversation
|
Ah nice, did not know that existed. I think this should fix that issue, no? |
|
I'm not really sure if it's the best way because the defaults have reachabilityRequestTimeout to default to 15s so decreasing to 2s might not be recommended. And reachabilityShortTimeout is also defaulted to 5s which is shorter than 15s. I'm thinking something like this instead but still have to test and everything. Basically preventing another network check if one is running. |
Huh? I am changing it from 10 to 2, 15 is not used.
15 is not used and yes 5 is lower than 15, so what? Not sure what your concern is exactly with the change.
I think they are complimentary changes. |
|
Sorry, I'm not sure if it matters but this is what I was trying to say. The reasoning behind this PR is that we check for connection every 5s but each check takes 10s to timeout. So network requests are piling up when there is slow internet connection. But I'm saying that the default value for the check to timeout is 15s (we changed this to 10s). And if their default value for the request timeout is greater than the time between checking connections, then maybe this is fine and their code already accounts it? I'm also not too sure what this change would do once this PR is merged. Currently, I only see the downside of showing "You appear to be offline" when Ping takes 3s to respond on super slow connection (even though the user is connected to internet). But I'm not too sure because I haven't looked at their code. Maybe we could try 5 seconds first and see what happens and reduce to 2? I can also merge as is if you think it's worth it to try. |
How? Where? I am looking at the behavior in the network tab and it does not seem like it.
I don't think this is a downside really, your internet is so slow that something that normally takes a few ms is taking several seconds
If you want, we can try 5s... I am also fine on holding this and deploying your other PR first |
Yeah, you're right. I just felt like they wouldn't recommend those values as the default without properly testing it and maybe somewhere else in our implementation is wrong but who knows.
Yeah, maybe, I'm not too sure. On other applications, it generally shows "Your network connection seems to be slow" vs "You appear to be offline" since it's still making network request. I'm not really sure.
Sounds good, I think we can merge the other PR today and test Monday/Tuesday |
|
oh ok, wish we had merged this back then. |
Details
See https://expensify.slack.com/archives/C03TQ48KC/p1719482824987529
#44269
Tests
None, it seems we don't call Ping in dev, not sure why.
QA Steps
No
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop