Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QDB Scoring System #78

Open
billdybas opened this issue Mar 12, 2018 · 0 comments
Open

QDB Scoring System #78

billdybas opened this issue Mar 12, 2018 · 0 comments

Comments

@billdybas
Copy link
Member

There are a lot of quotes in the QDB, but how do we know which quotes are the best, funniest, most memorable?

We could introduce an up-vote system where any member (has earned at least 1 membership ever), when logged-in to the website, can up-vote quotes they like. One up-vote per member per quote. They can rescind their upvotes. Perhaps there's even a page where members can see their upvoted quotes.

This would help in determining "fresh" quotes to include in the weekly email digest, since it may get unwieldy if the email is sending out dozens of quotes each week – it could send out say, the top 5 quotes added last week plus 2 from the archive. (#77)

This task requires:

  • Create an "Upvote" model that is associated to a User and a Quote
  • Create routes to vote and un-vote on a particular quote (authenticated routes & pull the currently signed in user)
  • Update existing quotes implementation to include votes
    • Unauthenticated, retrieving quotes should return just the count of upvotes
    • Authenticated, retrieving quotes should return the count of upvotes as well as whether the authenticated user voted on the particular quote

Also, a frontend experience should be designed:

  • Display an upvote icon with a count next to quotes; can't be clicked for un-authed users
  • For authed users, turn it into a button; when clicked, highlights, and indicates vote; when clicked again, un-highlights, and indicates un-vote; when you visit this page authed, the correct highlight status is displayed based on your previous voting choices
  • Filter on the QDB for authed users to filter quotes by upvote status
  • Filters on the QDB for "top" and "new" quotes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant