Project

General

Profile

Actions

Defect #41918

closed

Replaces warning icon with SVG in watcher list and workflow warnings

Added by Takenori TAKAKI about 2 months ago. Updated about 1 month ago.

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

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

The warning icon shown in the watcher list for users who cannot view the issue is still an old image.
I propose a patch to replace it with an SVG icon.

diff --git a/app/helpers/watchers_helper.rb b/app/helpers/watchers_helper.rb
index f7763e41b9..12788db66f 100644
--- a/app/helpers/watchers_helper.rb
+++ b/app/helpers/watchers_helper.rb
@@ -52,7 +52,7 @@ module WatchersHelper
       s << avatar(user, :size => "16").to_s
       s << link_to_principal(user, class: user.class.to_s.downcase)
       if object.respond_to?(:visible?) && user.is_a?(User) && !object.visible?(user)
-        s << content_tag('span', l(:notice_invalid_watcher), class: 'icon-only icon-warning', title: l(:notice_invalid_watcher))
+        s << content_tag('span', sprite_icon('warning', l(:notice_invalid_watcher)), class: 'icon-only icon-warning', title: l(:notice_invalid_watcher))
       end
       if remove_allowed
         url = {:controller => 'watchers',
The screenshots below show the before and after of applying the patch:
Before After

Files

clipboard-202412021338-2rqqe.png (41.6 KB) clipboard-202412021338-2rqqe.png Takenori TAKAKI, 2024-12-02 05:38
clipboard-202412021338-uuwec.png (38.9 KB) clipboard-202412021338-uuwec.png Takenori TAKAKI, 2024-12-02 05:38
clipboard-202412111139-et5wc.png (21.9 KB) clipboard-202412111139-et5wc.png Takenori TAKAKI, 2024-12-11 03:39
clipboard-202412111140-9xdwc.png (19.7 KB) clipboard-202412111140-9xdwc.png Takenori TAKAKI, 2024-12-11 03:40
clipboard-202412111150-fus2l.png (48.2 KB) clipboard-202412111150-fus2l.png Takenori TAKAKI, 2024-12-11 03:50
clipboard-202412111150-jetwh.png (46.2 KB) clipboard-202412111150-jetwh.png Takenori TAKAKI, 2024-12-11 03:50
clipboard-202412111156-oekkl.png (52.5 KB) clipboard-202412111156-oekkl.png Takenori TAKAKI, 2024-12-11 03:56
clipboard-202412111157-1lzqb.png (49.5 KB) clipboard-202412111157-1lzqb.png Takenori TAKAKI, 2024-12-11 03:57
clipboard-202412111312-3ck6t.png (53.9 KB) clipboard-202412111312-3ck6t.png Takenori TAKAKI, 2024-12-11 05:13
clipboard-202412111316-8dkag.png (53.4 KB) clipboard-202412111316-8dkag.png Takenori TAKAKI, 2024-12-11 05:16
0001-Add-css-class-specification-for-warning-svg-icon.patch (689 Bytes) 0001-Add-css-class-specification-for-warning-svg-icon.patch Takenori TAKAKI, 2024-12-11 06:19
0002-Replace-warning-icon-in-watcher-list-with-SVG.patch (1.11 KB) 0002-Replace-warning-icon-in-watcher-list-with-SVG.patch Takenori TAKAKI, 2024-12-11 06:19
0003-Replace-warning-icon-in-issue_status-list-with-SVG.patch (1.03 KB) 0003-Replace-warning-icon-in-issue_status-list-with-SVG.patch Takenori TAKAKI, 2024-12-11 06:19
0004-Replace-warning-icon-in-tracker-list-with-SVG.patch (949 Bytes) 0004-Replace-warning-icon-in-tracker-list-with-SVG.patch Takenori TAKAKI, 2024-12-11 06:19
0005-Replace-warning-icon-in-issue_transitiont-with-SVG.patch (2.16 KB) 0005-Replace-warning-icon-in-issue_transitiont-with-SVG.patch Takenori TAKAKI, 2024-12-11 06:19

Related issues

Related to Redmine - Defect #41952: Flash notice icons uses the legacy icons NewMarius BĂLTEANU

Actions
Actions #1

Updated by Go MAEDA about 1 month ago

Thank you for submitting the patch. However, the original yellow icons, which were more noticeable, have been replaced with blue line icons, making them less prominent.

I believe it would be better if filled yellow icons could be displayed.

Actions #2

Updated by Go MAEDA about 1 month ago

  • Related to Defect #41952: Flash notice icons uses the legacy icons added
Actions #3

Updated by Marius BĂLTEANU about 1 month ago

  • Assignee set to Marius BĂLTEANU
  • Target version set to 6.0.3
Actions #4

Updated by Takenori TAKAKI about 1 month ago

I agree with the comment from Go Maeda (#note-1).
It seems that specifying the class attribute of the svg tag in application.css as follows will enable the color specification.

diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
index a45f821b69..1ba7e54ad6 100644
--- a/app/assets/stylesheets/application.css
+++ b/app/assets/stylesheets/application.css
@@ -1763,7 +1763,7 @@ svg.icon-ok {
   stroke: #c61a1a
 }

-.icon-warning svg {
+.icon-warning svg.icon-svg {
   stroke: #e4bc4b;
 }

Actions #5

Updated by Takenori TAKAKI about 1 month ago

I found that the Warning icon needs to be replaced for more than just the watcher list.
The replacements needed are as follows.

  • Watcher list
    Before After
  • Issue Status List
    Before:

    After:
  • Tracker List
    Before:

    After:
  • Issue Transition Warning
    Before After
Actions #7

Updated by Marius BĂLTEANU about 1 month ago

  • Category set to UI
  • Status changed from New to Resolved
  • Resolution set to Fixed

Committed, thanks!

Actions #8

Updated by Marius BĂLTEANU about 1 month ago

  • Subject changed from Replace warning icon in watcher list with SVG to Replaces warning icon with SVG in watcher list and workflow warnings
Actions #9

Updated by Marius BĂLTEANU about 1 month ago

  • Target version changed from 6.0.3 to 6.0.2
Actions #10

Updated by Marius BĂLTEANU about 1 month ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF