@@ -307,7 +307,7 @@ const EcoTreeView: React.FC<EcoTreeViewProps> = ({
307307 }
308308
309309 return (
310- < div className = "flex h-full flex-col" >
310+ < div className = "flex h-full flex-col overflow-hidden " >
311311 { /* Search Bar */ }
312312 < div className = "border-b border-white/10 p-4" >
313313 < div className = "relative" >
@@ -331,11 +331,10 @@ const EcoTreeView: React.FC<EcoTreeViewProps> = ({
331331 ) }
332332 </ div >
333333 </ div >
334-
335- < div className = "red-scrollbar flex-1 overflow-y-auto" >
334+ < div className = "red-scrollbar flex-1 overflow-y-auto py-4" >
336335 { /* Popular Openings Section */ }
337336 { ! searchTerm && (
338- < div className = "py-1" >
337+ < div >
339338 < TreeNode
340339 level = { 0 }
341340 hasChildren = { filteredPopularOpenings . length > 0 }
@@ -344,12 +343,17 @@ const EcoTreeView: React.FC<EcoTreeViewProps> = ({
344343 parentLines = { [ ] }
345344 onToggle = { ( ) => setShowPopular ( ! showPopular ) }
346345 >
347- < div className = "flex flex-1 cursor-pointer items-center justify-between rounded px-1 py-0.5 hover:bg-human-2/10" >
346+ < div
347+ className = "flex flex-1 cursor-pointer items-center justify-between rounded px-1 py-0.5 hover:bg-human-2/10"
348+ onClick = { ( ) => setShowPopular ( ! showPopular ) }
349+ >
348350 < div className = "flex items-center gap-1.5" >
349- < span className = "material-symbols-outlined text-sm text-human-4" >
350- star
351+ < span className = "inline-flex w-5 justify-center" >
352+ < span className = "material-symbols-outlined text-sm text-human-4" >
353+ star
354+ </ span >
351355 </ span >
352- < span className = "font-medium text-human-4 " >
356+ < span className = "text-sm font-medium text-primary " >
353357 Popular Openings
354358 </ span >
355359 </ div >
@@ -440,7 +444,7 @@ const EcoTreeView: React.FC<EcoTreeViewProps> = ({
440444 ) }
441445
442446 { /* ECO Sections Tree */ }
443- < div className = "py-1 " >
447+ < div className = "" >
444448 { filteredSections . map ( ( section , sectionIndex ) => {
445449 const isLastSection = sectionIndex === filteredSections . length - 1
446450 const sectionExpanded = autoExpandedSections . has ( section . code )
@@ -456,7 +460,10 @@ const EcoTreeView: React.FC<EcoTreeViewProps> = ({
456460 parentLines = { [ ] }
457461 onToggle = { ( ) => toggleSection ( section . code ) }
458462 >
459- < div className = "flex flex-1 cursor-pointer items-center justify-between rounded px-1 py-0.5 hover:bg-human-2/10" >
463+ < div
464+ className = "flex flex-1 cursor-pointer items-center justify-between rounded px-1 py-0.5 hover:bg-human-2/10"
465+ onClick = { ( ) => toggleSection ( section . code ) }
466+ >
460467 < div className = "flex items-center gap-1.5" >
461468 < span className = "font-mono text-sm font-bold text-human-4" >
462469 { section . code }
@@ -510,7 +517,12 @@ const EcoTreeView: React.FC<EcoTreeViewProps> = ({
510517 toggleDecade ( section . code , groupCode )
511518 }
512519 >
513- < div className = "flex flex-1 items-center gap-1.5 px-1 py-0.5" >
520+ < div
521+ className = "flex flex-1 cursor-pointer items-center gap-1.5 rounded px-1 py-0.5 hover:bg-human-2/10"
522+ onClick = { ( ) =>
523+ toggleDecade ( section . code , groupCode )
524+ }
525+ >
514526 < span className = "font-mono text-sm font-medium text-human-4" >
515527 { groupCode }
516528 </ span >
0 commit comments