Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

TrevorAntony
Copy link
Contributor

@TrevorAntony TrevorAntony commented Sep 16, 2024

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

src/components/inputs/file/file.component.tsx Outdated Show resolved Hide resolved
src/components/inputs/file/file.component.tsx Show resolved Hide resolved
src/components/inputs/file/file.component.tsx Outdated Show resolved Hide resolved
src/components/inputs/file/file.component.tsx Outdated Show resolved Hide resolved
src/components/inputs/file/file.component.tsx Outdated Show resolved Hide resolved
@arodidev
Copy link
Contributor

Thanks for this @TrevorAntony. LGTM.

@samuelmale
Copy link
Member

samuelmale commented Sep 25, 2024

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants