ui-components icon indicating copy to clipboard operation
ui-components copied to clipboard

[Feature Request]: Attribute to hide or show actions on file upload card

Open ataboo opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe

Our team is using the file uploader for an upcoming feature in our Angular app. We're on v1.20.3 of web-components. We have a form that is submitted with the upload so the "delete" and "cancel" buttons in the file uploader card isn't really a valid action since the whole form is cancelled or submitted as one. We do want to show a progress bar while uploading though.

Describe the solution you'd like

Ideally there would be a way to hide the actions on the card -- maybe a showActions or hideActions attribute.

Provide evidence this is a needed component

I know we have this use-case but I don't have direct evidence from other projects.

I think it's a safe assumption that another team has had a similar need where they did not want the cancel and delete actions or they will in the future.

Describe alternatives you've considered

We're using our own component for now, but ideally we could just use the "stock" one with these options.

Do you have anything already created for this that we can use?

no

Are you currently using this proposal inside your own service

yes

Are you able to assist to bring the feature to reality?

yes

Additional context

Here's our own version of the card on the WIP form to give some context: image

The upload panel closes after the completion of the upload. Deletion will happen from an edit panel where the whole document (form) is deleted vs just the file field.

ataboo avatar Apr 30 '24 16:04 ataboo

@ArakTaiRoth speak to @ataboo about removing the cancel button and progress indicator, but not the remove button

ArakTaiRoth avatar May 09 '24 21:05 ArakTaiRoth

@ataboo I'd love to chat with you more about this story as we have questions regarding it. Would you be able to respond with who you are so I can reach out to you via Slack?

ArakTaiRoth avatar May 13 '24 17:05 ArakTaiRoth

Their file service API that they're calling doesn't require multipart form data, single files is perfectly fine for that purpose.

Their implementation is as follows:

  1. Open a modal
  2. Select a Dropdown that sets the type of file (not our type of file, but what type it is in their service)
  3. Select a file
  4. Hit the Upload button (this sends a request to the server to save the document metadata, and then get a token to upload the file, finally it uploads the file)

They also have delete options per file in the table, and if you select each file they have a new modal that allows changing the file type and allows for deleting the file.

What's not clear, is in the main file upload modal, the intended experience if a user doesn't want the file they selected, is to choose a new file and it will actually replace the file being uploaded.

ArakTaiRoth avatar May 14 '24 16:05 ArakTaiRoth