Visitar URL original
USWDS - Input: Add error state story by mahoneycm · Pull Request #5996 · uswds/uswds · GitHub
Skip to content

USWDS - Input: Add error state story - #5996

Merged
thisisdano merged 2 commits into
developfrom
cm-input-error-story
Oct 3, 2024
Merged

thisisdano merged 2 commits into
developfrom
cm-input-error-story

Conversation

@mahoneycm

@mahoneycm mahoneycm commented Jul 26, 2024 •

Copy link
Copy Markdown
Contributor

Summary

Created error state Storybook controls and preview to showcase error styles.

Breaking change

This is not a breaking change

Related issue

Closes #5991

Related pull requests

No changelog created. Not a user-facing change.

Preview link

Text input error story →

Problem statement

We need stories to showcase error states on the design system website.

Solution

Create an error state storybook preview for text input to match existing controls.

Major changes

  • New option for state control for text input component
  • New error state input story
  • Conditional logic wraps each text input and it's relevant labels in usa-form-group usa-form-group--error divs.

Testing and review

  1. Visit text input story
  2. Confirm controls work as expected
  3. Confirm the error input has expected markup
  4. Confirm error state is displaying correctly
  5. Confirm there are no regressions in other states
  6. Confirm pattern matches existing variants / components

@mahoneycm
mahoneycm marked this pull request as ready for review July 26, 2024 19:55
@mahoneycm
mahoneycm requested review from amyleadem and mejiaj July 26, 2024 19:55

@amyleadem amyleadem left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for getting this prepped so quickly, @mahoneycm. I had a few small notes in the comments below. Let me know if you have any questions.

Comment thread packages/usa-input/src/usa-input.twig Outdated
Comment thread packages/usa-input/src/usa-input.stories.js
Comment thread packages/usa-input/src/usa-input.twig
@mahoneycm
mahoneycm requested a review from amyleadem August 6, 2024 21:10

@amyleadem amyleadem left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me! Thanks @mahoneycm

@mejiaj mejiaj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, I can see all form error states.

@thisisdano
thisisdano merged commit e65bc75 into develop Oct 3, 2024
@thisisdano
thisisdano deleted the cm-input-error-story branch October 3, 2024 04:07
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.

USWDS - Feature: Create Input error state Storybook preview

4 participants