From 94f09f5c4230a33d3099f6cc2f73b66a9750914f Mon Sep 17 00:00:00 2001 From: glaubervila Date: Tue, 30 Jun 2026 14:38:44 -0300 Subject: [PATCH] Reorganize ClusterDetail layout with tabbed left panel Replace the side-by-side TargetProperties/MembersDataGrid layout with a tabbed panel on the left side: "Members" tab shows the MembersDataGrid and "Properties" tab shows TargetProperties. The Aladin viewer stays on the right at a fixed 500px height shared by both columns to prevent resize on tab switch. A placeholder Box is added at the bottom for future content. --- .../src/containers/ClusterDetail/index.js | 91 +++++++++++-------- 1 file changed, 51 insertions(+), 40 deletions(-) diff --git a/frontend/src/containers/ClusterDetail/index.js b/frontend/src/containers/ClusterDetail/index.js index 7798c73..9b5d625 100644 --- a/frontend/src/containers/ClusterDetail/index.js +++ b/frontend/src/containers/ClusterDetail/index.js @@ -4,6 +4,8 @@ import Box from '@mui/material/Box'; import Grid from '@mui/material/Grid2'; import { useEffect } from 'react' import CircularProgress from '@mui/material/CircularProgress'; +import Tabs from '@mui/material/Tabs'; +import Tab from '@mui/material/Tab'; import TargetProperties from "@/components/TargetProperties"; import MembersDataGrid from "@/components/MembersDataGrid"; import { useAladinContext } from '@/components/Aladin/AladinContext'; @@ -20,11 +22,20 @@ import MyLocationIcon from '@mui/icons-material/MyLocation'; import CameraAltIcon from '@mui/icons-material/CameraAlt'; import Tooltip from '@mui/material/Tooltip'; +function TabPanel({ children, value, index }) { + return ( + + ); +} + export default function ClusterDetailContainer({ catalog, record }) { const { isReady, setTarget, aladinRef, setImageSurvey, addCatalog, gotoRaDec, toggleMarkerVisibility, takeSnapshot, toggleCatalogVisibility } = useAladinContext(); const [selectedMember, setSelectedMember] = React.useState(undefined); + const [activeTab, setActiveTab] = React.useState(0); useEffect(() => { // Quando o catalogo tem uma imagem/survey default @@ -113,36 +124,62 @@ export default function ClusterDetailContainer({ catalog, record }) { }, [selectedMember]); return ( - - - - + + + + setActiveTab(v)}> + + + + + + {isLoadingMembersCatalog && ( + + + + )} + {(!isLoadingMembersCatalog && membersCatalog !== undefined) && ( + + + + )} + + + + + - + + - {/* Área principal do Aladin */} - {/* Toolbar vertical à direita */} `1px solid ${theme.palette.divider}`, backgroundColor: (theme) => theme.palette.background.paper, paddingY: 1, @@ -181,34 +218,8 @@ export default function ClusterDetailContainer({ catalog, record }) { - {isLoadingMembersCatalog && ( - - - - )} - - {(!isLoadingMembersCatalog && membersCatalog !== undefined) && ( - - - - )} + {/* TODO: add Jupyter Notebook integration */} + );