GitHub PullRequestReviewCommentEvent at 2014-05-09 14:05:08
Repository: interactive-maps
Actor: RafLeszczynski
Payload: {"comment":{"url":"https://api.github.com/repos/Wikia/interactive-maps/pulls/comments/12476622","id":12476622,"diff_hunk":"@@ -10,15 +10,44 @@\n \t * @returns {object} Leaflet Marker\n \t */\n \tfunction addPointOnMap(point) {\n-\t\tvar popupHtml = '<h3>' + point.name + '</h3>' +\n-\t\t\t'<p>' +point.description + '</p>';\n-\t\treturn L.marker([ point.lat, point.lon ], {\n-\t\t\triseOnHover: true\n-\t\t})\n-\t\t\t.bindPopup(popupHtml)\n+        //TODO what about edit link? where do we get it from?\n+\t\tvar popupHtml = '<article>';","path":"assets/scripts/map.js","position":17,"original_position":17,"commit_id":"271301ccff50af5d22e56cbaf28441f3a40aa538","original_commit_id":"271301ccff50af5d22e56cbaf28441f3a40aa538","user":{"login":"RafLeszczynski","id":859645,"avatar_url":"https://avatars.githubusercontent.com/u/859645?","gravatar_id":"b49055ce800a07967a6450d4bcd8adf3","url":"https://api.github.com/users/RafLeszczynski","html_url":"https://github.com/RafLeszczynski","followers_url":"https://api.github.com/users/RafLeszczynski/followers","following_url":"https://api.github.com/users/RafLeszczynski/following{/other_user}","gists_url":"https://api.github.com/users/RafLeszczynski/gists{/gist_id}","starred_url":"https://api.github.com/users/RafLeszczynski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RafLeszczynski/subscriptions","organizations_url":"https://api.github.com/users/RafLeszczynski/orgs","repos_url":"https://api.github.com/users/RafLeszczynski/repos","events_url":"https://api.github.com/users/RafLeszczynski/events{/privacy}","received_events_url":"https://api.github.com/users/RafLeszczynski/received_events","type":"User","site_admin":false},"body":"This function is starting to be pretty long. We have to things going on: 1) creating HTML markup for popup, 2) assigning popup with marker and adding it to map. Consider splitting it into to functions. Best practice - keep the functions short, one action per function 6-10 lines if possible :-)","created_at":"2014-05-09T14:05:08Z","updated_at":"2014-05-09T14:05:08Z","html_url":"https://github.com/Wikia/interactive-maps/pull/58#discussion_r12476622","pull_request_url":"https://api.github.com/repos/Wikia/interactive-maps/pulls/58","_links":{"self":{"href":"https://api.github.com/repos/Wikia/interactive-maps/pulls/comments/12476622"},"html":{"href":"https://github.com/Wikia/interactive-maps/pull/58#discussion_r12476622"},"pull_request":{"href":"https://api.github.com/repos/Wikia/interactive-maps/pulls/58"}}}}