Single Review Page
Description / Background
This document describes the implementation of a Single Review Page feature, allowing users to view the full details of individual customer reviews directly from a store page. This improves user engagement by offering a more in-depth and visually enhanced review experience.
The Single Review Page was introduced to address feedback that users wanted to see detailed customer reviews without leaving the store page. By surfacing richer review details, we aim to increase engagement, trust, and time spent per page.
Glossary
Private (https://app.clickup.com/9003122396/docs/8ca1fpw-35796/8ca1fpw-41516)
Objectives
- User can see the review section on store page
- User can click the individual review to see the details
- User can see the single review page
Scope
Web → store page → review section
Sequence Diagram / Flow

ERD

Backend Implementation
- Updated the string delimiter for
"dine_in"to single quotes'dine_in'for consistency. - Added the
EncryptableHelpermodule. - Updated the
createmethod's JSON response formatting for better readability. - Introduced a new
showmethod:- Decrypts the review ID received through the request.
- Fetches the review using the decrypted ID.
- Implements caching for the response.
- Handles errors like missing required parameters.
- Added
rating_types:- Determines the rating dimensions based on the
service_typeof the reservation.
- Determines the rating dimensions based on the
- New Attributes:
reservation_service_type: Returns the service type or an empty string if not present.ratings: Constructs a hash of rating dimensions and their associated values.occasion: Formats and returns the occasion.recommendations: Fetches and formats recommended dimensions.
- Added a new
showroute for thereviewsresource underapi/v5.
[
github.com
https://github.com/hungryhub-team/hh-server/commit/2301d5b3f56c89084d0c2ebc443d469c61004624
](https://github.com/hungryhub-team/hh-server/commit/2301d5b3f56c89084d0c2ebc443d469c61004624)
[
github.com
https://github.com/hungryhub-team/hh-server/pull/6576
](https://github.com/hungryhub-team/hh-server/pull/6576)
Frontend Implementation
- Added new components and pages for a detailed review experience:
ReviewExperience.vueReviewGallery.vueReviewHeader.vueReviewRatingItem.vueReviewRatings.vueReviewSection.vueReviewPage.astroreviewDetail.tsservice for fetching review details.index.astroand[client].astroto handle review detail pages.
- Added a new function
redirectToReviewDetailinredirection.ts, which navigates to a detailed review page using the restaurant's slug and an encrypted review ID. - Added optional fields to
attributesReviewsSchema:occasion,recommendations,reservationServiceType, andratings(with subfields likeambience,food,service, andvalue).
- Updated components like
ReviewStarSummary.vue,ReviewStarSummaryDesktop.vue, andReviewStarSummaryMobile.vueto include a new event,onViewReviewDetail, for navigating to the review detail page. - Modified helper functions such as
onViewReviewDetailinreviewHelper.tsfor handling the view-review-detail functionality. - Improved the breadcrumb component (
Breadcrumb.vue) by addingflex-wrapto the class for better responsiveness. - Adjusted
CustomerReviewGalleryDesktop.vue:- Made the photo dimensions larger (
215x215instead of145x145) for better visuals. - Introduced a dynamic minimum photo count (
minPhotosNeedSlider) to determine if a slider is required.
- Made the photo dimensions larger (
- Added click handlers and emitted events (
on-view-review-detail) inCustomerReviewHeader.vueandResturantCustomerReview.vue. - Improved CSS styles and responsiveness across components.
- Enhanced error handling for review-related operations.
- Consolidated and enhanced the review helper methods in
reviewHelper.ts. - Added dummy data fields in
createDummyReviewsto include new schema fields. - Fixed slider behavior in
CustomerReviewGalleryDesktop.vue. - Addressed minor CSS issues such as background gradient layering in
ReviewStarSummaryMobile.vue.
[
github.com
https://github.com/hungryhub-team/hh-pegasus/pull/1621
](https://github.com/hungryhub-team/hh-pegasus/pull/1621)
PRD & Task
PRD → Private (https://app.clickup.com/9003122396/docs/8ca1fpw-7922/8ca1fpw-48116)
Private (https://app.clickup.com/t/86cy8203g) Private (https://app.clickup.com/t/86cykpg40) Private (https://app.clickup.com/t/86cyb4579)
Design
[
www.figma.com
https://www.figma.com/design/co41MQXvIT2Cu4lUZNZF0Z/Review-%26-Rating?node-id=835-1419&p=f&t=CO0dRBFf51hPcStI-0
](https://www.figma.com/design/co41MQXvIT2Cu4lUZNZF0Z/Review-%26-Rating?node-id=835-1419&p=f&t=CO0dRBFf51hPcStI-0)
API Blueprint
| Method | Path | URL | Description | Payload | Response |
|---|---|---|---|---|---|
| GET | /api/v5/reviews/:id | get single review | review id | { "data": { "id": "52948", "type": "reviews", "attributes": { "rating": 5, "title": null, "created_at": "2025-03-14T06:44:58.000Z", "user_name": "Hungry Hub Diner", "review_recommended_fors": [ { "id": 59468, "review_id": 52948, "dimension_id": 5, "created_at": "2025-03-14T06:45:10.000Z", "updated_at": "2025-03-14T06:45:10.000Z" } ], "packages": [ { "id": 4368, "name": "All You Can Eat Pay Now", "package_type": "ayce" } ], "review": "Good", "encrypted_id": "doDNp", "user_avatar": { "thumb": "https://hh-engineering.my.id/uploads/user/avatar/188925/WhatsApp_Image_2024-08-16_at_11.34.32_AM.jpeg", "medium": "https://hh-engineering.my.id/uploads/user/avatar/188925/WhatsApp_Image_2024-08-16_at_11.34.32_AM.jpeg", "original": "https://hh-engineering.my.id/uploads/user/avatar/188925/WhatsApp_Image_2024-08-16_at_11.34.32_AM.jpeg" }, "pictures": [ { "thumb": "/uploads/review_photo/photo/39234/00.jpeg", "original": "/uploads/review_photo/photo/39234/00.jpeg", "caption": "Le Normandile Review" } ], "avatar": "https://hh-engineering.sgp1.cdn.digitaloceanspaces.com/assets/v2/mr_hungry-09b1fe8ac22e6907bae45ba17a49a4b3566ab6e9663380a56e35176d803b4466.png", "restaurant": { "id": 1631, "name": "Le Normandile", "link": "le-normandile-bangkok" }, "link": "https://hh-engineering.my.id/restaurants/le-normandile-bangkok/reviews/doDNp", "reservation_service_type": "dine_in", "ratings": { "food": 5, "ambience": 5, "service": 5, "value": 5 }, "occasion": "Date", "recommendations": [ "Solo Dining" ] } }, "success": true, "message": null} |
New Query
-
DB Schema / Database Migration
-
Improvement:
| Feature Name | Date | What Changed | Description |
|---|---|---|---|
| single review | April 2025 | initial document |