colorstackorg/oyster

"This was helpful" button 👍

Closed this issue · 2 comments

Description

For every review, add a button in the top right corner with the description “That was helpful” followed by the count of users that have pressed that button.

this_was_helpful

Acceptance Criteria

Backend: Store the count of “upvotes” in the company_reviews database table. This will require adding an upvotes field through a database migration. See here.

Frontend: This will require building a button with a different UX for different states:

Default:
Screenshot 2024-06-19 at 11 54 32 AM

When hovering:
Screenshot 2024-06-19 at 11 55 02 AM

When pressed:
Screenshot 2024-06-19 at 11 55 32 AM

Note that this has the same coloring and logic as the upvote button for Resources, which can be seen here.

This also requires retrieving ‘upvotes’ count for each review from database on list-company-reviews.ts. This is necessary to have each review display its individual count for “upvotes”. As an example, see how this is done on the Resources page through the loader function in app/routes/_profile.resources.tsx

Hi Tomas, could I work on this issue? Thank you.

@jessherlitz you've got it!