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

Pass in mobile parameter to conditionally render star ratings form #9804

Conversation

rebecca-shoptaw
Copy link
Collaborator

@rebecca-shoptaw rebecca-shoptaw commented Aug 26, 2024

Closes #9632.

Fix. Prevents the star ratings form (with corresponding id's) from being repeated 3x in the work page, which was a problem for accessibility and code organization/simplicity.

Technical

Testing

  1. Go the page for any book, ideally one that already has at least one star rating
  2. Expand to desktop view and inspect the page, confirming that the IDs starRatingSection and ratingsForm each only appear once
  3. Confirm that clicking on the book's star ratings takes you to the star ratings form
  4. Adjust the page width until it switches to mobile view, confirming that the IDs starRatingSection--mobile and ratingsForm--mobile each appear just once on the page
  5. Confirm that clicking on the book's star ratings takes you to the star ratings form

Screenshot

Stakeholders

@cdrini

@rebecca-shoptaw rebecca-shoptaw marked this pull request as ready for review August 26, 2024 18:22
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 16.45%. Comparing base (ce16a79) to head (8892694).
Report is 279 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9804      +/-   ##
==========================================
+ Coverage   16.06%   16.45%   +0.39%     
==========================================
  Files          90       91       +1     
  Lines        4769     4897     +128     
  Branches      832      853      +21     
==========================================
+ Hits          766      806      +40     
- Misses       3480     3557      +77     
- Partials      523      534      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mekarpeles mekarpeles self-assigned this Aug 26, 2024
@mekarpeles
Copy link
Member

lgtm!

@mekarpeles mekarpeles merged commit 233dd13 into internetarchive:master Aug 29, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Star ratings form IDs appear more than once on book page
3 participants