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: Add new Radio compound component #1944

Merged

Conversation

mani11
Copy link
Contributor

@mani11 mani11 commented Dec 6, 2022

Summary

Fixes: #1196

Adds a new compound Radio component to the Preview package.

Release Category

Components

Release Note

We've created a new Radio compound component in the Preview package. This component matches our pattern of providing access to lower-level elements and allows for more flexibility.


Checklist

  • MDX documentation adheres to Canvas Kit's standard MDX template
  • Label ready for review has been added to PR

For the Reviewer

  • PR title is short and descriptive
  • PR summary describes the change (Fixes/Resolves linked correctly)
  • PR Release Notes describes additional information useful to call out in a release message or removed if not applicable
  • Breaking Changes provides useful information to upgrade to this code or removed if not applicable

@cypress
Copy link

cypress bot commented Dec 6, 2022

1 flaky tests on run #5942 ↗︎

0 915 2 0 Flakiness 1

Details:

Merge 7612dda into 8eeda29...
Project: canvas-kit Commit: 7b75deb8b0 ℹ️
Status: Passed Duration: 07:42 💡
Started: Jul 6, 2023 11:07 PM Ended: Jul 6, 2023 11:15 PM
Flakiness  cypress/integration/Autocomplete.spec.ts • 1 flaky test

View Output Video

Test Artifacts
... > when a value is entered > when down arrow key is pressed > when the user presses the enter key > when the use hits the "2" key > should change the filtered results Output Screenshots Video

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@jaclynjessup jaclynjessup added the ready for review Code is ready for review label Jan 25, 2023
@mannycarrera4
Copy link
Contributor

We should test this to make sure this works with formfield in preview

@myvuuu myvuuu removed the ready for review Code is ready for review label Feb 7, 2023
@jaclynjessup jaclynjessup added the ready for review Code is ready for review label Feb 24, 2023
@jaclynjessup jaclynjessup removed the ready for review Code is ready for review label Mar 8, 2023
@NicholasBoll
Copy link
Member

We received a question about uncontrolled form fields - this would apply to autofill issues as well. For example, here's how to do a radio group using React Hook Form since that library uses onChange and a ref instead of value/checked: https://stackoverflow.com/questions/67626696/radio-buttons-with-react-hook-form

@jaclynjessup jaclynjessup added the on hold PR is on hold until further notice label Apr 3, 2023
ref={ref}
{...elemProps}
/>
<span id="ck-radio-check"></span>
Copy link
Contributor

Choose a reason for hiding this comment

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

this was the addition that makes sure everything is styled in firefox and chrome. TIL you can't add pseudo elements like ::before or ::after to non container elements like inputs.

@mannycarrera4 mannycarrera4 changed the title feat: New radio compound component feat: New RadioGroup compound component Jul 6, 2023
@mannycarrera4 mannycarrera4 changed the title feat: New RadioGroup compound component feat: New Radio compound component Jul 6, 2023
@jamesfan jamesfan changed the title feat: New Radio compound component feat: Add new Radio compound component Jul 6, 2023
Copy link
Member

@jamesfan jamesfan left a comment

Choose a reason for hiding this comment

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

Thanks for all the hard work on this @mani11 and @mannycarrera4!

@mannycarrera4 mannycarrera4 added automerge and removed ready for review Code is ready for review labels Jul 7, 2023
@alanbsmith alanbsmith merged commit ca8a1de into Workday:prerelease/minor Jul 7, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Convert Radio into a Compound Component