{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/firefox-ios/pulls/comments/61439327","id":61439327,"diff_hunk":"@@ -430,3 +494,107 @@ class HistoryPanel: SiteTableViewController, HomePanel {\n         return [delete]\n     }\n }\n+\n+class SyncedTabsButton: UIView {\n+    private let ImageMargin: CGFloat = 12\n+\n+    lazy var titleLabel: UILabel = {\n+        let label = UILabel()\n+        label.textColor = TwoLineCellUX.TextColor\n+        label.text = Strings.SyncedTabsTableViewCellTitle\n+        label.font = DynamicFontHelper.defaultHelper.DeviceFontHistoryPanel\n+        return label\n+    }()\n+\n+    lazy var descriptionLabel: UILabel = {\n+        let label = UILabel()\n+        label.font = DynamicFontHelper.defaultHelper.DeviceFontSmallHistoryPanel\n+        label.textColor = TwoLineCellUX.DetailTextColor\n+        return label\n+    }()\n+\n+    lazy var imageView: UIImageView = {\n+        let image = UIImage(named: \"panelIconSyncedTabs\")!\n+        return UIImageView(image: image)\n+    }()\n+\n+    lazy var chevron: ChevronView = {\n+        let chevron = ChevronView(direction: .Right)\n+        chevron.tintColor = HistoryPanelUX.SyncedTabsCellChevronColor\n+        chevron.lineWidth = 3.0\n+        return chevron\n+    }()\n+\n+    lazy var topBorder: UIView = self.createBorderView()\n+    lazy var bottomBorder: UIView = self.createBorderView()\n+\n+    override init(frame: CGRect) {\n+        super.init(frame: frame)\n+        userInteractionEnabled = true\n+        backgroundColor = SiteTableViewControllerUX.HeaderBackgroundColor\n+\n+        addSubview(topBorder)\n+        addSubview(bottomBorder)\n+        addSubview(chevron)\n+        addSubview(titleLabel)\n+        addSubview(imageView)\n+        addSubview(descriptionLabel)\n+\n+\n+        imageView.snp_makeConstraints { make in\n+            make.left.equalTo(self).offset(TwoLineCellUX.BorderViewMargin)\n+            make.centerY.equalTo(self)\n+            make.width.equalTo(HistoryPanelUX.SyncedTabsCellImageSize)\n+        }\n+\n+        chevron.snp_makeConstraints { make in\n+            make.right.equalTo(self).offset(-HistoryPanelUX.SyncedTabsCellChevronInset)\n+            make.centerY.equalTo(self)\n+            make.size.equalTo(HistoryPanelUX.SyncedTabsCellChevronSize)\n+        }\n+\n+        topBorder.snp_makeConstraints { make in\n+            make.left.right.equalTo(self)\n+            make.top.equalTo(self).offset(-0.5)\n+            make.height.equalTo(0.5)\n+        }\n+\n+        bottomBorder.snp_makeConstraints { make in\n+            make.left.right.bottom.equalTo(self)\n+            make.height.equalTo(0.5)\n+        }\n+\n+        descriptionLabel.snp_makeConstraints { make in\n+            make.left.equalTo(imageView.snp_right).offset(TwoLineCellUX.BorderViewMargin)\n+            make.centerY.equalTo(self).offset(10)\n+        }\n+\n+        updateConstraints()\n+    }\n+\n+    private func createBorderView() -> UIView {\n+        let view = UIView()\n+        view.backgroundColor = SiteTableViewControllerUX.HeaderBorderColor\n+        return view\n+    }\n+\n+    override func updateConstraints() {\n+        super.updateConstraints()\n+\n+        titleLabel.snp_remakeConstraints { make in\n+            make.left.equalTo(imageView.snp_right).offset(TwoLineCellUX.BorderViewMargin)\n+            make.centerY.equalTo(self)\n+        }\n+\n+        if !descriptionLabel.hidden {\n+            titleLabel.snp_remakeConstraints { make in\n+                make.left.equalTo(imageView.snp_right).offset(TwoLineCellUX.BorderViewMargin)\n+                make.centerY.equalTo(self).offset(-10)\n+            }\n+        }","path":"Client/Frontend/Home/HistoryPanel.swift","position":420,"original_position":420,"commit_id":"c3c13ea1cde163c471cf95d7a2f406fd32de306c","original_commit_id":"c3c13ea1cde163c471cf95d7a2f406fd32de306c","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},"body":"Nit: Instead of remaking constraints twice on the same view, why not condense this?\r\n\r\n```swift\r\n titleLabel.snp_remakeConstraints { make in\r\n    make.left.equalTo(imageView.snp_right).offset(TwoLineCellUX.BorderViewMargin)\r\n    make.centerY.equalTo(self).offset(descriptionLabel.hidden ? 0 : -10)\r\n}\r\n```","created_at":"2016-04-28T14:45:24Z","updated_at":"2016-04-28T14:45:25Z","html_url":"https://github.com/mozilla/firefox-ios/pull/1738#discussion_r61439327","pull_request_url":"https://api.github.com/repos/mozilla/firefox-ios/pulls/1738","_links":{"self":{"href":"https://api.github.com/repos/mozilla/firefox-ios/pulls/comments/61439327"},"html":{"href":"https://github.com/mozilla/firefox-ios/pull/1738#discussion_r61439327"},"pull_request":{"href":"https://api.github.com/repos/mozilla/firefox-ios/pulls/1738"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/firefox-ios/pulls/1738","id":67561857,"html_url":"https://github.com/mozilla/firefox-ios/pull/1738","diff_url":"https://github.com/mozilla/firefox-ios/pull/1738.diff","patch_url":"https://github.com/mozilla/firefox-ios/pull/1738.patch","issue_url":"https://api.github.com/repos/mozilla/firefox-ios/issues/1738","number":1738,"state":"open","locked":false,"title":"Bug 1259253 - Add \"Synced Tabs\" feature to history panel ","user":{"login":"bkmunar","id":8356717,"avatar_url":"https://avatars.githubusercontent.com/u/8356717?v=3","gravatar_id":"","url":"https://api.github.com/users/bkmunar","html_url":"https://github.com/bkmunar","followers_url":"https://api.github.com/users/bkmunar/followers","following_url":"https://api.github.com/users/bkmunar/following{/other_user}","gists_url":"https://api.github.com/users/bkmunar/gists{/gist_id}","starred_url":"https://api.github.com/users/bkmunar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkmunar/subscriptions","organizations_url":"https://api.github.com/users/bkmunar/orgs","repos_url":"https://api.github.com/users/bkmunar/repos","events_url":"https://api.github.com/users/bkmunar/events{/privacy}","received_events_url":"https://api.github.com/users/bkmunar/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-22T19:36:38Z","updated_at":"2016-04-28T14:45:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"93b4a3cbadd29c29ce375eb1526ac6b2b212b7fa","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/firefox-ios/pulls/1738/commits","review_comments_url":"https://api.github.com/repos/mozilla/firefox-ios/pulls/1738/comments","review_comment_url":"https://api.github.com/repos/mozilla/firefox-ios/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/firefox-ios/issues/1738/comments","statuses_url":"https://api.github.com/repos/mozilla/firefox-ios/statuses/c3c13ea1cde163c471cf95d7a2f406fd32de306c","head":{"label":"mozilla:bkmunar/combineRemoteTabsToHistoryPanel","ref":"bkmunar/combineRemoteTabsToHistoryPanel","sha":"c3c13ea1cde163c471cf95d7a2f406fd32de306c","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":26133979,"name":"firefox-ios","full_name":"mozilla/firefox-ios","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/firefox-ios","description":"Firefox for iOS","fork":false,"url":"https://api.github.com/repos/mozilla/firefox-ios","forks_url":"https://api.github.com/repos/mozilla/firefox-ios/forks","keys_url":"https://api.github.com/repos/mozilla/firefox-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/firefox-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/firefox-ios/teams","hooks_url":"https://api.github.com/repos/mozilla/firefox-ios/hooks","issue_events_url":"https://api.github.com/repos/mozilla/firefox-ios/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/firefox-ios/events","assignees_url":"https://api.github.com/repos/mozilla/firefox-ios/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/firefox-ios/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/firefox-ios/tags","blobs_url":"https://api.github.com/repos/mozilla/firefox-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/firefox-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/firefox-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/firefox-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/firefox-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/firefox-ios/languages","stargazers_url":"https://api.github.com/repos/mozilla/firefox-ios/stargazers","contributors_url":"https://api.github.com/repos/mozilla/firefox-ios/contributors","subscribers_url":"https://api.github.com/repos/mozilla/firefox-ios/subscribers","subscription_url":"https://api.github.com/repos/mozilla/firefox-ios/subscription","commits_url":"https://api.github.com/repos/mozilla/firefox-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/firefox-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/firefox-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/firefox-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/firefox-ios/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/firefox-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/firefox-ios/merges","archive_url":"https://api.github.com/repos/mozilla/firefox-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/firefox-ios/downloads","issues_url":"https://api.github.com/repos/mozilla/firefox-ios/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/firefox-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/firefox-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/firefox-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/firefox-ios/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/firefox-ios/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/firefox-ios/deployments","created_at":"2014-11-03T19:07:02Z","updated_at":"2016-04-28T14:20:12Z","pushed_at":"2016-04-28T14:26:26Z","git_url":"git://github.com/mozilla/firefox-ios.git","ssh_url":"git@github.com:mozilla/firefox-ios.git","clone_url":"https://github.com/mozilla/firefox-ios.git","svn_url":"https://github.com/mozilla/firefox-ios","homepage":"","size":225411,"stargazers_count":5587,"watchers_count":5587,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1075,"mirror_url":null,"open_issues_count":86,"forks":1075,"open_issues":86,"watchers":5587,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"e5b33d55cd3ee3a322d6a403077c8e0c083e6bcf","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":26133979,"name":"firefox-ios","full_name":"mozilla/firefox-ios","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/firefox-ios","description":"Firefox for iOS","fork":false,"url":"https://api.github.com/repos/mozilla/firefox-ios","forks_url":"https://api.github.com/repos/mozilla/firefox-ios/forks","keys_url":"https://api.github.com/repos/mozilla/firefox-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/firefox-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/firefox-ios/teams","hooks_url":"https://api.github.com/repos/mozilla/firefox-ios/hooks","issue_events_url":"https://api.github.com/repos/mozilla/firefox-ios/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/firefox-ios/events","assignees_url":"https://api.github.com/repos/mozilla/firefox-ios/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/firefox-ios/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/firefox-ios/tags","blobs_url":"https://api.github.com/repos/mozilla/firefox-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/firefox-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/firefox-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/firefox-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/firefox-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/firefox-ios/languages","stargazers_url":"https://api.github.com/repos/mozilla/firefox-ios/stargazers","contributors_url":"https://api.github.com/repos/mozilla/firefox-ios/contributors","subscribers_url":"https://api.github.com/repos/mozilla/firefox-ios/subscribers","subscription_url":"https://api.github.com/repos/mozilla/firefox-ios/subscription","commits_url":"https://api.github.com/repos/mozilla/firefox-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/firefox-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/firefox-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/firefox-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/firefox-ios/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/firefox-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/firefox-ios/merges","archive_url":"https://api.github.com/repos/mozilla/firefox-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/firefox-ios/downloads","issues_url":"https://api.github.com/repos/mozilla/firefox-ios/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/firefox-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/firefox-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/firefox-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/firefox-ios/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/firefox-ios/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/firefox-ios/deployments","created_at":"2014-11-03T19:07:02Z","updated_at":"2016-04-28T14:20:12Z","pushed_at":"2016-04-28T14:26:26Z","git_url":"git://github.com/mozilla/firefox-ios.git","ssh_url":"git@github.com:mozilla/firefox-ios.git","clone_url":"https://github.com/mozilla/firefox-ios.git","svn_url":"https://github.com/mozilla/firefox-ios","homepage":"","size":225411,"stargazers_count":5587,"watchers_count":5587,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1075,"mirror_url":null,"open_issues_count":86,"forks":1075,"open_issues":86,"watchers":5587,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/firefox-ios/pulls/1738"},"html":{"href":"https://github.com/mozilla/firefox-ios/pull/1738"},"issue":{"href":"https://api.github.com/repos/mozilla/firefox-ios/issues/1738"},"comments":{"href":"https://api.github.com/repos/mozilla/firefox-ios/issues/1738/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/firefox-ios/pulls/1738/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/firefox-ios/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/firefox-ios/pulls/1738/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/firefox-ios/statuses/c3c13ea1cde163c471cf95d7a2f406fd32de306c"}}}}