From 797d727a20bc0a0505263275fdaf5d3b34f77ef8 Mon Sep 17 00:00:00 2001 From: Mark VanLandingham Date: Thu, 24 Apr 2025 13:47:11 -0500 Subject: [PATCH] UX: Bring back New Conversation button on mobile sidebar (#1283) --- .../ai-bot-sidebar-new-conversation.gjs | 9 ++++++++- .../modules/ai-bot-conversations/common.scss | 4 ++-- spec/system/ai_bot/homepage_spec.rb | 17 +++++++++++++++++ .../page_objects/components/ai_pm_homepage.rb | 8 ++++++++ 4 files changed, 35 insertions(+), 3 deletions(-) diff --git a/assets/javascripts/discourse/components/ai-bot-sidebar-new-conversation.gjs b/assets/javascripts/discourse/components/ai-bot-sidebar-new-conversation.gjs index 915b8283..e4c4d323 100644 --- a/assets/javascripts/discourse/components/ai-bot-sidebar-new-conversation.gjs +++ b/assets/javascripts/discourse/components/ai-bot-sidebar-new-conversation.gjs @@ -1,4 +1,5 @@ import Component from "@glimmer/component"; +import { action } from "@ember/object"; import { service } from "@ember/service"; import DButton from "discourse/components/d-button"; import { AI_CONVERSATIONS_PANEL } from "../services/ai-conversations-sidebar-manager"; @@ -14,12 +15,18 @@ export default class AiBotSidebarNewConversation extends Component { ); } + @action + routeTo() { + this.router.transitionTo("/discourse-ai/ai-bot/conversations"); + this.args.outletArgs?.toggleNavigationMenu?.(); + } +