{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/firefox-ios/pulls/comments/34645122","id":34645122,"diff_hunk":"@@ -19,6 +19,8 @@ private let CancelString = NSLocalizedString(\"Cancel\", comment: \"Cancel button\")\n private let KVOLoading = \"loading\"\n private let KVOEstimatedProgress = \"estimatedProgress\"\n \n+private let maxDialogUrlLength = 225","path":"Client/Frontend/Browser/BrowserViewController.swift","position":4,"original_position":4,"commit_id":"fcdee1bf4fd236b0236526b6d3488892cd22c14e","original_commit_id":"fcdee1bf4fd236b0236526b6d3488892cd22c14e","user":{"login":"allenngn","id":13171453,"avatar_url":"https://avatars.githubusercontent.com/u/13171453?v=3","gravatar_id":"","url":"https://api.github.com/users/allenngn","html_url":"https://github.com/allenngn","followers_url":"https://api.github.com/users/allenngn/followers","following_url":"https://api.github.com/users/allenngn/following{/other_user}","gists_url":"https://api.github.com/users/allenngn/gists{/gist_id}","starred_url":"https://api.github.com/users/allenngn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allenngn/subscriptions","organizations_url":"https://api.github.com/users/allenngn/orgs","repos_url":"https://api.github.com/users/allenngn/repos","events_url":"https://api.github.com/users/allenngn/events{/privacy}","received_events_url":"https://api.github.com/users/allenngn/received_events","type":"User","site_admin":false},"body":"I'm sorry, I'm not sure what \"s/Url/URL\" means. Is that a directory?","created_at":"2015-07-15T04:26:44Z","updated_at":"2015-07-15T04:26:44Z","html_url":"https://github.com/mozilla/firefox-ios/pull/674#discussion_r34645122","pull_request_url":"https://api.github.com/repos/mozilla/firefox-ios/pulls/674","_links":{"self":{"href":"https://api.github.com/repos/mozilla/firefox-ios/pulls/comments/34645122"},"html":{"href":"https://github.com/mozilla/firefox-ios/pull/674#discussion_r34645122"},"pull_request":{"href":"https://api.github.com/repos/mozilla/firefox-ios/pulls/674"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/firefox-ios/pulls/674","id":39213930,"html_url":"https://github.com/mozilla/firefox-ios/pull/674","diff_url":"https://github.com/mozilla/firefox-ios/pull/674.diff","patch_url":"https://github.com/mozilla/firefox-ios/pull/674.patch","issue_url":"https://api.github.com/repos/mozilla/firefox-ios/issues/674","number":674,"state":"open","locked":false,"title":"Bug 1178129 - Long-press dialog should truncate URL","user":{"login":"allenngn","id":13171453,"avatar_url":"https://avatars.githubusercontent.com/u/13171453?v=3","gravatar_id":"","url":"https://api.github.com/users/allenngn","html_url":"https://github.com/allenngn","followers_url":"https://api.github.com/users/allenngn/followers","following_url":"https://api.github.com/users/allenngn/following{/other_user}","gists_url":"https://api.github.com/users/allenngn/gists{/gist_id}","starred_url":"https://api.github.com/users/allenngn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allenngn/subscriptions","organizations_url":"https://api.github.com/users/allenngn/orgs","repos_url":"https://api.github.com/users/allenngn/repos","events_url":"https://api.github.com/users/allenngn/events{/privacy}","received_events_url":"https://api.github.com/users/allenngn/received_events","type":"User","site_admin":false},"body":"I made it so that the long press dialog truncates the URL if it is over 225 characters. That's just an arbitrary length I chose and can be changed later if it's too short/long. It seemed like a decent length for the truncated URL.\r\n\r\nThe truncated URL fills up its first half with that many characters from the original URL string, appends 3 dots, then fills out the rest of its 225 characters with the ending characters from the original URL string. So, \"abcdefghijklmnopqrstuvwxyz\" becomes \"abcd...wxyz\".","created_at":"2015-07-04T22:59:23Z","updated_at":"2015-07-15T04:26:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"26864bd291c779aa20164dd85750ef25d620d56d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/firefox-ios/pulls/674/commits","review_comments_url":"https://api.github.com/repos/mozilla/firefox-ios/pulls/674/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/674/comments","statuses_url":"https://api.github.com/repos/mozilla/firefox-ios/statuses/fcdee1bf4fd236b0236526b6d3488892cd22c14e","head":{"label":"allenngn:urlshorten","ref":"urlshorten","sha":"fcdee1bf4fd236b0236526b6d3488892cd22c14e","user":{"login":"allenngn","id":13171453,"avatar_url":"https://avatars.githubusercontent.com/u/13171453?v=3","gravatar_id":"","url":"https://api.github.com/users/allenngn","html_url":"https://github.com/allenngn","followers_url":"https://api.github.com/users/allenngn/followers","following_url":"https://api.github.com/users/allenngn/following{/other_user}","gists_url":"https://api.github.com/users/allenngn/gists{/gist_id}","starred_url":"https://api.github.com/users/allenngn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allenngn/subscriptions","organizations_url":"https://api.github.com/users/allenngn/orgs","repos_url":"https://api.github.com/users/allenngn/repos","events_url":"https://api.github.com/users/allenngn/events{/privacy}","received_events_url":"https://api.github.com/users/allenngn/received_events","type":"User","site_admin":false},"repo":{"id":38514949,"name":"firefox-ios","full_name":"allenngn/firefox-ios","owner":{"login":"allenngn","id":13171453,"avatar_url":"https://avatars.githubusercontent.com/u/13171453?v=3","gravatar_id":"","url":"https://api.github.com/users/allenngn","html_url":"https://github.com/allenngn","followers_url":"https://api.github.com/users/allenngn/followers","following_url":"https://api.github.com/users/allenngn/following{/other_user}","gists_url":"https://api.github.com/users/allenngn/gists{/gist_id}","starred_url":"https://api.github.com/users/allenngn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allenngn/subscriptions","organizations_url":"https://api.github.com/users/allenngn/orgs","repos_url":"https://api.github.com/users/allenngn/repos","events_url":"https://api.github.com/users/allenngn/events{/privacy}","received_events_url":"https://api.github.com/users/allenngn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/allenngn/firefox-ios","description":"Firefox for iOS","fork":true,"url":"https://api.github.com/repos/allenngn/firefox-ios","forks_url":"https://api.github.com/repos/allenngn/firefox-ios/forks","keys_url":"https://api.github.com/repos/allenngn/firefox-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/allenngn/firefox-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/allenngn/firefox-ios/teams","hooks_url":"https://api.github.com/repos/allenngn/firefox-ios/hooks","issue_events_url":"https://api.github.com/repos/allenngn/firefox-ios/issues/events{/number}","events_url":"https://api.github.com/repos/allenngn/firefox-ios/events","assignees_url":"https://api.github.com/repos/allenngn/firefox-ios/assignees{/user}","branches_url":"https://api.github.com/repos/allenngn/firefox-ios/branches{/branch}","tags_url":"https://api.github.com/repos/allenngn/firefox-ios/tags","blobs_url":"https://api.github.com/repos/allenngn/firefox-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/allenngn/firefox-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/allenngn/firefox-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/allenngn/firefox-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/allenngn/firefox-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/allenngn/firefox-ios/languages","stargazers_url":"https://api.github.com/repos/allenngn/firefox-ios/stargazers","contributors_url":"https://api.github.com/repos/allenngn/firefox-ios/contributors","subscribers_url":"https://api.github.com/repos/allenngn/firefox-ios/subscribers","subscription_url":"https://api.github.com/repos/allenngn/firefox-ios/subscription","commits_url":"https://api.github.com/repos/allenngn/firefox-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/allenngn/firefox-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/allenngn/firefox-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/allenngn/firefox-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/allenngn/firefox-ios/contents/{+path}","compare_url":"https://api.github.com/repos/allenngn/firefox-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/allenngn/firefox-ios/merges","archive_url":"https://api.github.com/repos/allenngn/firefox-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/allenngn/firefox-ios/downloads","issues_url":"https://api.github.com/repos/allenngn/firefox-ios/issues{/number}","pulls_url":"https://api.github.com/repos/allenngn/firefox-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/allenngn/firefox-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/allenngn/firefox-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/allenngn/firefox-ios/labels{/name}","releases_url":"https://api.github.com/repos/allenngn/firefox-ios/releases{/id}","created_at":"2015-07-03T23:58:24Z","updated_at":"2015-07-03T23:58:35Z","pushed_at":"2015-07-15T03:52:33Z","git_url":"git://github.com/allenngn/firefox-ios.git","ssh_url":"git@github.com:allenngn/firefox-ios.git","clone_url":"https://github.com/allenngn/firefox-ios.git","svn_url":"https://github.com/allenngn/firefox-ios","homepage":"","size":49219,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"8cc62f9846a5d5bb9910b2fa9f89994a45dea207","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}","created_at":"2014-11-03T19:07:02Z","updated_at":"2015-07-15T03:19:35Z","pushed_at":"2015-07-15T04:08:06Z","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":145064,"stargazers_count":3403,"watchers_count":3403,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":571,"mirror_url":null,"open_issues_count":44,"forks":571,"open_issues":44,"watchers":3403,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/firefox-ios/pulls/674"},"html":{"href":"https://github.com/mozilla/firefox-ios/pull/674"},"issue":{"href":"https://api.github.com/repos/mozilla/firefox-ios/issues/674"},"comments":{"href":"https://api.github.com/repos/mozilla/firefox-ios/issues/674/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/firefox-ios/pulls/674/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/674/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/firefox-ios/statuses/fcdee1bf4fd236b0236526b6d3488892cd22c14e"}}}}