openmrs / openmrs-esm-form-engine-lib

React Form Engine library for O3
Other
10 stars 59 forks source link

(Enhancement): O3-3685: Enable Deleting or Clearing Files in File Picker Component in Edit Mode #394

Open TrevorAntony opened 4 weeks ago

TrevorAntony commented 4 weeks ago

Requirements

When a file is selected using the file picker component and the form is later opened in edit mode, there is currently no option to delete or clear the selected file.

Summary

The user can now successfully edit an encounter and add or remove an image/file by clearing it.

Screenshots

Screenshot 2024-09-16 at 11 15 49 Screenshot 2024-09-16 at 11 15 59

Related Issue

https://openmrs.atlassian.net/browse/O3-3685

Other

the delete persists on form submission and reloading

arodidev commented 2 weeks ago

Thanks for this @TrevorAntony. LGTM.

samuelmale commented 2 weeks ago

@TrevorAntony The "Clear File" button seems to be overlapped by the side rail. I think we should have an actions menu associated with the file itself, or we could simply place the delete button next to the attachment. This is important considering that we plan to support capturing multiple attachments. Feel free to ask for some UX advisory if necessary.

Screenshot 2024-09-25 at 18 56 16
samuelmale commented 2 hours ago

@TrevorAntony are you still working on this?

TrevorAntony commented 2 hours ago

@samuelmale Not at the moment.