Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 442786b

Browse files
committed
UX: Bring back New Conversation button on mobile sidebar
1 parent b7b9179 commit 442786b

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

assets/javascripts/discourse/components/ai-bot-sidebar-new-conversation.gjs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Component from "@glimmer/component";
2+
import { action } from "@ember/object";
23
import { service } from "@ember/service";
34
import DButton from "discourse/components/d-button";
45
import { AI_CONVERSATIONS_PANEL } from "../services/ai-conversations-sidebar-manager";
@@ -14,12 +15,18 @@ export default class AiBotSidebarNewConversation extends Component {
1415
);
1516
}
1617

18+
@action
19+
routeTo() {
20+
this.router.transitionTo("/discourse-ai/ai-bot/conversations");
21+
this.args.outletArgs?.toggleNavigationMenu?.();
22+
}
23+
1724
<template>
1825
{{#if this.shouldRender}}
1926
<DButton
20-
@route="/discourse-ai/ai-bot/conversations"
2127
@label="discourse_ai.ai_bot.conversations.new"
2228
@icon="plus"
29+
@action={{this.routeTo}}
2330
class="ai-new-question-button btn-default"
2431
/>
2532
{{/if}}

assets/stylesheets/modules/ai-bot-conversations/common.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@use "lib/viewport";
22

3-
// Hide the new question button from the hamburger menu's footer
4-
.hamburger-panel .ai-new-question-button {
3+
// Hide the new question button from the hamburger menu's footer on desktop
4+
.desktop-view .hamburger-panel .ai-new-question-button {
55
display: none;
66
}
77

0 commit comments

Comments
 (0)