Skip to content

Conversation

siverne
Copy link
Member

@siverne siverne commented Nov 12, 2026

Closes #51. The backend part was merged in #52.

  • Stars can show half stars, in the review list and in «Nylig dømt».
  • The review form: the left half of a star gives half a star, the right half a whole star. The ten choices are radio buttons, so the arrow keys move in half steps and screen readers read «3,5 av 5 stjerner». Each half is at least 24 × 24 px (WCAG 2.5.8).
  • The wine page shows how many gave each score, from X-Wines and students together, with one row per whole star. The numbers are text; the bars are decoration.
  • After saving, the wine page fetches both the reviews and the wine again, so the shared average at the top updates at once.
  • Star helpers are moved to lib/stars.ts.
  • Tests for the stars, the distribution and half stars in the form.
  • README updated.

Tested: npm run check passes. Tried half stars with the mouse and the keyboard in the browser.

After merging: the VM needs npm ci and npm run db:migrate in backend/ (for #52 and #53), a backend restart and npm run buildvm.

@siverne siverne requested a review from a team as a code owner November 12, 2026 20:12
Copy link
Member

@williasc williasc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Ran and tested.

@williasc williasc merged commit 2e25453 into main Nov 12, 2026
@williasc williasc deleted the 51-half-stars-frontend branch November 12, 2026 22:17
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Half stars, shared average and rating distribution
2 participants