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

feat(radio-group): add helperText and errorText properties #30222

Open
wants to merge 25 commits into
base: feature-8.5
Choose a base branch
from

Conversation

brandyscarney
Copy link
Member

@brandyscarney brandyscarney commented Feb 27, 2025

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?

  • Yes
  • No

Other information

Dev build: 8.4.4-dev.11741101920.155e1c29

Copy link

vercel bot commented Feb 27, 2025

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

Name Status Preview Comments Updated (UTC)
ionic-framework ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 5, 2025 8:55pm

@github-actions github-actions bot added package: core @ionic/core package package: angular @ionic/angular package package: vue @ionic/vue package labels Feb 27, 2025
@brandyscarney brandyscarney marked this pull request as ready for review March 4, 2025 16:25
@brandyscarney brandyscarney requested a review from a team as a code owner March 4, 2025 16:25
Copy link
Member

@ShaneK ShaneK left a 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;
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Contributor

@thetaPC thetaPC left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: angular @ionic/angular package package: core @ionic/core package package: vue @ionic/vue package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants