-
-
Notifications
You must be signed in to change notification settings - Fork 527
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
4821 part2 partner profile remove attached docs #5090
base: main
Are you sure you want to change the base?
4821 part2 partner profile remove attached docs #5090
Conversation
Hey @danielabar -- you've got this as "resolves', but said in the issue that there would be 3 steps -- which is it? |
Sorry about that, it's a partial solution, part 2 of 3. Updated PR description. |
@danielabar Would it be trivial to show the names of the files chosen when you choose multiples, where it currently says "2 files" if you've selected two? We show the name if only one is chosen. (If it's not trivial, we could leave it and see if anyone complains) Other than that, it looks pretty good! |
I'll look into it, that's a native file input. According to MDN on file input:
I tried selecting multiple files, then selecting that file input in browser dev tools to check it's So it's a matter of how to expose this in the UI, might be possible with some JavaScript in a Stimulus controller. Will investigate further... |
@cielf Display of multiple file selection has been added. |
For future, if I ask if it's trivial, it's probably a "nice to have" so I'd rather you didn't spend too much time on it -- we can probably use your talents better elsewhere! (though it looks like you didn't have to spend a lot of time on this one) I've run out of time for HE today -- so it'll be tomorrow or Friday before I get to this. |
No worries, was about an hour, and interesting to learn about the |
Partial solution for #4821
Description
This is for part 2 of incremental improvements to editing partner profile Attached Documents section.
It adds a "Remove" button beside each attached document in the partner profile, allowing user to remove any individual document(s). Changes are persisted when they click Save Progress.
It makes use of the existing method
remove_element_button
inapp/helpers/ui_helper.rb
, along with a few styling adjustments to align the file listing and Remove action.Update 2025-03-12: As per PR comment, added display of file names if user selects more than one. See second screenshot below.
Type of change
How Has This Been Tested?
Automated test:
spec/system/partners/profile_edit_system_spec.rb
->it "allows removal of attached documents"...
Manual test:
Screenshots