{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/firefox-ios/issues/2058","repository_url":"https://api.github.com/repos/mozilla/firefox-ios","labels_url":"https://api.github.com/repos/mozilla/firefox-ios/issues/2058/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/firefox-ios/issues/2058/comments","events_url":"https://api.github.com/repos/mozilla/firefox-ios/issues/2058/events","html_url":"https://github.com/mozilla/firefox-ios/pull/2058","id":171947264,"number":2058,"title":"Bug 1296112 – Top tabs has several issues with private mode authentication","user":{"login":"varkor","id":3943692,"avatar_url":"https://avatars.githubusercontent.com/u/3943692?v=3","gravatar_id":"","url":"https://api.github.com/users/varkor","html_url":"https://github.com/varkor","followers_url":"https://api.github.com/users/varkor/followers","following_url":"https://api.github.com/users/varkor/following{/other_user}","gists_url":"https://api.github.com/users/varkor/gists{/gist_id}","starred_url":"https://api.github.com/users/varkor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varkor/subscriptions","organizations_url":"https://api.github.com/users/varkor/orgs","repos_url":"https://api.github.com/users/varkor/repos","events_url":"https://api.github.com/users/varkor/events{/privacy}","received_events_url":"https://api.github.com/users/varkor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-18T16:42:41Z","updated_at":"2016-08-19T14:32:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mozilla/firefox-ios/pulls/2058","html_url":"https://github.com/mozilla/firefox-ios/pull/2058","diff_url":"https://github.com/mozilla/firefox-ios/pull/2058.diff","patch_url":"https://github.com/mozilla/firefox-ios/pull/2058.patch"},"body":"We’ve now switched to responding to privacy mode changes using callbacks rather than Deferred values, as this prevents the UI propagation delay and causes things to execute predictably in the correct order without race conditions."},"comment":{"url":"https://api.github.com/repos/mozilla/firefox-ios/issues/comments/241034600","html_url":"https://github.com/mozilla/firefox-ios/pull/2058#issuecomment-241034600","issue_url":"https://api.github.com/repos/mozilla/firefox-ios/issues/2058","id":241034600,"user":{"login":"sleroux","id":434322,"avatar_url":"https://avatars.githubusercontent.com/u/434322?v=3","gravatar_id":"","url":"https://api.github.com/users/sleroux","html_url":"https://github.com/sleroux","followers_url":"https://api.github.com/users/sleroux/followers","following_url":"https://api.github.com/users/sleroux/following{/other_user}","gists_url":"https://api.github.com/users/sleroux/gists{/gist_id}","starred_url":"https://api.github.com/users/sleroux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sleroux/subscriptions","organizations_url":"https://api.github.com/users/sleroux/orgs","repos_url":"https://api.github.com/users/sleroux/repos","events_url":"https://api.github.com/users/sleroux/events{/privacy}","received_events_url":"https://api.github.com/users/sleroux/received_events","type":"User","site_admin":false},"created_at":"2016-08-19T14:32:15Z","updated_at":"2016-08-19T14:32:15Z","body":"I wonder why the deferreds were causing race conditions. I've seen similar issues when I was working on the top sites layout back in the day and remembering it being caused by the non-serial nature of the deferred tasks. Looking at the code replaced with the completion blocks, I can't see how the computation model differs than the deferred approach but I'll take a closer look later. I'm down with using the completion blocks if it fixes the problems 👌\r\n\r\nI did some quick testing on the PR and encountered a few bugs:\r\n\r\n* I was able to crash by tapping on the 'Learn More..' link in private mode shortly after authenticating from coming back from the background. Don't think I have a solid STR but it might have to do something with switching between modes and backgrounding that causing reodering/index crash in the collection view.\r\n\r\n* Coming back into the app after being backgrounded with touch ID flashes the contents of the tab tray momentarily before hiding and displaying the authentication prompt. After a few tries I was also able to by pass the prompt entirely. Tapping on the mask button when in the same asks me to prompt for authentication when _leaving_ private mode. I think I got into this state if I tried to background the app before the prompt is shown for touch ID.\r\n\r\n* On iPad, when coming back from the background, the tab tray contents are shown while the prompt is displaying - should be hidden.\r\n\r\n* On iPad, I was able to get into this weird broken state when background the app before the prompt was shown while in BVC:\r\n\r\n![simulator screen shot aug 19 2016 10 27 57 am](https://cloud.githubusercontent.com/assets/434322/17813031/9edb4672-65f7-11e6-9e0b-70e48e9fb02f.png)\r\n\r\nI think there is still a few gnarly bugs with this feature that we need to work through. Might be best if we back out the patch on master and do some focused testing on a separate branch. Another option we can do is wrap the code that implements the feature in a feature flag so we can toggle it off if we don't feel that it's ready for shipping. I'm worried that this approach might not work though considering the scope of changes that is required by the feature."}}
{"actor":{"display_login":"sleroux"}}