Skip to content

Conversation

@danctila
Copy link
Contributor

@danctila danctila commented Apr 11, 2025

Description

Added to review related components:

  • Image picking in review flow
  • Restriction next review screen navigation to require filling out star rating + tag selection
  • Review images are sent to S3 bucket
  • Intro/outro screens for review flow

Image picking

imagedemo.mp4

Restricting next review screen

Below:

  • Stars + tags not filled out
  • Stars filled out
  • Tags filled out
  • Stars + tags filled out

Review submission S3

  • I abstracted the frontend integration into frontend/utils/s3uploads.ts which can be reused by other components later

Flow:

  1. User selects images, they are stored in the selectedImages state
  2. Review is submitted --> each image is uploaded to S3 first
  3. The S3 URLs are included in the review data
  4. The first image URL becomes the main review picture
  5. Any additional images are stored in an additionalImages array

Example response from when a review is submitted :

Image uploaded in S3 console:

Image in question:

Adding review image urls to DB

  • If a user uploads at least one image, the first image is taken as the main picture and inserted into the correct review document
  • If no image is uploaded, we default to the dish image and if there is no dish image, we default to ""

Intro/outro screens

Intro screen

Outro screen

Checklist

  • I have read the CONTRIBUTING.md.
  • I have self-reviewed my code and written tests.
  • I have made corresponding changes to the documentation.
  • All unit tests are passing locally.
  • I have merged the most recent commit from main into my branch.

@danctila danctila added the feature Introduces a new and complete feature label Apr 11, 2025
@danctila danctila self-assigned this Apr 11, 2025
@danctila danctila marked this pull request as ready for review April 11, 2025 03:17
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 6 out of 8 changed files in this pull request and generated no comments.

Files not reviewed (2)
  • frontend/app.json: Language not supported
  • frontend/package.json: Language not supported
Comments suppressed due to low confidence (1)

frontend/components/MyReview.tsx:143

  • The variable 'stepContent' is referenced but not defined in the diff. This will likely cause a runtime error; consider defining 'stepContent' or using the appropriate state variable for the current review step.
const currentStep = stepContent[step - 1];

Copy link
Member

@benjaspet benjaspet left a comment

Choose a reason for hiding this comment

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

We still encounter an issue where, after creating a review, upon clicking it on your user profile it loads infinitely, presumably due to its ID not being populated properly. This needs to be investigated.

@danctila
Copy link
Contributor Author

We still encounter an issue where, after creating a review, upon clicking it on your user profile it loads infinitely, presumably due to its ID not being populated properly. This needs to be investigated.

The issue was with the frontend call to the review endpoint and the issue now be fixed
https://github.com/user-attachments/assets/55b317c4-b73c-4938-a98a-c4c92d980727

@danctila danctila requested a review from benjaspet April 11, 2025 17:45
@benjaspet benjaspet changed the title feat: review flow updates feat: S3 frontend integration + review flow updates Apr 11, 2025
@benjaspet benjaspet merged commit ccc10ca into main Apr 11, 2025
3 checks passed
@benjaspet benjaspet deleted the review-flow-updates branch April 11, 2025 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Introduces a new and complete feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants