From 99e89d63b826284aa29f9c3de5050b4911a19ad6 Mon Sep 17 00:00:00 2001 From: Jay Harris Date: Mon, 14 Oct 2024 14:52:41 +1300 Subject: [PATCH] Open the menu when we start editing something --- .../resources/page/components/full_screen/index.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/components/ai_chat/resources/page/components/full_screen/index.tsx b/components/ai_chat/resources/page/components/full_screen/index.tsx index d13bf2b84a9a..0e53b8f78d7b 100644 --- a/components/ai_chat/resources/page/components/full_screen/index.tsx +++ b/components/ai_chat/resources/page/components/full_screen/index.tsx @@ -10,7 +10,6 @@ import styles from './style.module.scss' import Main from '../main' import { SidebarHeader } from '../header' import SidebarNav from '../sidebar_nav' -import FeatureMenu from '../feature_button_menu' import { useAIChat } from '../../state/ai_chat_context' export default function FullScreen() { @@ -59,6 +58,13 @@ export default function FullScreen() { } } + React.useEffect(() => { + const isOpen = asideAnimationRef.current?.playbackRate === 1 + if (aiChatContext.editingConversationId && isOpen) { + toggleAside() + } + }, [aiChatContext.editingConversationId, isOpen]); + return (
@@ -79,9 +85,6 @@ export default function FullScreen() { > - )}