From 700c636d29fff05168bcd0663e602233458b04bf Mon Sep 17 00:00:00 2001 From: Ty Correll Date: Thu, 19 Oct 2023 17:30:27 -0500 Subject: [PATCH] UX: unify ai representing icon (#24029) This PR addresses the push to unify the icon representing AI throughout Discourse, by using the discourse-sparkles icon. The icon is being moved to core to make changes with dependencies included in core that were using the "magic" icon instead. In 2 places "magic" -> "discourse-sparkles, 1. topic summaries 2. (unreleased) chat summaries example --- .../javascripts/discourse/app/components/summary-box.js | 2 +- lib/svg_sprite.rb | 1 + .../assets/javascripts/discourse/initializers/chat-setup.js | 2 +- vendor/assets/svg-icons/discourse-additional.svg | 5 +++++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/app/components/summary-box.js b/app/assets/javascripts/discourse/app/components/summary-box.js index c3582d9aa0c..90178947e7c 100644 --- a/app/assets/javascripts/discourse/app/components/summary-box.js +++ b/app/assets/javascripts/discourse/app/components/summary-box.js @@ -21,7 +21,7 @@ export default class SummaryBox extends Component { } get generateSummaryIcon() { - return this.summary.canRegenerate ? "sync" : "magic"; + return this.summary.canRegenerate ? "sync" : "discourse-sparkles"; } get outdatedSummaryWarningText() { diff --git a/lib/svg_sprite.rb b/lib/svg_sprite.rb index 5e80cdbf0c1..ca8bb833046 100644 --- a/lib/svg_sprite.rb +++ b/lib/svg_sprite.rb @@ -73,6 +73,7 @@ module SvgSprite discourse-emojis discourse-expand discourse-other-tab + discourse-sparkles discourse-threads download ellipsis-h diff --git a/plugins/chat/assets/javascripts/discourse/initializers/chat-setup.js b/plugins/chat/assets/javascripts/discourse/initializers/chat-setup.js index 9c36f7ed0ac..5cadafb2238 100644 --- a/plugins/chat/assets/javascripts/discourse/initializers/chat-setup.js +++ b/plugins/chat/assets/javascripts/discourse/initializers/chat-setup.js @@ -112,7 +112,7 @@ export default { api.registerChatComposerButton({ translatedLabel: "chat.summarization.title", id: "channel-summary", - icon: "magic", + icon: "discourse-sparkles", position: "dropdown", action: "showChannelSummaryModal", }); diff --git a/vendor/assets/svg-icons/discourse-additional.svg b/vendor/assets/svg-icons/discourse-additional.svg index bae0d236ec9..f892781c28c 100644 --- a/vendor/assets/svg-icons/discourse-additional.svg +++ b/vendor/assets/svg-icons/discourse-additional.svg @@ -65,4 +65,9 @@ Additional SVG icons + + + + +