{"action":"created","comment":{"url":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/comments/43973031","id":43973031,"diff_hunk":"@@ -0,0 +1,79 @@\n+'use strict';\n+\n+/**\n+ * EventObserver\n+ * @class\n+ *\n+ * @classdesc Used for creating an object\n+ *   that can be used to dispatch and listen to custom events.\n+ * @returns {Object} An EventObserver instance.\n+ */\n+function EventObserver() {\n+\n+  // The events registered on this instance.\n+  var _events = {};\n+\n+  /**\n+   * Register an event listener.\n+   * @param {string} evt The event name to listen for.\n+   * @param {Function} callback The function called when the event has fired.\n+   * @returns {Object} The instance this EventObserver instance is decorating.\n+   */\n+  function addEventListener( evt, callback ) {\n+    if ( _events.hasOwnProperty( evt ) ) {\n+      _events[evt].push( callback );\n+    } else {\n+      _events[evt] = [ callback ];","path":"cfgov/preprocessed/js/modules/util/EventObserver.js","position":26,"original_position":26,"commit_id":"90108fbd341964c6399abccdc38c62bd91c8406a","original_commit_id":"62f8136e95e8c66cc8a17c54e082ad7d9e00d77f","user":{"login":"anselmbradford","id":704760,"avatar_url":"https://avatars.githubusercontent.com/u/704760?v=3","gravatar_id":"","url":"https://api.github.com/users/anselmbradford","html_url":"https://github.com/anselmbradford","followers_url":"https://api.github.com/users/anselmbradford/followers","following_url":"https://api.github.com/users/anselmbradford/following{/other_user}","gists_url":"https://api.github.com/users/anselmbradford/gists{/gist_id}","starred_url":"https://api.github.com/users/anselmbradford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anselmbradford/subscriptions","organizations_url":"https://api.github.com/users/anselmbradford/orgs","repos_url":"https://api.github.com/users/anselmbradford/repos","events_url":"https://api.github.com/users/anselmbradford/events{/privacy}","received_events_url":"https://api.github.com/users/anselmbradford/received_events","type":"User","site_admin":false},"body":"We are currently using the default ESLint rule `computed-property-spacing` behavior that does not set for spaces inside brackets outside of literal array definitions. What do you think? Okay as is, or should we update the linter?","created_at":"2015-11-05T03:27:57Z","updated_at":"2015-11-05T03:27:57Z","html_url":"https://github.com/cfpb/cfgov-refresh/pull/1134#discussion_r43973031","pull_request_url":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/1134","_links":{"self":{"href":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/comments/43973031"},"html":{"href":"https://github.com/cfpb/cfgov-refresh/pull/1134#discussion_r43973031"},"pull_request":{"href":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/1134"}}},"pull_request":{"url":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/1134","id":49584722,"html_url":"https://github.com/cfpb/cfgov-refresh/pull/1134","diff_url":"https://github.com/cfpb/cfgov-refresh/pull/1134.diff","patch_url":"https://github.com/cfpb/cfgov-refresh/pull/1134.patch","issue_url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/1134","number":1134,"state":"open","locked":false,"title":"Adds browse-basic prototype w/ Expandable/ExpandableGroup atomic components","user":{"login":"anselmbradford","id":704760,"avatar_url":"https://avatars.githubusercontent.com/u/704760?v=3","gravatar_id":"","url":"https://api.github.com/users/anselmbradford","html_url":"https://github.com/anselmbradford","followers_url":"https://api.github.com/users/anselmbradford/followers","following_url":"https://api.github.com/users/anselmbradford/following{/other_user}","gists_url":"https://api.github.com/users/anselmbradford/gists{/gist_id}","starred_url":"https://api.github.com/users/anselmbradford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anselmbradford/subscriptions","organizations_url":"https://api.github.com/users/anselmbradford/orgs","repos_url":"https://api.github.com/users/anselmbradford/repos","events_url":"https://api.github.com/users/anselmbradford/events{/privacy}","received_events_url":"https://api.github.com/users/anselmbradford/received_events","type":"User","site_admin":false},"body":"Adds browse-basic prototype.\r\nDFJR-508 - Atomizes Expandable/ExpandableGroup components.\r\nRequired for DFJR-501.\r\n\r\n## Additions\r\n\r\n- Adds browse-basic prototype page and URL.\r\n- Adds Expandable molecule.\r\n- Adds ExpandableGroup organism.\r\n- Adds `classList` JS polyfill.\r\n- Adds `u-hide` utility class to hide an element.\r\n- Adds `EventObserver.js` for adding event broadcaster capability to JS classes.\r\n\r\n## Changes\r\n\r\n- Edits expandable styles in cf-enhancements to use new padding from Design mocks.\r\n\r\n## Testing\r\n\r\n- Visit `http://localhost:8000/browse-basic/`\r\n\r\n## Review\r\n\r\n- @KimberlyMunoz \r\n- @sebworks \r\n- @jimmynotjim \r\n- @ajbush \r\n\r\n## Screenshots\r\n\r\nJS\r\n![screen shot 2015-11-03 at 11 50 01 am](https://cloud.githubusercontent.com/assets/704760/10915196/b9dfb998-8223-11e5-8276-1dd255e4b9aa.png)\r\n\r\nno-JS\r\n![screen shot 2015-11-03 at 12 00 15 pm](https://cloud.githubusercontent.com/assets/704760/10915209/c182cce4-8223-11e5-8023-9dd02f82c8c2.png)\r\n\r\n## Todos\r\n\r\n- **Atomic expandables vs cf-expandables**. This removes some of the jQuery dependencies from the Expandables for DOM querying, however, we're currently loading cf-expandable JS globally so this contains a block of code to negate the global code for this prototype. This will need to be removed when that discrepancy is resolved.\r\n- **aria attributes**. Should the aria attributes be set in the HTML at the macro level or is it okay to set them via JS only?\r\n- **Atomic class names**. I wasn't sure if the expandable classes should be recreated as `m-expandable` and `o-expandable-group`.","created_at":"2015-11-03T17:23:13Z","updated_at":"2015-11-05T03:27:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"13c4a6d0924217070f4c14ddca7a605e6ccdb4f8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/1134/commits","review_comments_url":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/1134/comments","review_comment_url":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/1134/comments","statuses_url":"https://api.github.com/repos/cfpb/cfgov-refresh/statuses/90108fbd341964c6399abccdc38c62bd91c8406a","head":{"label":"cfpb:atomic_expandables","ref":"atomic_expandables","sha":"90108fbd341964c6399abccdc38c62bd91c8406a","user":{"login":"cfpb","id":1071563,"avatar_url":"https://avatars.githubusercontent.com/u/1071563?v=3","gravatar_id":"","url":"https://api.github.com/users/cfpb","html_url":"https://github.com/cfpb","followers_url":"https://api.github.com/users/cfpb/followers","following_url":"https://api.github.com/users/cfpb/following{/other_user}","gists_url":"https://api.github.com/users/cfpb/gists{/gist_id}","starred_url":"https://api.github.com/users/cfpb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfpb/subscriptions","organizations_url":"https://api.github.com/users/cfpb/orgs","repos_url":"https://api.github.com/users/cfpb/repos","events_url":"https://api.github.com/users/cfpb/events{/privacy}","received_events_url":"https://api.github.com/users/cfpb/received_events","type":"Organization","site_admin":false},"repo":{"id":18852566,"name":"cfgov-refresh","full_name":"cfpb/cfgov-refresh","owner":{"login":"cfpb","id":1071563,"avatar_url":"https://avatars.githubusercontent.com/u/1071563?v=3","gravatar_id":"","url":"https://api.github.com/users/cfpb","html_url":"https://github.com/cfpb","followers_url":"https://api.github.com/users/cfpb/followers","following_url":"https://api.github.com/users/cfpb/following{/other_user}","gists_url":"https://api.github.com/users/cfpb/gists{/gist_id}","starred_url":"https://api.github.com/users/cfpb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfpb/subscriptions","organizations_url":"https://api.github.com/users/cfpb/orgs","repos_url":"https://api.github.com/users/cfpb/repos","events_url":"https://api.github.com/users/cfpb/events{/privacy}","received_events_url":"https://api.github.com/users/cfpb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cfpb/cfgov-refresh","description":"In-progress redesign of the consumerfinance.gov website.","fork":false,"url":"https://api.github.com/repos/cfpb/cfgov-refresh","forks_url":"https://api.github.com/repos/cfpb/cfgov-refresh/forks","keys_url":"https://api.github.com/repos/cfpb/cfgov-refresh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cfpb/cfgov-refresh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cfpb/cfgov-refresh/teams","hooks_url":"https://api.github.com/repos/cfpb/cfgov-refresh/hooks","issue_events_url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/events{/number}","events_url":"https://api.github.com/repos/cfpb/cfgov-refresh/events","assignees_url":"https://api.github.com/repos/cfpb/cfgov-refresh/assignees{/user}","branches_url":"https://api.github.com/repos/cfpb/cfgov-refresh/branches{/branch}","tags_url":"https://api.github.com/repos/cfpb/cfgov-refresh/tags","blobs_url":"https://api.github.com/repos/cfpb/cfgov-refresh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cfpb/cfgov-refresh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cfpb/cfgov-refresh/git/refs{/sha}","trees_url":"https://api.github.com/repos/cfpb/cfgov-refresh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cfpb/cfgov-refresh/statuses/{sha}","languages_url":"https://api.github.com/repos/cfpb/cfgov-refresh/languages","stargazers_url":"https://api.github.com/repos/cfpb/cfgov-refresh/stargazers","contributors_url":"https://api.github.com/repos/cfpb/cfgov-refresh/contributors","subscribers_url":"https://api.github.com/repos/cfpb/cfgov-refresh/subscribers","subscription_url":"https://api.github.com/repos/cfpb/cfgov-refresh/subscription","commits_url":"https://api.github.com/repos/cfpb/cfgov-refresh/commits{/sha}","git_commits_url":"https://api.github.com/repos/cfpb/cfgov-refresh/git/commits{/sha}","comments_url":"https://api.github.com/repos/cfpb/cfgov-refresh/comments{/number}","issue_comment_url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/comments{/number}","contents_url":"https://api.github.com/repos/cfpb/cfgov-refresh/contents/{+path}","compare_url":"https://api.github.com/repos/cfpb/cfgov-refresh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cfpb/cfgov-refresh/merges","archive_url":"https://api.github.com/repos/cfpb/cfgov-refresh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cfpb/cfgov-refresh/downloads","issues_url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues{/number}","pulls_url":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls{/number}","milestones_url":"https://api.github.com/repos/cfpb/cfgov-refresh/milestones{/number}","notifications_url":"https://api.github.com/repos/cfpb/cfgov-refresh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cfpb/cfgov-refresh/labels{/name}","releases_url":"https://api.github.com/repos/cfpb/cfgov-refresh/releases{/id}","created_at":"2014-04-16T19:22:03Z","updated_at":"2015-11-04T22:29:54Z","pushed_at":"2015-11-05T03:22:59Z","git_url":"git://github.com/cfpb/cfgov-refresh.git","ssh_url":"git@github.com:cfpb/cfgov-refresh.git","clone_url":"https://github.com/cfpb/cfgov-refresh.git","svn_url":"https://github.com/cfpb/cfgov-refresh","homepage":"","size":103603,"stargazers_count":11,"watchers_count":11,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":18,"mirror_url":null,"open_issues_count":102,"forks":18,"open_issues":102,"watchers":11,"default_branch":"flapjack"}},"base":{"label":"cfpb:flapjack","ref":"flapjack","sha":"35b1a74f122d7a04f24d207174e58b2c55cd5315","user":{"login":"cfpb","id":1071563,"avatar_url":"https://avatars.githubusercontent.com/u/1071563?v=3","gravatar_id":"","url":"https://api.github.com/users/cfpb","html_url":"https://github.com/cfpb","followers_url":"https://api.github.com/users/cfpb/followers","following_url":"https://api.github.com/users/cfpb/following{/other_user}","gists_url":"https://api.github.com/users/cfpb/gists{/gist_id}","starred_url":"https://api.github.com/users/cfpb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfpb/subscriptions","organizations_url":"https://api.github.com/users/cfpb/orgs","repos_url":"https://api.github.com/users/cfpb/repos","events_url":"https://api.github.com/users/cfpb/events{/privacy}","received_events_url":"https://api.github.com/users/cfpb/received_events","type":"Organization","site_admin":false},"repo":{"id":18852566,"name":"cfgov-refresh","full_name":"cfpb/cfgov-refresh","owner":{"login":"cfpb","id":1071563,"avatar_url":"https://avatars.githubusercontent.com/u/1071563?v=3","gravatar_id":"","url":"https://api.github.com/users/cfpb","html_url":"https://github.com/cfpb","followers_url":"https://api.github.com/users/cfpb/followers","following_url":"https://api.github.com/users/cfpb/following{/other_user}","gists_url":"https://api.github.com/users/cfpb/gists{/gist_id}","starred_url":"https://api.github.com/users/cfpb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfpb/subscriptions","organizations_url":"https://api.github.com/users/cfpb/orgs","repos_url":"https://api.github.com/users/cfpb/repos","events_url":"https://api.github.com/users/cfpb/events{/privacy}","received_events_url":"https://api.github.com/users/cfpb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cfpb/cfgov-refresh","description":"In-progress redesign of the consumerfinance.gov website.","fork":false,"url":"https://api.github.com/repos/cfpb/cfgov-refresh","forks_url":"https://api.github.com/repos/cfpb/cfgov-refresh/forks","keys_url":"https://api.github.com/repos/cfpb/cfgov-refresh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cfpb/cfgov-refresh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cfpb/cfgov-refresh/teams","hooks_url":"https://api.github.com/repos/cfpb/cfgov-refresh/hooks","issue_events_url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/events{/number}","events_url":"https://api.github.com/repos/cfpb/cfgov-refresh/events","assignees_url":"https://api.github.com/repos/cfpb/cfgov-refresh/assignees{/user}","branches_url":"https://api.github.com/repos/cfpb/cfgov-refresh/branches{/branch}","tags_url":"https://api.github.com/repos/cfpb/cfgov-refresh/tags","blobs_url":"https://api.github.com/repos/cfpb/cfgov-refresh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cfpb/cfgov-refresh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cfpb/cfgov-refresh/git/refs{/sha}","trees_url":"https://api.github.com/repos/cfpb/cfgov-refresh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cfpb/cfgov-refresh/statuses/{sha}","languages_url":"https://api.github.com/repos/cfpb/cfgov-refresh/languages","stargazers_url":"https://api.github.com/repos/cfpb/cfgov-refresh/stargazers","contributors_url":"https://api.github.com/repos/cfpb/cfgov-refresh/contributors","subscribers_url":"https://api.github.com/repos/cfpb/cfgov-refresh/subscribers","subscription_url":"https://api.github.com/repos/cfpb/cfgov-refresh/subscription","commits_url":"https://api.github.com/repos/cfpb/cfgov-refresh/commits{/sha}","git_commits_url":"https://api.github.com/repos/cfpb/cfgov-refresh/git/commits{/sha}","comments_url":"https://api.github.com/repos/cfpb/cfgov-refresh/comments{/number}","issue_comment_url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/comments{/number}","contents_url":"https://api.github.com/repos/cfpb/cfgov-refresh/contents/{+path}","compare_url":"https://api.github.com/repos/cfpb/cfgov-refresh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cfpb/cfgov-refresh/merges","archive_url":"https://api.github.com/repos/cfpb/cfgov-refresh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cfpb/cfgov-refresh/downloads","issues_url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues{/number}","pulls_url":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls{/number}","milestones_url":"https://api.github.com/repos/cfpb/cfgov-refresh/milestones{/number}","notifications_url":"https://api.github.com/repos/cfpb/cfgov-refresh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cfpb/cfgov-refresh/labels{/name}","releases_url":"https://api.github.com/repos/cfpb/cfgov-refresh/releases{/id}","created_at":"2014-04-16T19:22:03Z","updated_at":"2015-11-04T22:29:54Z","pushed_at":"2015-11-05T03:22:59Z","git_url":"git://github.com/cfpb/cfgov-refresh.git","ssh_url":"git@github.com:cfpb/cfgov-refresh.git","clone_url":"https://github.com/cfpb/cfgov-refresh.git","svn_url":"https://github.com/cfpb/cfgov-refresh","homepage":"","size":103603,"stargazers_count":11,"watchers_count":11,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":18,"mirror_url":null,"open_issues_count":102,"forks":18,"open_issues":102,"watchers":11,"default_branch":"flapjack"}},"_links":{"self":{"href":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/1134"},"html":{"href":"https://github.com/cfpb/cfgov-refresh/pull/1134"},"issue":{"href":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/1134"},"comments":{"href":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/1134/comments"},"review_comments":{"href":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/1134/comments"},"review_comment":{"href":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/1134/commits"},"statuses":{"href":"https://api.github.com/repos/cfpb/cfgov-refresh/statuses/90108fbd341964c6399abccdc38c62bd91c8406a"}}}}