Page MenuHomePhabricator

Improve reliability of detecting small devices when loading Differential changesets
ClosedPublic

Authored by epriestley on Jan 29 2016, 1:00 PM.
Tags
None
Referenced Files
F13445635: D15135.id36543.diff
Sat, Jul 13, 12:51 AM
F13384651: D15135.id36543.diff
Sun, Jun 30, 5:46 PM
F13351831: D15135.diff
Sun, Jun 23, 10:24 AM
F13292555: D15135.diff
Jun 5 2024, 3:40 AM
F13258462: D15135.diff
May 26 2024, 9:31 AM
F13240963: D15135.diff
May 22 2024, 6:11 PM
F13216580: D15135.id36543.diff
May 18 2024, 1:22 AM
F13188079: D15135.diff
May 11 2024, 5:01 AM
Subscribers
None

Details

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).

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Improve reliability of detecting small devices when loading Differential changesets.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Jan 29 2016, 2:49 PM
This revision was automatically updated to reflect the committed changes.