Skip to content
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

Change icons to svg #69

Merged
merged 4 commits into from
Nov 18, 2024
Merged

Change icons to svg #69

merged 4 commits into from
Nov 18, 2024

Conversation

ishikawa999
Copy link
Collaborator

This pull request will change all icons in the plugin to support Redmine 6 or later svg icons.
Redmine version supported by this plugin is 6.0

before after
normal mode screenshot 2024-11-18 15 44 26 screenshot 2024-11-18 15 44 16
yaml mode screenshot 2024-11-18 15 44 30 screenshot 2024-11-18 15 44 12

@@ -17,17 +17,17 @@ def normal_mode_input_fields(setting, lang)
content += content_tag(:p) do
content_tag(:label, k) +
text_field_tag("settings[custom_messages][#{k}]", v.to_s) +
link_to_function('', '$(this).closest("p").remove();', class: 'icon icon-del clear-key-link')
link_to_function(sprite_icon('del'), '$(this).closest("p").remove()', class: 'icon icon-del clear-key-link')
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

本題とはそれますが、
link_to_functionを通すと$(this).closest("p").remove();; return false;のようにセミコロンが自動で入るようだったのでセミコロンなしに直しています。

@@ -1,6 +1,6 @@
<div>
<%= select_tag 'select-key', available_message_options(@setting, lang), id: 'key-selector' %>
<span class='icon icon-help'><%= l(:text_description_of_search_box) %></span>
<span class='icon icon-help'><%= sprite_icon('help', l(:text_description_of_search_box)) %></span>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

icon-help は必要ないと思います。

現状では icon-help は、古いPNG画像にフォールバックするためのものにすぎません。
https://github.com/redmica/redmica/blob/7eb368c8fb93cac296321ff1b44890237271352f/app/assets/stylesheets/application.css#L1844

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

全体的に既存のアイコンを表示していたクラスはそのままにしていましたが、よく考えたらRedmine6より前との互換性はどのみちないのでクラスを維持しても意味が無いですね
他のクラスも合わせて修正します

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.iconにはスタイルが適用されているため.iconのみ残します

@ishikawa999
Copy link
Collaborator Author

@hidakatsuya
不要なクラスの削除とREADMEの更新を行いました

Copy link
Contributor

@hidakatsuya hidakatsuya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ChromeとSafariで動作を確認しました。良さそうです。

一点、README の Administartion ページのスクショも更新します?

1: Open setting page
Administration > Message customize

caption: :label_custom_messages, html: { class: 'icon icon-edit' }
requires_redmine version_or_higher: '3.2'
caption: :label_custom_messages, html: { class: 'icon' }, icon: 'edit'
requires_redmine version_or_higher: '6.0'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼

@ishikawa999
Copy link
Collaborator Author

@hidakatsuya

一点、README の Administartion ページのスクショも更新します?

変更漏れでした 🙇
9c6fd16 で更新しています。(imagesブランチに置いてある画像をREADMEに表示する形なのでこのプルリクエストでは変更不要)
GitHubのキャッシュか何かで現在の https://github.com/farend/redmine_message_customize?tab=readme-ov-file#usage は元画像のままなのですが、リンク先の画像は置き換わっています

@ishikawa999 ishikawa999 merged commit 96a1802 into master Nov 18, 2024
4 checks passed
@ishikawa999 ishikawa999 deleted the change-icons-to-svg branch November 18, 2024 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants