{"action":"created","comment":{"url":"https://api.github.com/repos/diaspora/diaspora/pulls/comments/79957320","id":79957320,"diff_hunk":"@@ -0,0 +1,44 @@\n+-# locals: selected_aspects. Note: all_aspects is a global in the ApplicationController\n+.btn-group.aspect_dropdown\n+  %button.btn.btn-default.dropdown-toggle{!current_user.getting_started? ? {\"data-toggle\" => \"dropdown\"} : |\n+  {\"data-toggle\" => \"dropdown\", |\n+  :title => popover_with_close_html(\"2. #{t('shared.public_explain.control_your_audience')}\"), |\n+  \"data-content\" => t(\"shared.public_explain.visibility_dropdown\")}}   |\n+    - if public_selected?(selected_aspects)\n+      %i.entypo-globe.small#visibility-icon\n+      %span.text\n+        = t(\"public\")\n+    - else\n+      %i.entypo-lock.small#visibility-icon\n+      %span.text\n+        - if all_aspects_selected?(all_aspects, selected_aspects)\n+          = t(\"all_aspects\")\n+        - elsif selected_aspects.size == 1\n+          = selected_aspects.first.name\n+        - else\n+          = t(\"shared.aspect_dropdown.toggle\", count: selected_aspects.size)\n+    %span.caret\n+  %ul.dropdown-menu.pull-right{unSelectable: \"on\"}\n+\n+    %li.public.radio{\"data-aspect_id\" => \"public\", class: (\"selected\" if public_selected?(selected_aspects))}\n+      %a\n+        %span.status_indicator\n+          %i.glyphicon.glyphicon-ok\n+        %span.text\n+          = t(\"public\")\n+    %li.all_aspects.radio{\"data-aspect_id\" => \"all_aspects\", class: (\"selected\" if (!public_selected?(selected_aspects) |","path":"app/views/aspects/_aspect_dropdown.html.haml","position":29,"original_position":29,"commit_id":"405045804eb406070f8bb65bce2fcda1f3c11b0d","original_commit_id":"405045804eb406070f8bb65bce2fcda1f3c11b0d","user":{"login":"diaspora-code-review","id":13334186,"avatar_url":"https://avatars.githubusercontent.com/u/13334186?v=3","gravatar_id":"","url":"https://api.github.com/users/diaspora-code-review","html_url":"https://github.com/diaspora-code-review","followers_url":"https://api.github.com/users/diaspora-code-review/followers","following_url":"https://api.github.com/users/diaspora-code-review/following{/other_user}","gists_url":"https://api.github.com/users/diaspora-code-review/gists{/gist_id}","starred_url":"https://api.github.com/users/diaspora-code-review/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diaspora-code-review/subscriptions","organizations_url":"https://api.github.com/users/diaspora-code-review/orgs","repos_url":"https://api.github.com/users/diaspora-code-review/repos","events_url":"https://api.github.com/users/diaspora-code-review/events{/privacy}","received_events_url":"https://api.github.com/users/diaspora-code-review/received_events","type":"User","site_admin":false},"body":"- Line is too long. [121/120]\n- Don't mix styles in the same hash.\n- Don't use parentheses around the condition of an `if`.\n- Don't use the `|` character to split up lines. Wrap on commas or extract code into helper.","created_at":"2016-09-21T23:52:16Z","updated_at":"2016-09-21T23:52:16Z","html_url":"https://github.com/diaspora/diaspora/pull/7118#discussion_r79957320","pull_request_url":"https://api.github.com/repos/diaspora/diaspora/pulls/7118","_links":{"self":{"href":"https://api.github.com/repos/diaspora/diaspora/pulls/comments/79957320"},"html":{"href":"https://github.com/diaspora/diaspora/pull/7118#discussion_r79957320"},"pull_request":{"href":"https://api.github.com/repos/diaspora/diaspora/pulls/7118"}}},"pull_request":{"url":"https://api.github.com/repos/diaspora/diaspora/pulls/7118","id":86261149,"html_url":"https://github.com/diaspora/diaspora/pull/7118","diff_url":"https://github.com/diaspora/diaspora/pull/7118.diff","patch_url":"https://github.com/diaspora/diaspora/pull/7118.patch","issue_url":"https://api.github.com/repos/diaspora/diaspora/issues/7118","number":7118,"state":"open","locked":false,"title":"Implement 4319 postdefault","user":{"login":"hilkoc","id":5678428,"avatar_url":"https://avatars.githubusercontent.com/u/5678428?v=3","gravatar_id":"","url":"https://api.github.com/users/hilkoc","html_url":"https://github.com/hilkoc","followers_url":"https://api.github.com/users/hilkoc/followers","following_url":"https://api.github.com/users/hilkoc/following{/other_user}","gists_url":"https://api.github.com/users/hilkoc/gists{/gist_id}","starred_url":"https://api.github.com/users/hilkoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hilkoc/subscriptions","organizations_url":"https://api.github.com/users/hilkoc/orgs","repos_url":"https://api.github.com/users/hilkoc/repos","events_url":"https://api.github.com/users/hilkoc/events{/privacy}","received_events_url":"https://api.github.com/users/hilkoc/received_events","type":"User","site_admin":false},"body":"For your consideration, my contribution for issue #4319 \r\n\r\nIn this change we add an aspect drop down selector on the user settings page. After selecting and saving these post_default aspects they will be used in the main stream's publisher for preselecting the aspects to post to. To that end we refactor the aspect_dropdown view to not depend on a stream and publisher.\r\nSelecting multiple aspects from the dropdown is not possible in mobile view. Therefore this setting is not available in mobile view.\r\n\r\nIn addition, we preselect the 'public' aspect in the publisher for the public activities stream. This makes the behavior analogous to the My Aspects stream, where we preselect the aspects of the aspect stream.\r\n\r\nThe schema migration preserves the existing behavior of preselecting 'All aspects'.\r\nA cucumber test demonstrates the use of this new feature.\r\n\r\nThis is a follow up on https://github.com/diaspora/diaspora/pull/7101","created_at":"2016-09-21T23:51:56Z","updated_at":"2016-09-21T23:52:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8337e648ceb22256ebb0fbf498979db1d43d17db","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/diaspora/diaspora/pulls/7118/commits","review_comments_url":"https://api.github.com/repos/diaspora/diaspora/pulls/7118/comments","review_comment_url":"https://api.github.com/repos/diaspora/diaspora/pulls/comments{/number}","comments_url":"https://api.github.com/repos/diaspora/diaspora/issues/7118/comments","statuses_url":"https://api.github.com/repos/diaspora/diaspora/statuses/405045804eb406070f8bb65bce2fcda1f3c11b0d","head":{"label":"hilkoc:fix-4319-postdefault","ref":"fix-4319-postdefault","sha":"405045804eb406070f8bb65bce2fcda1f3c11b0d","user":{"login":"hilkoc","id":5678428,"avatar_url":"https://avatars.githubusercontent.com/u/5678428?v=3","gravatar_id":"","url":"https://api.github.com/users/hilkoc","html_url":"https://github.com/hilkoc","followers_url":"https://api.github.com/users/hilkoc/followers","following_url":"https://api.github.com/users/hilkoc/following{/other_user}","gists_url":"https://api.github.com/users/hilkoc/gists{/gist_id}","starred_url":"https://api.github.com/users/hilkoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hilkoc/subscriptions","organizations_url":"https://api.github.com/users/hilkoc/orgs","repos_url":"https://api.github.com/users/hilkoc/repos","events_url":"https://api.github.com/users/hilkoc/events{/privacy}","received_events_url":"https://api.github.com/users/hilkoc/received_events","type":"User","site_admin":false},"repo":{"id":68244768,"name":"diaspora","full_name":"hilkoc/diaspora","owner":{"login":"hilkoc","id":5678428,"avatar_url":"https://avatars.githubusercontent.com/u/5678428?v=3","gravatar_id":"","url":"https://api.github.com/users/hilkoc","html_url":"https://github.com/hilkoc","followers_url":"https://api.github.com/users/hilkoc/followers","following_url":"https://api.github.com/users/hilkoc/following{/other_user}","gists_url":"https://api.github.com/users/hilkoc/gists{/gist_id}","starred_url":"https://api.github.com/users/hilkoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hilkoc/subscriptions","organizations_url":"https://api.github.com/users/hilkoc/orgs","repos_url":"https://api.github.com/users/hilkoc/repos","events_url":"https://api.github.com/users/hilkoc/events{/privacy}","received_events_url":"https://api.github.com/users/hilkoc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hilkoc/diaspora","description":"A privacy-aware, distributed, open source social network.","fork":true,"url":"https://api.github.com/repos/hilkoc/diaspora","forks_url":"https://api.github.com/repos/hilkoc/diaspora/forks","keys_url":"https://api.github.com/repos/hilkoc/diaspora/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hilkoc/diaspora/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hilkoc/diaspora/teams","hooks_url":"https://api.github.com/repos/hilkoc/diaspora/hooks","issue_events_url":"https://api.github.com/repos/hilkoc/diaspora/issues/events{/number}","events_url":"https://api.github.com/repos/hilkoc/diaspora/events","assignees_url":"https://api.github.com/repos/hilkoc/diaspora/assignees{/user}","branches_url":"https://api.github.com/repos/hilkoc/diaspora/branches{/branch}","tags_url":"https://api.github.com/repos/hilkoc/diaspora/tags","blobs_url":"https://api.github.com/repos/hilkoc/diaspora/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hilkoc/diaspora/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hilkoc/diaspora/git/refs{/sha}","trees_url":"https://api.github.com/repos/hilkoc/diaspora/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hilkoc/diaspora/statuses/{sha}","languages_url":"https://api.github.com/repos/hilkoc/diaspora/languages","stargazers_url":"https://api.github.com/repos/hilkoc/diaspora/stargazers","contributors_url":"https://api.github.com/repos/hilkoc/diaspora/contributors","subscribers_url":"https://api.github.com/repos/hilkoc/diaspora/subscribers","subscription_url":"https://api.github.com/repos/hilkoc/diaspora/subscription","commits_url":"https://api.github.com/repos/hilkoc/diaspora/commits{/sha}","git_commits_url":"https://api.github.com/repos/hilkoc/diaspora/git/commits{/sha}","comments_url":"https://api.github.com/repos/hilkoc/diaspora/comments{/number}","issue_comment_url":"https://api.github.com/repos/hilkoc/diaspora/issues/comments{/number}","contents_url":"https://api.github.com/repos/hilkoc/diaspora/contents/{+path}","compare_url":"https://api.github.com/repos/hilkoc/diaspora/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hilkoc/diaspora/merges","archive_url":"https://api.github.com/repos/hilkoc/diaspora/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hilkoc/diaspora/downloads","issues_url":"https://api.github.com/repos/hilkoc/diaspora/issues{/number}","pulls_url":"https://api.github.com/repos/hilkoc/diaspora/pulls{/number}","milestones_url":"https://api.github.com/repos/hilkoc/diaspora/milestones{/number}","notifications_url":"https://api.github.com/repos/hilkoc/diaspora/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hilkoc/diaspora/labels{/name}","releases_url":"https://api.github.com/repos/hilkoc/diaspora/releases{/id}","deployments_url":"https://api.github.com/repos/hilkoc/diaspora/deployments","created_at":"2016-09-14T21:27:17Z","updated_at":"2016-09-14T21:27:23Z","pushed_at":"2016-09-21T23:32:20Z","git_url":"git://github.com/hilkoc/diaspora.git","ssh_url":"git@github.com:hilkoc/diaspora.git","clone_url":"https://github.com/hilkoc/diaspora.git","svn_url":"https://github.com/hilkoc/diaspora","homepage":"https://diasporafoundation.org/","size":99472,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"diaspora:develop","ref":"develop","sha":"8a3fd1f3e7feee13511a3510706d401409bcece1","user":{"login":"diaspora","id":293207,"avatar_url":"https://avatars.githubusercontent.com/u/293207?v=3","gravatar_id":"","url":"https://api.github.com/users/diaspora","html_url":"https://github.com/diaspora","followers_url":"https://api.github.com/users/diaspora/followers","following_url":"https://api.github.com/users/diaspora/following{/other_user}","gists_url":"https://api.github.com/users/diaspora/gists{/gist_id}","starred_url":"https://api.github.com/users/diaspora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diaspora/subscriptions","organizations_url":"https://api.github.com/users/diaspora/orgs","repos_url":"https://api.github.com/users/diaspora/repos","events_url":"https://api.github.com/users/diaspora/events{/privacy}","received_events_url":"https://api.github.com/users/diaspora/received_events","type":"Organization","site_admin":false},"repo":{"id":911765,"name":"diaspora","full_name":"diaspora/diaspora","owner":{"login":"diaspora","id":293207,"avatar_url":"https://avatars.githubusercontent.com/u/293207?v=3","gravatar_id":"","url":"https://api.github.com/users/diaspora","html_url":"https://github.com/diaspora","followers_url":"https://api.github.com/users/diaspora/followers","following_url":"https://api.github.com/users/diaspora/following{/other_user}","gists_url":"https://api.github.com/users/diaspora/gists{/gist_id}","starred_url":"https://api.github.com/users/diaspora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diaspora/subscriptions","organizations_url":"https://api.github.com/users/diaspora/orgs","repos_url":"https://api.github.com/users/diaspora/repos","events_url":"https://api.github.com/users/diaspora/events{/privacy}","received_events_url":"https://api.github.com/users/diaspora/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/diaspora/diaspora","description":"A privacy-aware, distributed, open source social network.","fork":false,"url":"https://api.github.com/repos/diaspora/diaspora","forks_url":"https://api.github.com/repos/diaspora/diaspora/forks","keys_url":"https://api.github.com/repos/diaspora/diaspora/keys{/key_id}","collaborators_url":"https://api.github.com/repos/diaspora/diaspora/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/diaspora/diaspora/teams","hooks_url":"https://api.github.com/repos/diaspora/diaspora/hooks","issue_events_url":"https://api.github.com/repos/diaspora/diaspora/issues/events{/number}","events_url":"https://api.github.com/repos/diaspora/diaspora/events","assignees_url":"https://api.github.com/repos/diaspora/diaspora/assignees{/user}","branches_url":"https://api.github.com/repos/diaspora/diaspora/branches{/branch}","tags_url":"https://api.github.com/repos/diaspora/diaspora/tags","blobs_url":"https://api.github.com/repos/diaspora/diaspora/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/diaspora/diaspora/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/diaspora/diaspora/git/refs{/sha}","trees_url":"https://api.github.com/repos/diaspora/diaspora/git/trees{/sha}","statuses_url":"https://api.github.com/repos/diaspora/diaspora/statuses/{sha}","languages_url":"https://api.github.com/repos/diaspora/diaspora/languages","stargazers_url":"https://api.github.com/repos/diaspora/diaspora/stargazers","contributors_url":"https://api.github.com/repos/diaspora/diaspora/contributors","subscribers_url":"https://api.github.com/repos/diaspora/diaspora/subscribers","subscription_url":"https://api.github.com/repos/diaspora/diaspora/subscription","commits_url":"https://api.github.com/repos/diaspora/diaspora/commits{/sha}","git_commits_url":"https://api.github.com/repos/diaspora/diaspora/git/commits{/sha}","comments_url":"https://api.github.com/repos/diaspora/diaspora/comments{/number}","issue_comment_url":"https://api.github.com/repos/diaspora/diaspora/issues/comments{/number}","contents_url":"https://api.github.com/repos/diaspora/diaspora/contents/{+path}","compare_url":"https://api.github.com/repos/diaspora/diaspora/compare/{base}...{head}","merges_url":"https://api.github.com/repos/diaspora/diaspora/merges","archive_url":"https://api.github.com/repos/diaspora/diaspora/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/diaspora/diaspora/downloads","issues_url":"https://api.github.com/repos/diaspora/diaspora/issues{/number}","pulls_url":"https://api.github.com/repos/diaspora/diaspora/pulls{/number}","milestones_url":"https://api.github.com/repos/diaspora/diaspora/milestones{/number}","notifications_url":"https://api.github.com/repos/diaspora/diaspora/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/diaspora/diaspora/labels{/name}","releases_url":"https://api.github.com/repos/diaspora/diaspora/releases{/id}","deployments_url":"https://api.github.com/repos/diaspora/diaspora/deployments","created_at":"2010-09-15T05:20:04Z","updated_at":"2016-09-20T16:13:34Z","pushed_at":"2016-09-21T23:51:56Z","git_url":"git://github.com/diaspora/diaspora.git","ssh_url":"git@github.com:diaspora/diaspora.git","clone_url":"https://github.com/diaspora/diaspora.git","svn_url":"https://github.com/diaspora/diaspora","homepage":"https://diasporafoundation.org/","size":246242,"stargazers_count":10898,"watchers_count":10898,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2786,"mirror_url":null,"open_issues_count":387,"forks":2786,"open_issues":387,"watchers":10898,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/diaspora/diaspora/pulls/7118"},"html":{"href":"https://github.com/diaspora/diaspora/pull/7118"},"issue":{"href":"https://api.github.com/repos/diaspora/diaspora/issues/7118"},"comments":{"href":"https://api.github.com/repos/diaspora/diaspora/issues/7118/comments"},"review_comments":{"href":"https://api.github.com/repos/diaspora/diaspora/pulls/7118/comments"},"review_comment":{"href":"https://api.github.com/repos/diaspora/diaspora/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/diaspora/diaspora/pulls/7118/commits"},"statuses":{"href":"https://api.github.com/repos/diaspora/diaspora/statuses/405045804eb406070f8bb65bce2fcda1f3c11b0d"}}}}
{"actor":{"display_login":"diaspora-code-review"}}