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

refactor(odyssey-react): cleanup RadioButton and RadioGroup #1001

Merged
1 commit merged into from Jul 22, 2021
Merged

Conversation

ghost
Copy link

@ghost ghost commented Jul 19, 2021

This PR refactors our Radio components. We've discussed these changes previously during office hours. A few of the improvements:

  • Simplified API surface area via propagation thru context rather than cloned children
  • Increased flexibility for components via wrapped primitives and omitted spread rest props
  • Friendlier ergonomics via forwarded refs and name spaced component exports
  • Improved types
  • Fixes a bug around uncontrolled component groups

@ghost ghost self-requested a review as a code owner July 19, 2021 21:50
@ghost ghost self-assigned this Jul 19, 2021
@github-actions github-actions bot temporarily deployed to preview July 19, 2021 21:55 Inactive
@github-actions github-actions bot temporarily deployed to preview July 20, 2021 15:33 Inactive
Copy link

@jayrajashekariah-okta jayrajashekariah-okta left a comment

Choose a reason for hiding this comment

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

Just a nit comment. Looks great 🚀


return (
<fieldset className="ods-fieldset" ref={ref} {...omitProps}>
{ legendElement}

Choose a reason for hiding this comment

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

nit: spacing seems off here

Copy link
Author

Choose a reason for hiding this comment

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

Thanks @jayrajashekariah-okta I plan to setup prettier as a part of our test runs soon so that some of this is automatically controlled for!

Choose a reason for hiding this comment

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

💯 this is a great idea! I was thinking about this last week as well.

@github-actions github-actions bot temporarily deployed to preview July 21, 2021 20:52 Inactive
@ghost ghost merged commit 40d17a3 into develop Jul 22, 2021
@ghost ghost deleted the jb-radio-2 branch July 22, 2021 16:58
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants