-
Notifications
You must be signed in to change notification settings - Fork 63
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: add rating field #2636
base: main
Are you sure you want to change the base?
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work 🚀 ! We just need to tweak a few more details. 👍
@@ -22,6 +22,7 @@ | |||
// -------------------------------------------------------- | |||
// Structural Styles | |||
// -------------------------------------------------------- | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
flex-direction: column; | ||
|
||
[data-fs-rating-field-label] { | ||
font-size: var(--fs-rating-field-label-size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
font-size: var(--fs-rating-field-label-size); | |
margin-bottom: var(--fs-spacing-0); | |
font-size: var(--fs-rating-field-label-size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done ✅
} | ||
|
||
[data-fs-rating-field-error-message] { | ||
font-size: var(--fs-rating-field-error-message-size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
font-size: var(--fs-rating-field-error-message-size); | |
margin-top: var(--fs-spacing-0); | |
font-size: var(--fs-rating-field-error-message-size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done ✅
// -------------------------------------------------------- | ||
// Design Tokens for Rating Field | ||
// -------------------------------------------------------- | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After fixing the button size as I mention, we need to adds a little margin in the label and error message. I've left as suggestions.
todo: Can you please update this file indentation just to follow the previous pattern? Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done ✅
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
, anderror
via props to be displayed in the form. The component uses theRating
component with theactionable
view, passing theonChange
handler to it.How to test it?
Starters Deploy Preview
Preview
References
JIRA TASK: SFS-2078
JIRA TASK: SFS-2077
Figma