-
Notifications
You must be signed in to change notification settings - Fork 1
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
Labeled field updates #595
Conversation
…oups to preserve html semantics
…into labeled-field-updates
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.
A couple quick thoughts. Will try to add more tonight or tomorrow morning.
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.
Still going through it, but here's a bit more feedback!
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.
In addition to adding a migration guide that details the changes that a user would have to make (including updating their stylesheets), we should address the regression in test coverage. Right now on main we're very close to 100%, this PR leaves some pathways uncovered (report available via yarn test
).
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.
Ok, I've gone through everything! Overall, I think this is a really good approach to solve the issue and provides a lot of flexibility. I agree with the comments Conor left and I had a few additional ones added here as well.
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'll try to do one more holistic review, but I had a few comments on the changes since my last review.
src/forms/labels/labeled-field.js
Outdated
@@ -7,9 +7,9 @@ import { hasInputError } from '../helpers' | |||
|
|||
/** | |||
* | |||
* A fieldset wrapper for redux-form controlled inputs. This wrapper adds a label component (defaults to {@link InputLabel}) | |||
* A container wrapper for redux-form controlled inputs. This wrapper adds a label component (defaults to {@link InputLabel}) |
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 see we went with container
, but then the rest of the description and the definition for the as
param refer to the wrapper
. So, might be best to stick with just wrapper
?
src/forms/labels/labeled-field.js
Outdated
@@ -72,10 +73,12 @@ const propTypes = { | |||
...InputError.propTypes, | |||
children: PropTypes.node, | |||
hideErrorLabel: PropTypes.bool, | |||
as: PropTypes.string, |
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.
That works for me. I can't think of another element this would need to be off the top of my head.
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 found a few storybook accessibility violations for the components we've touched that we should be able to resolve pretty quickly.
Removed my review to take it out of my queue, please retag me when y'all are comfortable with the PR and ready for me to take a look! |
@danparnella I'll wait until you give this a first pass. Please bump me when you're ready for another set of eyes! |
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.
Updates resolved everything I saw previously. LGTM! Just need to resolve the version number conflict.
@chawes13 Ready for you to double-check!
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.
Addresses:
#436
#624
Release Notes
Author Checklist