vzctl / RationalReads

5 stars 1 forks source link

Add `users#show` - a list of the top ratings by a given user #7

Closed nevinera closed 9 years ago

nevinera commented 9 years ago

This PR actually includes a couple of other details:

3a8aa adds the puma gem to the Gemfile, which will cause heroku (and devs) to run under that instead of Webrick, for a probably enormous performance improvement (x4 locally, but possibly more on heroku).

4c40b Adds a limit to the leaderboard's size - it's not an issue at the current scale, but when you cross a few thousand users it'll start to become a problem rendering that much onto the screen. I'll revert this if you'd prefer - I think a paging solution is probably a better answer anyway.

Aside from those asides, I added an endpoint at /users/:id which essentially just displays a list of the user's ratings in descending order - the work in question is displayed with some detail, since discovery is the goal here. I cribbed the bulk of the styling from other sections of the application (reused where possible). The leaderboard and displayed individual comments both now use the username as a link to that page (styling unchanged).

nevinera commented 9 years ago

Oh, I wanted to suggest that you convert that list of 'Features/fixes to be implemented' (and possibly the 'Possible Features') into github issues - it'll make it a lot easier to recruit people to help implement things :-)

Amit-P-Amin commented 9 years ago

I'll look more into this tomorrow, but for now, I just want to say that this all looks delicious. Thank you!

Amit-P-Amin commented 9 years ago

Two small changes and it works! I've just got to make the styling in line with the rest of the site, and then I'll push the changes. The only other thing is to make the user ratings more accessible. Perhaps by having a similar users feature. Perhaps by showing a list of users who also gave the work 5 stars.

Amit-P-Amin commented 9 years ago

Great suggestion! I'll go ahead and move the list of features to issues.

Amit-P-Amin commented 9 years ago

Also, thanks for the code styling - I learned two things (scss and putting query selectors on individual lines). I wish I'd known how scss worked before I wrote those gajillion lines of css.