From 7994e56cd0518dd770715902e191515f7c42039e Mon Sep 17 00:00:00 2001 From: Rodrigo Bertoldo de Sousa Martins Date: Fri, 11 Sep 2026 14:30:23 -0300 Subject: [PATCH] melhora visualizacao movel --- .../src/components/StructureInfoPanel.tsx | 33 +++++++++--- frontend/src/routes/AtlasPage.tsx | 52 +++++++++++-------- frontend/src/routes/PhysicalExamPage.tsx | 43 +++++++++------ 3 files changed, 80 insertions(+), 48 deletions(-) diff --git a/frontend/src/components/StructureInfoPanel.tsx b/frontend/src/components/StructureInfoPanel.tsx index a8bf760..958a4af 100644 --- a/frontend/src/components/StructureInfoPanel.tsx +++ b/frontend/src/components/StructureInfoPanel.tsx @@ -1,7 +1,17 @@ import { useAtlasStore } from "../store/useAtlasStore.js"; import type { Structure } from "../lib/api.js"; -export function StructureInfoPanel({ bySlug }: { bySlug: Map }) { +export function StructureInfoPanel({ + bySlug, + onClose, +}: { + bySlug: Map; + // No desktop o painel é uma gaveta lateral sempre visível (não faz + // sentido "fechar", só trocar de estrutura), então esse botão só existe + // quando a página que usa o painel passa um onClose — hoje é o caso da + // bottom sheet do Atlas no mobile. + onClose?: () => void; +}) { const selectedStructureId = useAtlasStore((s) => s.selectedStructureId); const selectStructure = useAtlasStore((s) => s.selectStructure); @@ -17,17 +27,22 @@ export function StructureInfoPanel({ bySlug }: { bySlug: Map ); } + function handleClose() { + selectStructure(null); + onClose?.(); + } + return (
-
-
-

{structure.namePt}

+
+
+

{structure.namePt}

{structure.nameEn}

@@ -40,7 +55,9 @@ export function StructureInfoPanel({ bySlug }: { bySlug: Map {structure.system.namePt} - {structure.description &&

{structure.description}

} + {structure.description && ( +

{structure.description}

+ )} {structure.regionPath.length > 0 && (

{structure.regionPath.join(" › ")}

diff --git a/frontend/src/routes/AtlasPage.tsx b/frontend/src/routes/AtlasPage.tsx index e04b704..8fea021 100644 --- a/frontend/src/routes/AtlasPage.tsx +++ b/frontend/src/routes/AtlasPage.tsx @@ -57,13 +57,14 @@ export default function AtlasPage() {
- {(leftOpen || rightOpen) && ( + {/* No mobile o painel de detalhes é uma bottom sheet (ver
); diff --git a/frontend/src/routes/PhysicalExamPage.tsx b/frontend/src/routes/PhysicalExamPage.tsx index 52969a7..c5060e6 100644 --- a/frontend/src/routes/PhysicalExamPage.tsx +++ b/frontend/src/routes/PhysicalExamPage.tsx @@ -112,13 +112,13 @@ export default function PhysicalExamPage() {

- {(leftOpen || rightOpen) && ( + {/* Só o drawer de camadas/técnicas (esquerda) cobre a tela toda no + mobile — o painel de detalhes virou uma bottom sheet (ver