Project

General

Profile

Actions

Defect #43504

closed

Unexpected file name shown when hovering over a link in the Files column

Added by Mizuki ISHIKAWA 22 days ago. Updated 16 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
UI
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

When hovering over a file name in the Files column on the issue list, only the download icon should appear.
However, the same file name is also displayed in the lower-right corner.

It did not reproduce in 6.1.0, but it reproduced in the latest trunk.

This issue is caused by .icon-label, which should originally be display: none, being shown due to CSS.
The problem can be fixed with the changes described below.

diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
index 0a22e3c81..2e5682a76 100644
--- a/app/assets/stylesheets/application.css
+++ b/app/assets/stylesheets/application.css
@@ -370,9 +370,9 @@ table.list td.icon {width: 100%;} /* Prevents border from disappearing due to in
 table.list td.id { width: 2%; text-align: center;}
 table.list td.name, table.list td.description, table.list td.subject, table.list td.parent-subject, table.list td.comments, table.list td.roles, table.list td.attachments, table.list td.text,  table.list td.short_description {text-align: left;}

-table.list td.attachments span {display: block; height: 16px;}
-table.list td.attachments span a.icon-download {display: inline-block; visibility: hidden;}
-table.list td.attachments span:hover a.icon-download {visibility: visible;}
+table.list td.attachments > span {display: block; height: 16px;}
+table.list td.attachments > span a.icon-download {visibility: hidden;}
+table.list td.attachments > span:hover a.icon-download {visibility: visible;}
 table.list td.tick {width:15%}
 table.list td.checkbox { width: 15px; padding: 2px 0 0 0; }
 table.list .checkbox input {padding:0px; height: initial;}


Files

screenshot 2025-11-20 14.00.57.png (29.3 KB) screenshot 2025-11-20 14.00.57.png Mizuki ISHIKAWA, 2025-11-20 06:09
Actions #1

Updated by Go MAEDA 22 days ago

  • Status changed from New to Confirmed
  • Target version set to 6.1.1
  • Affected version set to 6.1.0
Actions #2

Updated by Katsuya HIDAKA 21 days ago

I confirmed that the patch mentioned in the issue description works as expected in Chrome, Safari, and Firefox. Looks good.

As another option, adding an explicit CSS class like .attachment-file to the <span> tag might make the intent clearer and improve readability of the code.

diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
index 0a22e3c81..decf83754 100644
--- a/app/assets/stylesheets/application.css
+++ b/app/assets/stylesheets/application.css
@@ -370,9 +370,9 @@ table.list td.icon {width: 100%;} /* Prevents border from disappearing due to in
 table.list td.id { width: 2%; text-align: center;}
 table.list td.name, table.list td.description, table.list td.subject, table.list td.parent-subject, table.list td.comments, table.list td.roles, table.list td.attachments, table.list td.text,  table.list td.short_description {text-align: left;}

-table.list td.attachments span {display: block; height: 16px;}
-table.list td.attachments span a.icon-download {display: inline-block; visibility: hidden;}
-table.list td.attachments span:hover a.icon-download {visibility: visible;}
+table.list td.attachments span.attachment-filename {display: block; height: 16px;}
+table.list td.attachments span.attachment-filename a.icon-download {visibility: hidden;}
+table.list td.attachments span.attachment-filename:hover a.icon-download {visibility: visible;}
 table.list td.tick {width:15%}
 table.list td.checkbox { width: 15px; padding: 2px 0 0 0; }
 table.list .checkbox input {padding:0px; height: initial;}
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index c1ddaedda..1180d4427 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -316,7 +316,8 @@ module ApplicationHelper
             :icon => 'download',
             :title => l(:button_download),
             :download => true
-          )
+          ),
+          class: 'attachment-filename'
         )
       else
         object.filename

I confirmed that all tests pass with this patch applied.

Actions #3

Updated by Mizuki ISHIKAWA 17 days ago

Katsuya HIDAKA wrote in #note-2:

I confirmed that the patch mentioned in the issue description works as expected in Chrome, Safari, and Firefox. Looks good.

As another option, adding an explicit CSS class like .attachment-file to the <span> tag might make the intent clearer and improve readability of the code.

[...]

I confirmed that all tests pass with this patch applied.

Thank you for the suggestion. I think this code will handle future changes better

Actions #4

Updated by Go MAEDA 16 days ago

  • Status changed from Confirmed to Resolved
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch suggested in #note-2 in r24182. Thank you.

Actions #5

Updated by Go MAEDA 16 days ago

  • Status changed from Resolved to Closed

Merged the fix into 6.1-stable branch in r24190.

Actions

Also available in: Atom PDF