@@ -7,6 +7,7 @@ import { SolutionOverview } from '@/generated/Data'
77import { SolutionComponentType } from '@/lib/Types'
88import { SolutionVennDiagram } from './SolutionVennDiagram'
99import { ComponentDetailsPane } from './ComponentDetailsPane'
10+ import { Sheet , SheetContent , SheetHeader , SheetTitle } from '@/components/shared/ui/sheet'
1011
1112interface ISolutionOverviewViewProps { }
1213
@@ -16,6 +17,7 @@ export const SolutionOverviewView = ({}: ISolutionOverviewViewProps) => {
1617 solutionNames : string [ ] ;
1718 components : SolutionComponentType [ ] ;
1819 } | null > ( null ) ;
20+ const [ isDetailsPaneOpen , setIsDetailsPaneOpen ] = useState ( false ) ;
1921
2022 useEffect ( ( ) => {
2123 dispatch ( { type : 'SET_ELEMENT' , payload : < > </ > } ) ;
@@ -24,6 +26,7 @@ export const SolutionOverviewView = ({}: ISolutionOverviewViewProps) => {
2426
2527 const handleOverlapClick = ( solutionNames : string [ ] , components : SolutionComponentType [ ] ) => {
2628 setSelectedOverlap ( { solutionNames, components } ) ;
29+ setIsDetailsPaneOpen ( true ) ;
2730 } ;
2831
2932 return (
@@ -35,37 +38,44 @@ export const SolutionOverviewView = ({}: ISolutionOverviewViewProps) => {
3538 < h1 className = 'text-2xl font-bold' > Solution Overview</ h1 >
3639 </ div >
3740
38- < div className = "grid grid-cols-1 lg:grid-cols-2 gap-6 h-full" >
39- { /* Venn Diagram Section */ }
40- < div className = 'bg-white rounded-lg border border-gray-300 shadow-md p-6' >
41- < h2 className = "text-xl font-semibold mb-4" > Solution Component Overlaps</ h2 >
42- { SolutionOverview && SolutionOverview . Solutions . length > 0 ? (
43- < SolutionVennDiagram
44- solutionOverview = { SolutionOverview }
45- onOverlapClick = { handleOverlapClick }
46- />
47- ) : (
48- < div className = "text-gray-500 text-center py-8" >
49- No solution data available. Please run the generator with multiple solutions configured.
50- </ div >
51- ) }
52- </ div >
41+ { /* Full width Venn Diagram Section */ }
42+ < div className = 'bg-white rounded-lg border border-gray-300 shadow-md p-6' >
43+ < h2 className = "text-xl font-semibold mb-4" > Solution Component Overlaps</ h2 >
44+ { SolutionOverview && SolutionOverview . Solutions . length > 0 ? (
45+ < SolutionVennDiagram
46+ solutionOverview = { SolutionOverview }
47+ onOverlapClick = { handleOverlapClick }
48+ />
49+ ) : (
50+ < div className = "text-gray-500 text-center py-8" >
51+ No solution data available. Please run the generator with multiple solutions configured.
52+ </ div >
53+ ) }
54+
55+ { SolutionOverview && SolutionOverview . Solutions . length > 0 && (
56+ < div className = "mt-4 text-sm text-gray-600 text-center" >
57+ Click on any section of the diagram to view detailed component information
58+ </ div >
59+ ) }
60+ </ div >
5361
54- { /* Component Details Section */ }
55- < div className = 'bg-white rounded-lg border border-gray-300 shadow-md p-6' >
56- < h2 className = "text-xl font-semibold mb-4" > Component Details</ h2 >
57- { selectedOverlap ? (
58- < ComponentDetailsPane
59- solutionNames = { selectedOverlap . solutionNames }
60- components = { selectedOverlap . components }
61- />
62- ) : (
63- < div className = "text-gray-500 text-center py-8" >
64- Click on a section in the diagram to view component details.
62+ { /* Component Details Flyout */ }
63+ < Sheet open = { isDetailsPaneOpen } onOpenChange = { setIsDetailsPaneOpen } >
64+ < SheetContent side = "right" className = "w-96 overflow-y-auto" >
65+ < SheetHeader >
66+ < SheetTitle > Component Details</ SheetTitle >
67+ </ SheetHeader >
68+
69+ { selectedOverlap && (
70+ < div className = "mt-6" >
71+ < ComponentDetailsPane
72+ solutionNames = { selectedOverlap . solutionNames }
73+ components = { selectedOverlap . components }
74+ />
6575 </ div >
6676 ) }
67- </ div >
68- </ div >
77+ </ SheetContent >
78+ </ Sheet >
6979 </ div >
7080 </ div >
7181 )
0 commit comments