trimble-oss / modus-web-components

This library provides Modus components as web components - reusable, encapsulated UI elements that are framework agnostic (can be implemented in any site).
https://modus-web-components.trimble.com/
MIT License
34 stars 71 forks source link

File Upload Dropzone - Not able to reset error state #851

Open msankaran0712 opened 1 year ago

msankaran0712 commented 1 year ago

Once an error state is achieved looks like there is no way to attempt the upload again, trying to drop a valid file is not clearing the error message.

Steps to reproduce the behavior:

  1. Go to File upload drop zone
  2. Upload multiple files and appears an error message
  3. Attempt upload again with a valid file, the error message doesn't go away, and the file used in the upload is opening in the browser.

Expected behavior The error message should be cleared when the upload is valid.

chrome_ZwIPPkwfE2

cjwinsor commented 8 months ago

@enowak1031 @egunther39 Can we refine the requirements on the interactions? Do we allow for user to clear error message? I assume it should allow drop regardless.

egunther39 commented 3 months ago

@cjwinsor - Add a button that allows the user to "Reset" the error state back to default. Text string should explain what the error is eg. "Multiple files are not allowed. Please try again"

Image

prashanth-offcl commented 1 week ago

The behavior of the reset button for each error state needs to be identified.

Note: Need to understand how the component is used by the consumer. If the consumer displays something like file list panel where they have the file name and delete icon, then it is possible they also highlight the file that failed the validation allowing the user to take appropriate action. In this particular case, when the user clicks the delete icon to remove the multiple files the consumer will call the removeFile method and the error state will be reset when there is only one file remaining.