@@ -84,6 +84,7 @@ function NavBar({ layoutref }: NavBarProps) {
8484 const [ isConnected , setConnected ] = useState ( false ) ;
8585 const [ isRunning , setRunning ] = useState ( false ) ;
8686 const [ isBlockly , setBlockly ] = useState ( false ) ;
87+ const [ isOtherTab , setIsOtherTab ] = useState ( false ) ;
8788 const dialogRef = useRef < HTMLDialogElement > ( null ) ;
8889 const [ isDlgOpen , setDlgOpen ] = useState ( false ) ;
8990 const [ isGamepadConnected , setGamepadConnected ] = useState < boolean > ( false ) ;
@@ -131,8 +132,12 @@ function NavBar({ layoutref }: NavBarProps) {
131132 AppMgr . getInstance ( ) . on ( EventType . EVENT_EDITOR , ( type : EditorType ) => {
132133 if ( type === EditorType . BLOCKLY ) {
133134 setBlockly ( true ) ;
135+ setIsOtherTab ( false ) ;
134136 } else if ( type === EditorType . PYTHON ) {
135137 setBlockly ( false ) ;
138+ setIsOtherTab ( false ) ;
139+ } else {
140+ setIsOtherTab ( true ) ;
136141 }
137142 } ) ;
138143
@@ -572,6 +577,7 @@ function NavBar({ layoutref }: NavBarProps) {
572577 helpText : t ( 'dashboard' )
573578 } ;
574579 layoutref ! . current ?. addTabToTabSet ( Constants . EDITOR_TABSET_ID , tabInfo ) ;
580+ setIsOtherTab ( true ) ;
575581 setActiveTab ( 'Dashboard' ) ;
576582 }
577583
@@ -587,6 +593,7 @@ function NavBar({ layoutref }: NavBarProps) {
587593 helpText : 'Chat with AI models from Hugging Face' ,
588594 } ;
589595 layoutref ! . current ?. addTabToTabSet ( Constants . EDITOR_TABSET_ID , tabInfo ) ;
596+ setIsOtherTab ( true ) ;
590597 setActiveTab ( 'AI Chat' ) ;
591598 }
592599
@@ -907,7 +914,7 @@ function NavBar({ layoutref }: NavBarProps) {
907914 { item . children . map ( ( child , ci ) => (
908915 < li
909916 key = { ci }
910- className = { `text-neutral-200 py-1 pl-4 pr-10 hover:bg-matisse-400 dark:hover:bg-shark-500 ${ child . isFile && ! isConnected ? 'pointer-events-none' : 'pointer-events-auto' } ${ child . isView && ! isBlockly ? 'hidden' : 'visible' } ` }
917+ className = { `text-neutral-200 py-1 pl-4 pr-10 hover:bg-matisse-400 dark:hover:bg-shark-500 ${ child . isFile && ! isConnected ? 'pointer-events-none' : 'pointer-events-auto' } ${ child . isView && ! isBlockly || isOtherTab ? 'hidden' : 'visible' } ` }
911918 onClick = { child . clicked }
912919 >
913920 < MenuItem
@@ -920,7 +927,8 @@ function NavBar({ layoutref }: NavBarProps) {
920927 { item . childrenExt && (
921928 < ul
922929 id = "blockId"
923- className = { `${ isBlockly ? 'hidden' : 'visible' } cursor-pointer flex-col` }
930+ className = { `${ isBlockly || isOtherTab ? 'hidden' : 'visible' } cursor-pointer flex-col` }
931+
924932 >
925933 { item . childrenExt ?. map ( ( child , ci ) => (
926934 < li
0 commit comments