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

chore: preview cli product title version #685

Closed
wants to merge 1 commit into from

Conversation

artursantiago
Copy link
Collaborator

What's the purpose of this pull request?

How does it work?

How to test it?

Faststore related PRs

References

Copy link

vercel bot commented Feb 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
starter ✅ Ready (Inspect) Visit Preview Feb 19, 2025 5:56pm

@Guilera Guilera force-pushed the feat/preview-product-title-count branch from 6a23905 to ae8dd80 Compare February 19, 2025 17:54
hellofanny added a commit to vtex/faststore that referenced this pull request Feb 20, 2025
## What's the purpose of this pull request?

**Adds the number of reviews** next to the **Rating** component in the
**ProductTitle**. The review count, as well as the rating, should only
be visible if the corresponding flag in the **discovery.config** is
enabled in the code.

## How it works?

The following props have been added to **ProductTitle**:

- **reviewsCount?**: The amount of reviews for the product.
- **reviewsSectionId?**: The ID of the reviews section to link to.
- **noReviewsText?**: Default text for "No reviews yet."
- **reviewsCountText?**: Default text for "X reviews."

The review count text should be a link to the reviews section, which
will be located further down on the product page. This link will receive
the section ID through the **reviewsSectionId** prop. The labels for the
text can also be customized via props, but by default, they will be "No
reviews yet" and "X reviews."

## How to test it?

You can access the preview link and open any pdp. It already should be
able to show the reviews count for the product.
If the count label don't appear you can run `yarn cms-sync` in the
`start.store`
[branch](vtex-sites/starter.store#685)

<!--- Describe the steps with bullet points. Is there any external link
that can be used to better test it or an example? --->

### Starters Deploy Preview


[Preview](https://starter-git-feat-preview-product-title-count-vtex.vercel.app/)

<!--- Add a link to a deploy preview from `starter.store` with this
branch being used. --->

<!--- Tip: You can get an installable version of this branch from the
CodeSandbox generated when this PR is created. --->

## References

[JIRA TASK: SFS-2064](https://vtex-dev.atlassian.net/browse/SFS-2064)


[Figma](https://www.figma.com/design/YXU6IX2htN2yg7udpCumZv/Reviews-%26-Ratings?node-id=130-32961&t=sKkz60J8JEjxL8m4-4)


![image](https://github.com/user-attachments/assets/b3828116-34ee-49fe-abf4-d7478c18b725)

![image](https://github.com/user-attachments/assets/3d6b3c4a-11db-4b40-911e-171f076b676a)

---------

Co-authored-by: gutchenzo <[email protected]>
Co-authored-by: Larícia Mota <[email protected]>
Co-authored-by: Fanny Chien <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant