-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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(radio-group): add helperText and errorText properties #30222
base: feature-8.5
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
core/src/components/radio-group/test/supporting-text/index.html
Outdated
Show resolved
Hide resolved
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.
Looks really good, left a couple of comments, but looks good to me 🚀
} | ||
|
||
.ion-touched.ion-invalid .radio-group-top .helper-text { | ||
display: none; |
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 don't really know if this is worth mentioning, and it may be expected behavior, but this means helper text will be hidden in an invalid state even if there's no error text. That might be confusing, but it's probably a non-issue.
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.
Correct! I actually mentioned this the other day because this is how both the input and textarea components (the only two that are already released) currently behave. I thought this was a weird behavior, but I didn't change it since it aligns with the existing implementation of those components. Maybe we can revisit this in the future.
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 guess is that developers might want this behavior. I wouldn't be surprised that there are some who don't want the error text but need the classes for them to do their own validation.
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.
This is also something developers could override if they just want the color to change: https://codepen.io/brandyssmith/pen/emYWeMO?editors=1100
It's not the cleanest but it is possible.
core/src/components/radio-group/test/supporting-text/index.html
Outdated
Show resolved
Hide resolved
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.
LGTM, minor text request
Issue number: N/A
What is the current behavior?
Radio group does not support helper and error text.
What is the new behavior?
Adds support for helper and error text.
Does this introduce a breaking change?
Other information
Dev build:
8.4.4-dev.11741101920.155e1c29