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

Async star ratings #5957

Merged
merged 4 commits into from
Feb 3, 2022
Merged

Conversation

jimchamp
Copy link
Collaborator

@jimchamp jimchamp commented Dec 9, 2021

Closes #

Attaches on submit listeners to all star ratings forms on a page. On submit, the default page refresh is prevented and the ratings are submitted via JS.

If a submission fails, the rater is notified via toast message.

Technical

Replaced conditional rendering of "Clear my rating" button in template with conditional addition of hidden class, allowing the button's visibility to be toggled.
FadingToast constructor has been updated to prevent a null parent container being passed to the superclass Toast's constructor.

Testing

While logged in, do the following:

  1. Navigate to a book page.
  2. Leave a star rating. Ensure that the "Clear my rating" button appears, the correct stars are filled, and that the page does not refresh.
  3. Refresh the page. Ensure that the rating is as expected.
  4. Clear the rating. Ensure that filled stars are removed and that the button does not vanish.
  5. Refresh the page and ensure that no stars are filled.
  6. Navigate to your "Already read" log.
  7. Leave ratings for multiple books on this page. When you submit a rating, ensure that the rating applies only to the intended book.

Screenshot

star_rating

Stakeholders

@mekarpeles mekarpeles self-assigned this Dec 13, 2021
@mekarpeles mekarpeles added the Priority: 2 Important, as time permits. [managed] label Dec 13, 2021
@jimchamp jimchamp added Priority: 1 Do this week, receiving emails, time sensitive, . [managed] and removed Priority: 2 Important, as time permits. [managed] labels Jan 24, 2022
@mekarpeles
Copy link
Member

lgtm

@mekarpeles mekarpeles merged commit 7a43409 into internetarchive:master Feb 3, 2022
@jimchamp jimchamp deleted the feature/async-ratings branch July 15, 2022 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: 1 Do this week, receiving emails, time sensitive, . [managed]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants