{"action":"created","issue":{"url":"https://api.github.com/repos/mattdeboard/gw2blackgate/issues/4","labels_url":"https://api.github.com/repos/mattdeboard/gw2blackgate/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/mattdeboard/gw2blackgate/issues/4/comments","events_url":"https://api.github.com/repos/mattdeboard/gw2blackgate/issues/4/events","html_url":"https://github.com/mattdeboard/gw2blackgate/pull/4","id":59006543,"number":4,"title":"Implement rating panel widget.","user":{"login":"mattdeboard","id":306571,"avatar_url":"https://avatars.githubusercontent.com/u/306571?v=3","gravatar_id":"","url":"https://api.github.com/users/mattdeboard","html_url":"https://github.com/mattdeboard","followers_url":"https://api.github.com/users/mattdeboard/followers","following_url":"https://api.github.com/users/mattdeboard/following{/other_user}","gists_url":"https://api.github.com/users/mattdeboard/gists{/gist_id}","starred_url":"https://api.github.com/users/mattdeboard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattdeboard/subscriptions","organizations_url":"https://api.github.com/users/mattdeboard/orgs","repos_url":"https://api.github.com/users/mattdeboard/repos","events_url":"https://api.github.com/users/mattdeboard/events{/privacy}","received_events_url":"https://api.github.com/users/mattdeboard/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-26T02:13:23Z","updated_at":"2015-02-26T02:17:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mattdeboard/gw2blackgate/pulls/4","html_url":"https://github.com/mattdeboard/gw2blackgate/pull/4","diff_url":"https://github.com/mattdeboard/gw2blackgate/pull/4.diff","patch_url":"https://github.com/mattdeboard/gw2blackgate/pull/4.patch"},"body":"All the CSS & images are lifted from [this](http://www.webcodo.net/rating-stars-system-with-jquery-ajax-php/) project. The relevant code is anything that doesn't end in .css or .png.\r\n\r\nTo see the rating panel, you can modify src/js/components/App.jsx to:\r\n\r\n```javascript\r\nvar React = require('react'),\r\n    _ = require('underscore'),\r\n    Carousel = require('./Carousel.jsx'),\r\n    Header = require('./Header.jsx'),\r\n    RatingPanel = require('./RatingPanel.jsx');\r\n\r\nvar App = React.createClass({\r\n  render: function() {\r\n    return (\r\n      <div className=\"container text-center wow fadeIn\">\r\n        <Header />\r\n        <RatingPanel maxRating={5} />\r\n        <Carousel people={this.props.streamers} />\r\n      </div>\r\n    )\r\n  }\r\n});\r\n\r\nmodule.exports = App;\r\n```\r\n\r\nThen run `gulp` (check the README in the project root for instructions). This will render the rating panel right above the carousel on the landing page."},"comment":{"url":"https://api.github.com/repos/mattdeboard/gw2blackgate/issues/comments/76110295","html_url":"https://github.com/mattdeboard/gw2blackgate/pull/4#issuecomment-76110295","issue_url":"https://api.github.com/repos/mattdeboard/gw2blackgate/issues/4","id":76110295,"user":{"login":"mattdeboard","id":306571,"avatar_url":"https://avatars.githubusercontent.com/u/306571?v=3","gravatar_id":"","url":"https://api.github.com/users/mattdeboard","html_url":"https://github.com/mattdeboard","followers_url":"https://api.github.com/users/mattdeboard/followers","following_url":"https://api.github.com/users/mattdeboard/following{/other_user}","gists_url":"https://api.github.com/users/mattdeboard/gists{/gist_id}","starred_url":"https://api.github.com/users/mattdeboard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattdeboard/subscriptions","organizations_url":"https://api.github.com/users/mattdeboard/orgs","repos_url":"https://api.github.com/users/mattdeboard/repos","events_url":"https://api.github.com/users/mattdeboard/events{/privacy}","received_events_url":"https://api.github.com/users/mattdeboard/received_events","type":"User","site_admin":false},"created_at":"2015-02-26T02:17:59Z","updated_at":"2015-02-26T02:17:59Z","body":"About the interactions:\r\n\r\nA particular rating will not be persisted/saved until a star is clicked. Just mousing over a star is not enough to save the rating. Personally I *hate* that on other websites so I didn't implement it that way. \r\n\r\nAlso, once a star is clicked, it's not possible to rate lower than 1 star or remove a rating. You can mouseover all the stars as long as you want, and they won't be saved (but they will turn gold). But if you click, say, the 4th star, a rating of 4 will be stored. If you then click on the 2nd star, a rating of 2 will be stored. \r\n\r\nIt will make more sense when you're actually looking at it."}}