Defect #41918
closedReplaces warning icon with SVG in watcher list and workflow warnings
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
Related issues
Updated by Go MAEDA about 1 year 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.
Updated by Go MAEDA about 1 year ago
- Related to Defect #41952: Flash notice icons use the legacy icons added
Updated by Marius BĂLTEANU about 1 year ago
- Assignee set to Marius BĂLTEANU
- Target version set to 6.0.3
Updated by Takenori TAKAKI about 1 year 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;
}
Updated by Takenori TAKAKI about 1 year ago
- File clipboard-202412111139-et5wc.png clipboard-202412111139-et5wc.png added
- File clipboard-202412111140-9xdwc.png clipboard-202412111140-9xdwc.png added
- File clipboard-202412111150-fus2l.png clipboard-202412111150-fus2l.png added
- File clipboard-202412111150-jetwh.png clipboard-202412111150-jetwh.png added
- File clipboard-202412111156-oekkl.png clipboard-202412111156-oekkl.png added
- File clipboard-202412111157-1lzqb.png clipboard-202412111157-1lzqb.png added
- File clipboard-202412111312-3ck6t.png clipboard-202412111312-3ck6t.png added
- File clipboard-202412111316-8dkag.png clipboard-202412111316-8dkag.png added
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
Updated by Takenori TAKAKI about 1 year ago
- File 0001-Add-css-class-specification-for-warning-svg-icon.patch 0001-Add-css-class-specification-for-warning-svg-icon.patch added
- File 0002-Replace-warning-icon-in-watcher-list-with-SVG.patch 0002-Replace-warning-icon-in-watcher-list-with-SVG.patch added
- File 0003-Replace-warning-icon-in-issue_status-list-with-SVG.patch 0003-Replace-warning-icon-in-issue_status-list-with-SVG.patch added
- File 0004-Replace-warning-icon-in-tracker-list-with-SVG.patch 0004-Replace-warning-icon-in-tracker-list-with-SVG.patch added
- File 0005-Replace-warning-icon-in-issue_transitiont-with-SVG.patch 0005-Replace-warning-icon-in-issue_transitiont-with-SVG.patch added
I attach a patch for the replacementin #note-5.
Updated by Marius BĂLTEANU about 1 year ago
- Category set to UI
- Status changed from New to Resolved
- Resolution set to Fixed
Committed, thanks!
Updated by Marius BĂLTEANU about 1 year ago
- Subject changed from Replace warning icon in watcher list with SVG to Replaces warning icon with SVG in watcher list and workflow warnings
Updated by Marius BĂLTEANU about 1 year ago
- Target version changed from 6.0.3 to 6.0.2
Updated by Marius BĂLTEANU about 1 year ago
- Status changed from Resolved to Closed