When we display delete confirmation message of a file, that is in use, we inform user about that. This message is very easily overlooked. I believe that we'd improve UX if we'd make this message more visible.

Attached patch wraps usage part of confirmation message in <strong> and links to file usage page.

Files: 
CommentFileSizeAuthor
#5 delete_confirmation_1949462_5.patch3.23 KBslashrsm
PASSED: [[SimpleTest]]: [MySQL] 874 pass(es).
[ View ]
#5 interdiff.txt1.75 KBslashrsm
#4 delete_confirmation_1949462_4.patch1.62 KBDevin Carlson
PASSED: [[SimpleTest]]: [MySQL] 725 pass(es).
[ View ]
#3 interdiff.txt743 bytesslashrsm
#3 delete_confirmation_1949462_3.patch647 bytesslashrsm
PASSED: [[SimpleTest]]: [MySQL] 725 pass(es).
[ View ]
delete_confirmation.patch660 bytesslashrsm
PASSED: [[SimpleTest]]: [MySQL] 725 pass(es).
[ View ]

Comments

ParisLiakos’s picture

Status:Needs review» Reviewed & tested by the community

i like the file usage link..i am not sure about the strong, but it makes it easier to notice this way, its true

Dave Reid’s picture

Status:Reviewed & tested by the community» Needs review

We should probably actually use a 'warning' message which is the typical pattern the user is looking for that shouldn't prevent execution, rather than bolded text.

slashrsm’s picture

StatusFileSize
new647 bytes
PASSED: [[SimpleTest]]: [MySQL] 725 pass(es).
[ View ]
new743 bytes

Agree with Dave. Here it is....

Devin Carlson’s picture

StatusFileSize
new1.62 KB
PASSED: [[SimpleTest]]: [MySQL] 725 pass(es).
[ View ]

I think that we could probably just get rid of $description altogether. It looks like drupal_set_message could also be used in file_entity_multiple_delete_form().

slashrsm’s picture

StatusFileSize
new1.75 KB
new3.23 KB
PASSED: [[SimpleTest]]: [MySQL] 874 pass(es).
[ View ]

Looks very good. I noticed that we do not inform about the usage if user deletes file via file listing form. Added this. Also added links to usage pages on multiple delete confirmations.

slashrsm’s picture

Issue tags:+Needs tests

It would be OK to add tests for this. It looks like file usage is not covered at all, so this might be a good opportunity to add some.

aaron’s picture

#5: delete_confirmation_1949462_5.patch queued for re-testing.

aaron’s picture

Status:Needs review» Reviewed & tested by the community

This works as advertised.

Dave Reid’s picture

I'm not seeing the warning message when deleting multiple files:

Dave Reid’s picture

Status:Reviewed & tested by the community» Needs work