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

Labeled field updates #595

Merged
merged 53 commits into from
Feb 13, 2024
Merged

Labeled field updates #595

merged 53 commits into from
Feb 13, 2024

Conversation

jhp0621
Copy link
Contributor

@jhp0621 jhp0621 commented Aug 1, 2023

Addresses:
#436
#624

Release Notes

Author Checklist

  • Add unit test(s)
  • Update version in package.json (see the versioning guidelines)
  • Update documentation (if necessary)
  • Add story to storybook (if necessary)
  • Assign dev reviewer

@jhp0621 jhp0621 marked this pull request as ready for review September 25, 2023 16:50
Copy link
Contributor

@danparnella danparnella left a 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.

src/forms/inputs/checkbox-group.js Outdated Show resolved Hide resolved
src/forms/inputs/dropdown-checkbox-group.js Outdated Show resolved Hide resolved
.storybook/styles/components/_forms.scss Outdated Show resolved Hide resolved
Copy link
Contributor

@danparnella danparnella left a 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!

.storybook/styles/components/_forms.scss Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Show resolved Hide resolved
src/forms/helpers/dropdown-select.js Outdated Show resolved Hide resolved
src/forms/inputs/checkbox-group.js Outdated Show resolved Hide resolved
src/forms/inputs/checkbox-group.js Outdated Show resolved Hide resolved
Copy link
Contributor

@chawes13 chawes13 left a 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).

Main

This branch

.storybook/styles/application.scss Show resolved Hide resolved
src/forms/inputs/dropdown-checkbox-group.js Outdated Show resolved Hide resolved
.storybook/styles/components/_forms.scss Outdated Show resolved Hide resolved
.storybook/styles/components/_forms.scss Show resolved Hide resolved
src/forms/inputs/checkbox-group.js Outdated Show resolved Hide resolved
src/forms/labels/labeled-field.js Outdated Show resolved Hide resolved
stories/forms/inputs/checkbox-group.story.js Outdated Show resolved Hide resolved
stories/forms/inputs/checkbox-group.story.js Outdated Show resolved Hide resolved
test/forms/inputs/radio-group.test.js Show resolved Hide resolved
Copy link
Contributor

@danparnella danparnella left a 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.

src/forms/inputs/radio-group.js Show resolved Hide resolved
src/forms/inputs/checkbox-group.js Outdated Show resolved Hide resolved
src/forms/inputs/radio-group.js Outdated Show resolved Hide resolved
src/forms/labels/labeled-field.js Outdated Show resolved Hide resolved
test/forms/inputs/checkbox-group.test.js Outdated Show resolved Hide resolved
test/forms/inputs/checkbox-group.test.js Outdated Show resolved Hide resolved
src/forms/labels/labeled-field.js Outdated Show resolved Hide resolved
@jhp0621 jhp0621 removed the request for review from chawes13 November 6, 2023 19:52
Copy link
Contributor

@danparnella danparnella left a 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.

@@ -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})
Copy link
Contributor

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/inputs/radio-group.js Show resolved Hide resolved
migration-guides/v.10.0.0.md Outdated Show resolved Hide resolved
@@ -72,10 +73,12 @@ const propTypes = {
...InputError.propTypes,
children: PropTypes.node,
hideErrorLabel: PropTypes.bool,
as: PropTypes.string,
Copy link
Contributor

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.

test/forms/inputs/checkbox-group.test.js Outdated Show resolved Hide resolved
test/forms/inputs/radio-group.test.js Outdated Show resolved Hide resolved
src/forms/inputs/checkbox-group.js Show resolved Hide resolved
test/forms/inputs/checkbox-group.test.js Outdated Show resolved Hide resolved
Copy link
Contributor

@danparnella danparnella left a 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.

src/forms/inputs/checkbox-group.js Show resolved Hide resolved
src/forms/labels/labeled-field.js Show resolved Hide resolved
@chawes13
Copy link
Contributor

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!

@chawes13
Copy link
Contributor

chawes13 commented Feb 9, 2024

@danparnella I'll wait until you give this a first pass. Please bump me when you're ready for another set of eyes!

Copy link
Contributor

@danparnella danparnella left a 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!

Copy link
Contributor

@chawes13 chawes13 left a comment

Choose a reason for hiding this comment

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

Lovely 👏

Confirmed test coverage remains at 100%! 🚀
Image 2024-02-12 at 12 01 05 PM

src/forms/helpers/dropdown-select.js Outdated Show resolved Hide resolved
@jhp0621 jhp0621 merged commit 648a731 into main Feb 13, 2024
2 checks passed
@jhp0621 jhp0621 deleted the labeled-field-updates branch February 13, 2024 02:08
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.

3 participants