Skip to content

va-file-input-multiple: Add vaMultipleError to component and fix bug in encrypted file story#2000

Merged
RyanMunsch merged 5 commits intomainfrom
5402-file-input-multiple-story-bug
Feb 23, 2026
Merged

va-file-input-multiple: Add vaMultipleError to component and fix bug in encrypted file story#2000
RyanMunsch merged 5 commits intomainfrom
5402-file-input-multiple-story-bug

Conversation

@RyanMunsch
Copy link
Copy Markdown
Contributor

@RyanMunsch RyanMunsch commented Feb 17, 2026

Chromatic

https://5402-file-input-multiple-story-bug--65a6e2ed2314f7b8f98609d8.chromatic.com

Description

This pull request introduces improved error handling and state management for the va-file-input-multiple component, enabling more robust tracking of file errors and better synchronization between the web component and its Storybook demo. The main changes are the addition of a new error event, refactoring of file tracking logic, and updates to the demo to handle these enhancements.

Error Handling Improvements:

  • Added a new vaMultipleError event to the va-file-input-multiple component, which emits detailed information when a child file input encounters an error. This allows parent components to track which file has an error and what the error is.
  • Refactored error handling logic in the component by introducing a handleFileInputError method, which updates the file entry with error state and emits the new error event.
  • Updated the component's rendering logic to use the new error handler for file input errors, replacing the previous inline error handling code.

State Management and Demo Updates:

  • Refactored the Storybook demo (EncryptedTemplate) to track files and their error states separately, and to update the encrypted list based on file types and error states. Introduced new handleChange and handleError functions for more accurate state updates.
  • Updated the Storybook demo to use the new error handler and change handler, connecting the demo to the improved error event and state tracking logic.

Related tickets and links

Closes department-of-veterans-affairs/vets-design-system-documentation#5402

Screenshots

Testing and review

Approvals

See the QA Checklists section below for suggested approvals. Use your best judgment if additional reviews are needed. When in doubt, request a review.

Approval groups

Add approval groups to the PR as needed:

QA checklists

Use the QA checklists below as guides, not rules. Not all checklists will apply to every PR but there could be some overlap.

In all scenarios, changes should be fully tested by the author and verified by the reviewer(s); functionality, responsiveness, etc.

✨ New Component Added
  • The PR has the minor label
  • The component matches the Figma designs.
  • All properties, custom events, and utility functions have e2e and/or unit tests
  • A new Storybook page has been added for the component
  • Tested in all VA breakpoints.
  • Chromatic UI Tests have run and snapshot changes have been accepted by the design reviewer
  • Tested in vets-website using Verdaccio
  • Engineering has approved the PR
  • Design has approved the PR
  • Accessibility has approved the PR
🌱 New Component Variation Added
  • The PR has the minor label
  • The variation matches its Figma design.
  • Any new properties, custom events, or utility functions have e2e and/or unit tests
  • A new story has been added to the component's existing Storybook page
  • Any Chromatic UI snapshot changes have been accepted by a design reviewer
  • Tested in vets-website using Verdaccio
  • Engineering has approved the PR
  • Design has approved the PR
🐞 Component Fix
  • The PR has the patch label
  • Any new properties, custom events, or utility functions have e2e and/or unit tests
  • Any markup changes are evaluated for impact on vets-website.
    • Will any vets-website tests fail from the change?
  • Any Chromatic UI snapshot changes have been reviewed and approved by a designer if necessary
  • Engineering has approved the PR
♿️ Component Fix - Accessibility
  • The PR has the patch label
  • Any new properties, custom events, or utility functions have e2e and/or unit tests
  • Any Chromatic UI snapshot changes have been reviewed and approved by a designer if necessary
  • Engineering has approved the PR
  • Accessibility has approved the PR
🚨 Component Fix - Breaking API Change
  • The PR has the major label
  • vets-website and content-build have been evaluated to determine the impact of the breaking change
  • Any new properties, custom events, or utility functions have e2e and/or unit tests
  • Any Chromatic UI snapshot changes have been reviewed and approved by a designer if necessary
  • Tested in vets-website using Verdaccio
  • Engineering has approved the PR
🔧 Component Update - Non-Breaking API Change
  • The PR has the minor label
  • Any new properties, custom events, or utility functions have e2e and/or unit tests
  • Any Chromatic UI snapshot changes have been reviewed and approved by a designer if necessary
  • Engineering has approved the PR
📖 Storybook Update
  • The PR has the ignore-for-release label
  • Any Chromatic UI snapshot changes have been reviewed and approved by a designer if necessary
  • Engineering has approved the PR
🎨 CSS-Library Update
  • The PR has the css-library label
  • vets-website and content-build have been checked to determine the impact of any breaking changes
  • Engineering has approved the PR

accommodates handling of "internal" errors for single va-file-input instances via new vaMultipleError event on va-file-input-multiple
@RyanMunsch RyanMunsch added the patch Patch change in semantic versioning label Feb 17, 2026
@RyanMunsch RyanMunsch marked this pull request as ready for review February 18, 2026 21:03
@RyanMunsch RyanMunsch requested a review from a team as a code owner February 18, 2026 21:03
@RyanMunsch RyanMunsch requested a review from a team February 18, 2026 21:14
@RyanMunsch RyanMunsch merged commit 6d595f0 into main Feb 23, 2026
7 checks passed
@RyanMunsch RyanMunsch deleted the 5402-file-input-multiple-story-bug branch February 23, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch Patch change in semantic versioning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Logic to check if files are encrypted in va-file-input-multiple has bug

3 participants