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 Hint as component and Label and FieldSet props #1499

Merged
merged 54 commits into from
Sep 20, 2024

Conversation

RubenSibon
Copy link
Contributor

@RubenSibon RubenSibon commented Aug 7, 2024

Describe the pull request

Mark form fields as not required.

What

Adds text to a label or a field set's legend if the form element (input, field set, etc.) is explicitly marked as not required. The text communicates that the field is not required for submission of the form.

Why

There needs to be a way to communicate to end-users what form fields are not required.

How

Properties are added to Label and Field Set to set them as required. The values should be the same as the associated

Checklist

Before submitting your pull request, please ensure you have done the following. Check each checkmark if you have done so or if it wasn't necessary:

  • Add or update unit tests
  • Add or update documentation
  • Add or update stories
  • Add or update exports in index.* files
  • Start the PR title with a Conventional Commit prefix, as explained here.

Additional notes

  • Documentation needs attention
    • We should link to discussions about best practices around marking fields as "required", "optional" or "not required".

packages/react/src/Label/Label.tsx Outdated Show resolved Hide resolved
packages/react/src/Label/Label.tsx Outdated Show resolved Hide resolved
packages/react/src/Label/Label.tsx Outdated Show resolved Hide resolved
storybook/src/components/FieldSet/FieldSet.stories.tsx Outdated Show resolved Hide resolved
storybook/src/components/FieldSet/FieldSet.stories.tsx Outdated Show resolved Hide resolved
@github-actions github-actions bot temporarily deployed to demo-DES-844-form-field-not-required August 30, 2024 14:50 Destroyed
packages/css/src/components/pagination/pagination.scss Outdated Show resolved Hide resolved
packages/react/src/FieldSet/FieldSet.tsx Outdated Show resolved Hide resolved
packages/react/src/FieldSet/FieldSet.tsx Outdated Show resolved Hide resolved
packages/react/src/Label/Label.tsx Outdated Show resolved Hide resolved
storybook/src/components/FieldSet/FieldSet.docs.mdx Outdated Show resolved Hide resolved
storybook/src/components/FieldSet/FieldSet.docs.mdx Outdated Show resolved Hide resolved
packages/react/src/Label/Label.tsx Outdated Show resolved Hide resolved
packages/react/src/Label/Label.tsx Outdated Show resolved Hide resolved
packages/css/src/components/field-set/README.md Outdated Show resolved Hide resolved
@github-actions github-actions bot temporarily deployed to demo-DES-844-form-field-not-required September 4, 2024 07:19 Destroyed
@github-actions github-actions bot temporarily deployed to demo-DES-844-form-field-not-required September 4, 2024 07:28 Destroyed
@github-actions github-actions bot temporarily deployed to demo-DES-844-form-field-not-required September 4, 2024 15:03 Destroyed
@github-actions github-actions bot temporarily deployed to demo-DES-844-form-field-not-required September 5, 2024 08:06 Destroyed
@RubenSibon RubenSibon marked this pull request as ready for review September 5, 2024 08:10
@github-actions github-actions bot temporarily deployed to demo-DES-844-form-field-not-required September 18, 2024 06:52 Destroyed
@github-actions github-actions bot temporarily deployed to demo-DES-844-form-field-not-required September 18, 2024 07:02 Destroyed
storybook/src/components/FieldSet/FieldSet.stories.tsx Outdated Show resolved Hide resolved
packages/react/src/FieldSet/FieldSet.test.tsx Outdated Show resolved Hide resolved
packages/react/src/FieldSet/FieldSet.test.tsx Outdated Show resolved Hide resolved
packages/react/src/FieldSet/FieldSet.tsx Outdated Show resolved Hide resolved
packages/react/src/Hint/Hint.tsx Outdated Show resolved Hide resolved
@github-actions github-actions bot temporarily deployed to demo-DES-844-form-field-not-required September 18, 2024 12:17 Destroyed
@github-actions github-actions bot temporarily deployed to demo-DES-844-form-field-not-required September 18, 2024 12:29 Destroyed
@github-actions github-actions bot temporarily deployed to demo-DES-844-form-field-not-required September 18, 2024 12:32 Destroyed
@github-actions github-actions bot temporarily deployed to demo-DES-844-form-field-not-required September 18, 2024 12:34 Destroyed
@github-actions github-actions bot temporarily deployed to demo-DES-844-form-field-not-required September 18, 2024 12:38 Destroyed
@github-actions github-actions bot temporarily deployed to demo-DES-844-form-field-not-required September 18, 2024 14:37 Destroyed
@github-actions github-actions bot temporarily deployed to demo-DES-844-form-field-not-required September 20, 2024 08:09 Destroyed
@github-actions github-actions bot temporarily deployed to demo-DES-844-form-field-not-required September 20, 2024 08:37 Destroyed
@github-actions github-actions bot temporarily deployed to demo-DES-844-form-field-not-required September 20, 2024 09:14 Destroyed
@alimpens alimpens merged commit 3d86882 into develop Sep 20, 2024
6 checks passed
@alimpens alimpens deleted the feat/DES-844-form-field-not-required branch September 20, 2024 09:34
@github-actions github-actions bot mentioned this pull request Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants