-
Notifications
You must be signed in to change notification settings - Fork 8
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
Radio group error #2423
base: main
Are you sure you want to change the base?
Radio group error #2423
Conversation
@m-akinc, will you buddy this PR for me? |
.label-container { | ||
display: flex; | ||
gap: ${smallPadding}; | ||
margin-bottom: ${smallPadding}; |
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.
I debated this myself. The thing I didn't want to have happen, though, is for the control with no label to shift when error-visible
was toggled, which is why I decide to leave the space there all the time.
I'll leave the conversation open for others to weigh in.
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 might be something to document regarding setting the width of the radio group. For example, if you hadn't set min-width: 200px
, turning on error-visible
results in this:
I don't know if we should be setting the width to 100% by default, or if we should recommend setting a min-width
(or just width
) when the control may go into an error state.
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.
My inclination is that we should leave the width styling up to the client and not try to set defaults here (such as width: 100%
or min-width: <some-value>px
). Otherwise, I think it tends to make a client's life harder because they not only need to set the values they want (such as min-width
), but they also have to set values to override the styling we've set (such as width: auto
).
I'll leave this conversation open so that others can weigh in with other thoughts of the best practice to follow here.
Pull Request
π€¨ Rationale
Includes
nimble-component
implementation for #2019π©βπ» Implementation
error-visible
anderror-text
attributes to thenimble-radio-group
π§ͺ Testing
β Checklist