department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
283 stars 204 forks source link

[CST][ENG] Update File Uploader to use the new `va-file-input-multiple` component #87835

Open pmclaren19 opened 4 months ago

pmclaren19 commented 4 months ago

Background Context

Initially created a bug ticket here for the Platform Design team to update the va-file-input component to allow for multiple files. They took this ticket and created three new tickets to cover this work:

This work has now been completed and we can update the file upload component that we are using in the CST on the Doc Request Page and Files Tab to use this new component va-file-input-multiple

Originally had created this ticket for us to do this work but that was with the intent that the platform design team would update the current component va-file-input. They have decided instead to create a whole new component called va-file-input-multiple.

New Feature

Update the AddFilesForm component that allows users to upload files to now instead us the component va-file-input-multiple . This component is used on the Files Tab and Document Request Form

Design

FIGMA

Current:

Screenshot 2024-07-08 at 2.23.27 PM.png

va-file-input-multiple component:

Screenshot 2024-07-08 at 2.03.43 PM.png

Enablement team (if needed)

@davidakennedy ?

Engineering

Out of scope

Open questions

Tasks

Definition of Done

Acceptance Criteria

davidakennedy commented 3 months ago

Thanks for the ping, @pmclaren19! I would definitely like to test this when we implement it.

pmclaren19 commented 3 months ago

Reviewed and added some updates to tasks during eng refinement.

pmclaren19 commented 3 months ago

Running into some issues implementing this code. Talking with platform design and created several bug tickets ...

pmclaren19 commented 3 months ago

This ticket is blocked by the following platform design tickets:

jacobworrell commented 2 months ago

Still awaiting updates from Platform.

skylerschain commented 1 week ago

It looks the bugs Peri filed and linked to above are Closed. So is this ticket unblocked now? I added the latest design mock to the Design section.

skylerschain commented 1 week ago

I also want to highlight a bug I noticed while looking at this in staging:

Repro:

  1. User uploads a file (File 1)
  2. Gray "attached" box (which we will be removing as part of this ticket) shows up, confirming that File 1 has been uploaded
  3. User clicks "Change file" to replace File 1
  4. User replaces File 1 with File 2
  5. The gray "attached" boxes show up for both File 1 and File 2, even though File 1 is no longer attached.

I assume this would get fixed when we remove that gray box and replace it with the pattern from the design system. But wanted to document this just to be safe.

https://github.com/user-attachments/assets/84ea42fb-a6fb-4d07-888c-2c7709bfe8b0