Homec4science

Improve reliability of detecting small devices when loading Differential…

Authored by epriestley <git@epriestley.com> on Jan 29 2016, 13:58.

Description

Improve reliability of detecting small devices when loading Differential changesets

Summary: Ref T10229. Fixes T9969. We make a decision about 1up vs 2up pretty early, and sometimes the viewport size reads as larger than the device, so we incorrectly select 2up when the proper setting would be 1up.

Test Plan:
I can reproduce this by, e.g., reloading a lot on an iPhone 4s in iOS Simulator running iOS 9.2. Sometimes it picks 2-up. I added logging to show that the viewport dimension read was the issue.

After this change, it always selects 1-up (window.screen.availWidth is defined and sensible on the device).

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9969, T10229

Differential Revision: https://secure.phabricator.com/D15135

Details

Committed
epriestley <git@epriestley.com>Jan 29 2016, 15:55
Pushed
aubortJan 31 2017, 17:16
Parents
rPHe4372e1276fd: Add some additional padding before footer on profiles
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHdbf1d0d7210f: Improve reliability of detecting small devices when loading Differential… (authored by epriestley <git@epriestley.com>).Jan 29 2016, 15:55