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

fix(radio-button): incorrect spacing on fieldHelp with validationRedesignOptIn flag #7122

Merged
merged 3 commits into from
Dec 12, 2024

Conversation

nuria1110
Copy link
Contributor

@nuria1110 nuria1110 commented Dec 10, 2024

fix #6985

Proposed behaviour

When validationRedesignOptIn flag is true:

  • FieldHelp has correct spacing
  • Required asterisk appears only on RadioButtonGroup legend.

Current behaviour

When validationRedesignOptIn flag is true:

  • FieldHelp has incorrect spacing
  • Required asterisk appears on all RadioButtons within a group.

Checklist

  • Commits follow our style guide
  • Related issues linked in commit messages if required
  • Screenshots are included in the PR if useful
  • All themes are supported if required
  • Unit tests added or updated if required
  • Playwright automation tests added or updated if required
  • Storybook added or updated if required
  • Translations added or updated (including creating or amending translation keys table in storybook) if required
  • Typescript d.ts file added or updated if required
  • Related docs have been updated if required

QA

  • Tested in provided StackBlitz sandbox/Storybook
  • Add new Playwright test coverage if required
  • Carbon implementation matches Design System/designs
  • UI Tests GitHub check reviewed if required

Additional context

Testing instructions

See bugs demo
See 'With New Validation' and 'With New Validation Group' test stories.

@@ -26,9 +26,9 @@ export interface RadioButtonProps
onClick?: (ev: React.MouseEvent<HTMLInputElement>) => void;
/** the value of the Radio Button, passed on form submit */
value: string;
/** Overrides the default tooltip position */
/** [Legacy] Overrides the default tooltip position */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: if you're updating these prop descriptions, it may be worth updating the remaining prop descriptions for helpAriaLabel and tooltipPosition which do not include a legacy description

@@ -53,9 +53,9 @@ For more information check our [Validations](../?path=/docs/documentation-valida

#### New designs validation

The folowing examples use the new validation pattern that is available by setting the `validationRedesignOptIn` flag on the `CarbonProvider` to true.
The following examples use the new validation pattern that is available by setting the `validationRedesignOptIn` flag on the `CarbonProvider` to true.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: it may be worth updating other docs which include the same spelling mistake, a quick search from the codebase shows this same mistake present in 14 files

…signOptIn flag

Fixes issue where fieldHelp did not have correct spacing with the new validaiton opt in flag. Also
fixes issue where all radio buttons in a required group would display the asterisk.

fix #6985
@nuria1110 nuria1110 marked this pull request as ready for review December 11, 2024 15:37
@nuria1110 nuria1110 requested review from a team as code owners December 11, 2024 15:37
@nuria1110 nuria1110 merged commit 7f8ba65 into master Dec 12, 2024
24 checks passed
@nuria1110 nuria1110 deleted the FE-6830 branch December 12, 2024 13:58
@carbonci
Copy link
Collaborator

🎉 This PR is included in version 144.20.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

RadioButton: FieldHelp not aligned correctly in a sidebar
5 participants