-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
effort:mediumMedium effort to resolveMedium effort to resolveimpact:mediumMedium impact issueMedium impact issue
Description
Summary
Add the ability to sort and filter products on the products listing page by average review rating.
Context
Currently, products on the /products page are displayed alphabetically with no way for users to sort or filter by rating. Users who want to find highly-rated coffees must scan each card individually. Adding sort and filter controls improves discoverability.
Proposed Solution
- Create a new
ProductSort.sveltecomponent with:- A sort dropdown (Name / Highest Rated) that reorders product cards client-side
- A star-range filter (min/max dropdowns) that shows/hides products based on rounded average rating
- Add
data-nameanddata-ratingattributes to product cards for client-side DOM manipulation - Import and render the component in
src/pages/products/index.astro
Acceptance Criteria
- Products can be sorted by name (default) or highest rated
- Products can be filtered by a min and max star range (0-5)
- Min/max selects stay consistent (min never exceeds max)
- No page reload required for sort or filter changes
Additional Information
This follows the same client-side DOM manipulation pattern used by the existing ReviewFilter.svelte component.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
effort:mediumMedium effort to resolveMedium effort to resolveimpact:mediumMedium impact issueMedium impact issue