Best Book Awards
Feature: Best Books
https://docs.google.com/document/d/1Ddeg-fWWZ0iCFzVtZR0yGY_vCPttIUrd4tCIWwvYj6g/edit#heading=h.hwsgbba3g9bn
A feature called "Best Book Awards", where a patron who has Already Read a book may nominate it as the Best Book on a Topic.
Requirements
- [x] Formalize the schema for Best Books
- [ ] Core Models for Best Book Nominations
- https://github.com/internetarchive/openlibrary/tree/master/openlibrary/core awards.py
- [ ] JSON API (similar for ratings) for submitting, updating, and deleting nominations
- [ ] Adding π total counts to the Community Interest Bar
- [ ] Updating the Review Section to include π counts-per-topic
- [ ] Updating the
Already ReadReading Log form to allow Best Book nominations - [ ] Creating a form for submitting Best Book nominations
Known Bugs
- [ ] Currently, as of Oct 8, 2024, if you submit an award w/o having marked the book as "Already Read", you see a toast error like: "You can award only if you have read the bookNonemekarpeles". (this has been on front-end but not on backend)
Design Feedback
- [ ] The "Comments" section of the bestbook-modal should be larger / resizable (e.g. a textarea?)
- [ ]
Next Steps
- [ ] Fix pre-commit errors
- [x] Make it so when you click the awards icon, it pulls up a new modal named
bestbook_modal_link(because previously it wasobservations_modal_link)- [x] Add js handlers to respond to
bestbook_modal_linkfor modal toast messages
- [x] Add js handlers to respond to
- [x] When we submit the form, we need some way to take the data and submit to the backend without refreshing the page β weβre using a click handler on the submit button +
fetchPOST - [x] Add caution message if award is clicked but book is not yet marked as "already read"
- [x] CSS cleanup: Consolidate + decrease duplicated styles in our less using
&nesting and cleaning up classes - [ ] DRY & Update APIs: Get the awards and count together (needs discussion)
- [ ] Mobile responsiveness & review (needs discussion)
Schema
table best_book_nominations:
-
idserial -
submitter -
work_id -
edition_id(optional) -
topic(name or Tag key) -
comment(optional) -
created -
updated
We may wish to consider (during design call) ideas for merging Star Ratings, Review Tags, and Best Book trophies into the same submit form/component so there aren't so many competing features.
EDIT: It looks like goodreads had a similar idea:
@noobCoderVP can I assign you to this one?
Yes sure
EDIT: @mekarpeles + @noobCoderVP are using this message for Project Managing this issue:
Feature: Best Books
https://docs.google.com/document/d/1Ddeg-fWWZ0iCFzVtZR0yGY_vCPttIUrd4tCIWwvYj6g/edit#heading=h.hwsgbba3g9bn
A feature called "Best Book Awards", where a patron who has Already Read a book may nominate it as the Best Book on a Topic.
Requirements
- [x] Formalize the schema for Best Books
- [ ] Core Models for Best Book Nominations
- https://github.com/internetarchive/openlibrary/tree/master/openlibrary/core awards.py
- [ ] JSON API (similar for ratings) for submitting, updating, and deleting nominations
- [ ] Adding π total counts to the Community Interest Bar
- [ ] Updating the Review Section to include π counts-per-topic
- [ ] Updating the
Already ReadReading Log form to allow Best Book nominations - [ ] Creating a form for submitting Best Book nominations
- [ ] Complete autocomplete integration for topic
Test Cases
- [ ] What happens if a patron loads the page, uses JS to mark book as "Already Read" (without refreshing) and then clicks on "award" and tries to submit best book?
Known Bugs
- [x] Currently, as of Oct 8, 2024, if you submit an award w/o having marked the book as "Already Read", you see a toast error like: "You can award only if you have read the bookNonemekarpeles". (this has been on front-end but not on backend)
Design Feedback
- [ ] The "Comments" section of the bestbook-modal should be larger / resizable (e.g. a textarea?)
Next Steps
- [ ] Fix pre-commit errors
- [x] Make it so when you click the awards icon, it pulls up a new modal named
bestbook_modal_link(because previously it wasobservations_modal_link)- [x] Add js handlers to respond to
bestbook_modal_linkfor modal toast messages
- [x] Add js handlers to respond to
- [x] When we submit the form, we need some way to take the data and submit to the backend without refreshing the page β weβre using a click handler on the submit button +
fetchPOST - [x] Add caution message if award is clicked but book is not yet marked as "already read"
- [x] Fix submit logic, close bestbook modal, and open the community review tags form
- [x] CSS cleanup: Consolidate + decrease duplicated styles in our less using
&nesting and cleaning up classes - [ ] DRY & Update APIs: Get the awards and count together (needs discussion)
- [ ] Mobile responsiveness & review (needs discussion)
- [ ] Complete autocomplete integration for topic
Schema
table best_book_nominations:
-
idserial -
submitter -
work_id -
edition_id(optional) -
topic(name or Tag key) -
comment(optional) -
created -
updated