A platform for community discussion. Free, open, simple.
UX: Make discobot icon default for sidebar & header icons (#42742)
Jordan Vidrinecd6007c57d51
diff --git a/plugins/discourse-ai/assets/javascripts/discourse/components/ai-bot-header-icon.gjs b/plugins/discourse-ai/assets/javascripts/discourse/components/ai-bot-header-icon.gjsindex 99487a0c322..a3fea358538 100644--- a/plugins/discourse-ai/assets/javascripts/discourse/components/ai-bot-header-icon.gjs+++ b/plugins/discourse-ai/assets/javascripts/discourse/components/ai-bot-header-icon.gjs@@ -39,7 +39,7 @@ export default class AiBotHeaderIcon extends Component {if (this.clickShouldRouteOutOfConversations) {return "shuffle";}- return "robot";+ return "discobot";}get clickShouldRouteOutOfConversations() {diff --git a/plugins/discourse-ai/assets/javascripts/discourse/initializers/add-ai-bot-to-community-section.gjs b/plugins/discourse-ai/assets/javascripts/discourse/initializers/add-ai-bot-to-community-section.gjsindex 192356fef56..7cbbd4b4664 100644--- a/plugins/discourse-ai/assets/javascripts/discourse/initializers/add-ai-bot-to-community-section.gjs+++ b/plugins/discourse-ai/assets/javascripts/discourse/initializers/add-ai-bot-to-community-section.gjs@@ -31,7 +31,7 @@ export default {route = "discourse-ai-bot-conversations";text = i18n("discourse_ai.ai_bot.shortcut_link");title = i18n("discourse_ai.ai_bot.shortcut_title");- defaultPrefixValue = "robot";+ defaultPrefixValue = "discobot";};});});diff --git a/plugins/discourse-ai/spec/system/ai_bot/header_toggle_spec.rb b/plugins/discourse-ai/spec/system/ai_bot/header_toggle_spec.rbindex 6d97bd2623a..5ad6b721154 100644--- a/plugins/discourse-ai/spec/system/ai_bot/header_toggle_spec.rb+++ b/plugins/discourse-ai/spec/system/ai_bot/header_toggle_spec.rb@@ -37,7 +37,7 @@ RSpec.describe "AI Bot - Header Toggle" doexpect(header).to have_icon_in_bot_button(icon: "shuffle")header.click_bot_button- expect(header).to have_icon_in_bot_button(icon: "robot")+ expect(header).to have_icon_in_bot_button(icon: "discobot")expect(page).to have_current_path("/hot")end@@ -48,7 +48,7 @@ RSpec.describe "AI Bot - Header Toggle" doexpect(ai_pm_homepage).to have_homepageheader.click_bot_button- expect(header).to have_icon_in_bot_button(icon: "robot")+ expect(header).to have_icon_in_bot_button(icon: "discobot")expect(page).to have_current_path("/hot")visit "/categories"@@ -58,7 +58,7 @@ RSpec.describe "AI Bot - Header Toggle" doexpect(ai_pm_homepage).to have_homepageheader.click_bot_button- expect(header).to have_icon_in_bot_button(icon: "robot")+ expect(header).to have_icon_in_bot_button(icon: "discobot")expect(page).to have_current_path("/categories")endenddiff --git a/plugins/discourse-ai/spec/system/ai_bot/homepage_spec.rb b/plugins/discourse-ai/spec/system/ai_bot/homepage_spec.rbindex 52cf008d86b..373c71306f1 100644--- a/plugins/discourse-ai/spec/system/ai_bot/homepage_spec.rb+++ b/plugins/discourse-ai/spec/system/ai_bot/homepage_spec.rb@@ -346,7 +346,7 @@ RSpec.describe "AI Bot - Homepage" doit "displays the shuffle icon when on homepage or bot PM" dovisit "/"- expect(header).to have_icon_in_bot_button(icon: "robot")+ expect(header).to have_icon_in_bot_button(icon: "discobot")header.click_bot_buttonexpect(header).to have_icon_in_bot_button(icon: "shuffle")@@ -355,9 +355,9 @@ RSpec.describe "AI Bot - Homepage" doai_pm_homepage.click_fist_sidebar_conversationexpect(header).to have_icon_in_bot_button(icon: "shuffle")- # Go back home and assert that the icon is now robot again+ # Go back home and assert that the icon is now discobot againheader.click_bot_button- expect(header).to have_icon_in_bot_button(icon: "robot")+ expect(header).to have_icon_in_bot_button(icon: "discobot")endit "displays 'new question' button on homepage and topic page" do@@ -436,7 +436,7 @@ RSpec.describe "AI Bot - Homepage" doit "shows shuffle icon in the header and doesn't display sidebar back link" dovisit "/"- expect(header).to have_icon_in_bot_button(icon: "robot")+ expect(header).to have_icon_in_bot_button(icon: "discobot")header.click_bot_buttonexpect(ai_pm_homepage).to have_homepageexpect(header).to have_icon_in_bot_button(icon: "shuffle")diff --git a/plugins/discourse-ai/svg-icons/icons-sprite.svg b/plugins/discourse-ai/svg-icons/icons-sprite.svgindex 9d0511c2217..bc8afca3c1c 100644--- a/plugins/discourse-ai/svg-icons/icons-sprite.svg+++ b/plugins/discourse-ai/svg-icons/icons-sprite.svg@@ -15,6 +15,6 @@</symbol><symbol id="discobot" viewBox="0 0 512 512">- <path d="M175.61 481.26H26.03c-6.75 0-13.36-2.67-18.42-7.59-5.06-5.06-7.87-11.81-7.59-18.84V290.76C.3 242.12 19.42 196 54.43 161.28c35.43-35.43 82.67-54.83 132.71-54.83h.56c49.77 0 96.3 19.54 131.17 55.11a187.257 187.257 0 0 1 48.5 88.57c5.06 21.79-6.19 44.14-26.71 53.14-14.62 6.47-69.17 27.7-170.67 37.96 4.5 11.25 16.17 23.34 46.68 29.66 29.8 6.19 64.53 4.22 87.59 2.95 9.84-.56 16.87-.98 21.79-.56 6.33.42 11.81 4.22 14.62 9.98 2.67 5.62 2.25 12.37-1.41 17.57-6.19 9-13.22 17.57-20.95 25.31-33.88 34.44-79.29 53.99-127.79 54.97h-14.76c0 .14-.14.14-.28.14h.14ZM35.17 446.11h154.65c34.87-.7 67.9-13.36 94.19-35.85-22.07.7-49.49.42-74.51-4.78-58.48-12.23-74.23-45.41-77.18-71.28-.7-6.47 1.12-12.79 5.2-17.85s10.12-8.15 16.59-8.72c82.81-7.31 143.26-23.62 172.22-36.27 5.06-2.25 7.87-7.73 6.61-13.07-6.33-27.13-19.82-51.88-39.36-71.84-28.12-28.68-65.8-44.57-106.14-44.57h-.56c-40.91 0-79.15 15.89-107.97 44.57-28.26 28.12-43.86 65.37-43.86 104.6v155.07c-.14 0 0 0 0 0h.14Zm-10.13 0ZM17.87 290.9Z"/><circle cx="171.11" cy="217.94" r="32.05"/><path d="M511.76 293.71c-.7-5.2-3.51-9.84-7.73-12.93s-9.42-4.5-14.62-3.66l-52.3 7.73c-5.2.7-9.84 3.51-12.93 7.73-3.09 4.22-4.5 9.42-3.66 14.62.98 6.61 5.2 12.23 11.39 15.04 2.53 1.12 5.34 1.69 8.01 1.69s1.97 0 2.95-.28l52.3-7.73c5.2-.7 9.84-3.51 12.93-7.73s4.5-9.42 3.66-14.62v.14ZM490.67 388.19l-71.98-36.41c-9.28-5.34-21.37-2.25-26.71 7.03-2.67 4.5-3.37 9.84-2.11 14.9 1.27 5.06 4.5 9.42 9.14 11.95l71.98 36.41c1.27.7 2.53 1.27 3.94 1.69 1.97.56 3.94.84 5.9.84 6.89 0 13.36-3.51 16.87-9.7 5.48-9.42 2.39-21.51-7.03-26.99v.28Z"/>+ <path d="M175.61,443.41H26.03c-6.75,0-13.36-2.67-18.42-7.59-5.06-5.06-7.87-11.81-7.59-18.84v-164.07c.28-48.64,19.4-94.76,54.41-129.48,35.43-35.43,82.67-54.83,132.71-54.83h.56c49.77,0,96.3,19.54,131.17,55.11,23.97,24.53,40.75,55.16,48.5,88.57,5.06,21.79-6.19,44.14-26.71,53.14-14.62,6.47-69.17,27.7-170.67,37.96,4.5,11.25,16.17,23.34,46.68,29.66,29.8,6.19,64.53,4.22,87.59,2.95,9.84-.56,16.87-.98,21.79-.56,6.33.42,11.81,4.22,14.62,9.98,2.67,5.62,2.25,12.37-1.41,17.57-6.19,9-13.22,17.57-20.95,25.31-33.88,34.44-79.29,53.99-127.79,54.97h-14.76c0,.14-.14.14-.28.14h.14,0ZM35.17,408.25h154.65c34.87-.7,67.9-13.36,94.19-35.85-22.07.7-49.49.42-74.51-4.78-58.48-12.23-74.23-45.41-77.18-71.28-.7-6.47,1.12-12.79,5.2-17.85s10.12-8.15,16.59-8.72c82.81-7.31,143.26-23.62,172.22-36.27,5.06-2.25,7.87-7.73,6.61-13.07-6.33-27.13-19.82-51.88-39.36-71.84-28.12-28.68-65.8-44.57-106.14-44.57h-.56c-40.91,0-79.15,15.89-107.97,44.57-28.26,28.12-43.86,65.37-43.86,104.6v155.07c-.14,0,0,0,0,0h.14-.02Z"/><circle cx="171.11" cy="180.08" r="32.05"/><path d="M511.76,255.85c-.7-5.2-3.51-9.84-7.73-12.93s-9.42-4.5-14.62-3.66l-52.3,7.73c-5.2.7-9.84,3.51-12.93,7.73s-4.5,9.42-3.66,14.62c.98,6.61,5.2,12.23,11.39,15.04,2.53,1.12,5.34,1.69,8.01,1.69s1.97,0,2.95-.28l52.3-7.73c5.2-.7,9.84-3.51,12.93-7.73s4.5-9.42,3.66-14.62v.14h0ZM490.67,350.33l-71.98-36.41c-9.28-5.34-21.37-2.25-26.71,7.03-2.67,4.5-3.37,9.84-2.11,14.9,1.27,5.06,4.5,9.42,9.14,11.95l71.98,36.41c1.27.7,2.53,1.27,3.94,1.69,1.97.56,3.94.84,5.9.84,6.89,0,13.36-3.51,16.87-9.7,5.48-9.42,2.39-21.51-7.03-26.99v.28h0Z"/></symbol></svg>\ No newline at end of filediff --git a/plugins/discourse-ai/test/javascripts/acceptance/ai-bot-sidebar-link-test.js b/plugins/discourse-ai/test/javascripts/acceptance/ai-bot-sidebar-link-test.jsindex 45b1075ce53..076cc46c32a 100644--- a/plugins/discourse-ai/test/javascripts/acceptance/ai-bot-sidebar-link-test.js+++ b/plugins/discourse-ai/test/javascripts/acceptance/ai-bot-sidebar-link-test.js@@ -27,8 +27,8 @@ acceptance("AI Bot - Sidebar community link", function (needs) {.exists("AI bot link is displayed in the sidebar");assert- .dom(".sidebar-section-link[data-link-name='ai-bot'] .d-icon-robot")- .exists("AI bot link has robot icon");+ .dom(".sidebar-section-link[data-link-name='ai-bot'] .d-icon-discobot")+ .exists("AI bot link has discobot icon");assert.dom(".sidebar-section-link[data-link-name='ai-bot']")