Repository navigation
feat: add rating field - #2636
Conversation
|
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. |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
87776b2 to
fee26d8
Compare
|
I just fixed the preview link. You can test it now. |
hellofanny
left a comment
There was a problem hiding this comment.
Nice work 🚀 ! We just need to tweak a few more details. 👍
| // -------------------------------------------------------- | ||
| // Structural Styles | ||
| // -------------------------------------------------------- | ||
|
|
There was a problem hiding this comment.
There was a problem hiding this comment.
Alright, I've implemented the suggested change, I had previously kept the token value because I thought it was something set for accessibility, so as not to make the touch area so small
There was a problem hiding this comment.
Actually, it is! In this case, I believe the design team considers 24px as the minimum target size. @renatamottam
>⚠️ THIS PR DEPENDS ON [PR#2635](#2635)⚠️ ## What's the purpose of this pull request? This pull request adds the RatingField component, which will initially be used in the modal for adding reviews to a product. ## How it works? This PR creates a new molecule component called `RatingField`. In addition to the "input" fields for the actionable rating, it can also receive an `id`, `label`, and `error` via props to be displayed in the form. The component uses the `Rating` component with the `actionable` view, passing the `onChange` handler to it. ## How to test it? <!--- 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 <!--- 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. ---> [Preview](https://starter-git-feat-rating-field-vtex.vercel.app//review-and-ratings-playground) ## References [JIRA TASK: SFS-2078](https://vtex-dev.atlassian.net/browse/SFS-2078) [JIRA TASK: SFS-2077](https://vtex-dev.atlassian.net/browse/SFS-2077) [Figma](https://www.figma.com/design/YXU6IX2htN2yg7udpCumZv/Reviews-%26-Ratings?node-id=131-49445&t=iOanfcOwmDa4bolf-4)   --------- Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Fanny Chien <[email protected]>
>⚠️ THIS PR DEPENDS ON [PR#2635](#2635)⚠️ ## What's the purpose of this pull request? This pull request adds the RatingField component, which will initially be used in the modal for adding reviews to a product. ## How it works? This PR creates a new molecule component called `RatingField`. In addition to the "input" fields for the actionable rating, it can also receive an `id`, `label`, and `error` via props to be displayed in the form. The component uses the `Rating` component with the `actionable` view, passing the `onChange` handler to it. ## How to test it? <!--- 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 <!--- 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. ---> [Preview](https://starter-git-feat-rating-field-vtex.vercel.app//review-and-ratings-playground) ## References [JIRA TASK: SFS-2078](https://vtex-dev.atlassian.net/browse/SFS-2078) [JIRA TASK: SFS-2077](https://vtex-dev.atlassian.net/browse/SFS-2077) [Figma](https://www.figma.com/design/YXU6IX2htN2yg7udpCumZv/Reviews-%26-Ratings?node-id=131-49445&t=iOanfcOwmDa4bolf-4)   --------- Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Fanny Chien <[email protected]>
>⚠️ THIS PR DEPENDS ON [PR#2635](#2635)⚠️ ## What's the purpose of this pull request? This pull request adds the RatingField component, which will initially be used in the modal for adding reviews to a product. ## How it works? This PR creates a new molecule component called `RatingField`. In addition to the "input" fields for the actionable rating, it can also receive an `id`, `label`, and `error` via props to be displayed in the form. The component uses the `Rating` component with the `actionable` view, passing the `onChange` handler to it. ## How to test it? <!--- 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 <!--- 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. ---> [Preview](https://starter-git-feat-rating-field-vtex.vercel.app//review-and-ratings-playground) ## References [JIRA TASK: SFS-2078](https://vtex-dev.atlassian.net/browse/SFS-2078) [JIRA TASK: SFS-2077](https://vtex-dev.atlassian.net/browse/SFS-2077) [Figma](https://www.figma.com/design/YXU6IX2htN2yg7udpCumZv/Reviews-%26-Ratings?node-id=131-49445&t=iOanfcOwmDa4bolf-4)   --------- Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Fanny Chien <[email protected]>

What's the purpose of this pull request?
This pull request adds the RatingField component, which will initially be used in the modal for adding reviews to a product.
How it works?
This PR creates a new molecule component called
RatingField. In addition to the "input" fields for the actionable rating, it can also receive anid,label, anderrorvia props to be displayed in the form. The component uses theRatingcomponent with theactionableview, passing theonChangehandler to it.How to test it?
Starters Deploy Preview
Preview
References
JIRA TASK: SFS-2078
JIRA TASK: SFS-2077
Figma