Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: rating summary #2682

Open
wants to merge 1 commit into
base: feat/reviews-and-ratings
Choose a base branch
from
Open

Conversation

Guilera
Copy link
Collaborator

@Guilera Guilera commented Feb 13, 2025

What's the purpose of this pull request?

To add the Rating Summary component

How it works?

The component is responsible for:

  • display the current average rating of the product
  • display the number of reviews of the product
  • display the rating distribution of the product
  • to have a button to open the modal to write a review (current not integrated, it's just emit an alert. It's depends on another task)

Important

If the product has no reviews, the component should display a message saying that there are no reviews yet.
Both the text from the button and the text from number of reviews changes when there isn't any review yet.

Important

Plural and singular cases for the text label of the rating counter must be handled

Important

The component shouldn't be displayed if the product has no reviews and the user is not on desktop

Starters Deploy Preview

PREVIEW

References

FEATURE BRANCH
JIRA SFS-2166
JIRA SFS-2167
JIRA SFS-2069

@Guilera Guilera force-pushed the feat/rating-summary branch from c94885e to 5507fd7 Compare February 13, 2025 18:38
@Guilera Guilera changed the base branch from main to feat/reviews-and-ratings February 13, 2025 18:39
Copy link

codesandbox-ci bot commented Feb 13, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Copy link
Contributor

@renatamottam renatamottam left a comment

Choose a reason for hiding this comment

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

Hey, Gutche! Left a few comments below :)

@Guilera Guilera force-pushed the feat/reviews-and-ratings branch 2 times, most recently from cc15cdd to 33db057 Compare February 19, 2025 17:34
@Guilera Guilera force-pushed the feat/rating-summary branch from 8b569e0 to a846caf Compare February 20, 2025 16:42
@Guilera Guilera requested a review from hellofanny February 20, 2025 16:44
@Guilera Guilera marked this pull request as ready for review February 20, 2025 16:45
@Guilera Guilera requested a review from a team as a code owner February 20, 2025 16:45
Comment on lines +16 to +18
/**
* Optional test ID for testing.
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

just to keep the pattern

Suggested change
/**
* Optional test ID for testing.
*/
/**
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
*/

export const RatingDistribution = forwardRef<
HTMLOListElement,
RatingDistributionProps
>(function ProgressStatus(
Copy link
Contributor

Choose a reason for hiding this comment

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

Should it be RatingDistribution ?

Suggested change
>(function ProgressStatus(
>(function RatingDistribution(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants