US-008: Restructure DashboardLayout with SubNav, new tile order, and DetailPanel
- Wrap DashboardLayout with DetailPanelProvider in App.tsx - Import and render DetailPanel component alongside CommandPalette - Reorder tiles: PatientSummary (full) → LatestResults (half) + Projects (half) → CoreSkills (full) → LastConsultation (full) → CareerActivity (full) → Education (full) - Update ProjectsTile from full-width to half-width (remove full prop) - Update CoreSkillsTile from half-width to full-width (add full prop) - SubNav already renders between TopBar and content - Content area marginTop already accounts for both TopBar and SubNav heights - All tiles already have data-tile-id attributes for SubNav scrolling Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
+6
-1
@@ -5,6 +5,7 @@ import { ECGAnimation } from './components/ECGAnimation'
|
|||||||
import { LoginScreen } from './components/LoginScreen'
|
import { LoginScreen } from './components/LoginScreen'
|
||||||
import { DashboardLayout } from './components/DashboardLayout'
|
import { DashboardLayout } from './components/DashboardLayout'
|
||||||
import { AccessibilityProvider } from './contexts/AccessibilityContext'
|
import { AccessibilityProvider } from './contexts/AccessibilityContext'
|
||||||
|
import { DetailPanelProvider } from './contexts/DetailPanelContext'
|
||||||
|
|
||||||
function SkipButton({ onSkip }: { onSkip: () => void }) {
|
function SkipButton({ onSkip }: { onSkip: () => void }) {
|
||||||
const [visible, setVisible] = useState(false)
|
const [visible, setVisible] = useState(false)
|
||||||
@@ -76,7 +77,11 @@ function App() {
|
|||||||
<LoginScreen onComplete={() => setPhase('pmr')} />
|
<LoginScreen onComplete={() => setPhase('pmr')} />
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{phase === 'pmr' && <DashboardLayout />}
|
{phase === 'pmr' && (
|
||||||
|
<DetailPanelProvider>
|
||||||
|
<DashboardLayout />
|
||||||
|
</DetailPanelProvider>
|
||||||
|
)}
|
||||||
|
|
||||||
{(phase === 'boot' || phase === 'ecg') && (
|
{(phase === 'boot' || phase === 'ecg') && (
|
||||||
<SkipButton onSkip={skipToLogin} />
|
<SkipButton onSkip={skipToLogin} />
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { TopBar } from './TopBar'
|
|||||||
import { SubNav } from './SubNav'
|
import { SubNav } from './SubNav'
|
||||||
import Sidebar from './Sidebar'
|
import Sidebar from './Sidebar'
|
||||||
import { CommandPalette } from './CommandPalette'
|
import { CommandPalette } from './CommandPalette'
|
||||||
|
import { DetailPanel } from './DetailPanel'
|
||||||
import { PatientSummaryTile } from './tiles/PatientSummaryTile'
|
import { PatientSummaryTile } from './tiles/PatientSummaryTile'
|
||||||
import { LatestResultsTile } from './tiles/LatestResultsTile'
|
import { LatestResultsTile } from './tiles/LatestResultsTile'
|
||||||
import { CoreSkillsTile } from './tiles/CoreSkillsTile'
|
import { CoreSkillsTile } from './tiles/CoreSkillsTile'
|
||||||
@@ -163,7 +164,10 @@ export function DashboardLayout() {
|
|||||||
|
|
||||||
{/* LatestResultsTile — half width (left) */}
|
{/* LatestResultsTile — half width (left) */}
|
||||||
<LatestResultsTile />
|
<LatestResultsTile />
|
||||||
{/* CoreSkillsTile — half width (right) */}
|
{/* ProjectsTile — half width (right) */}
|
||||||
|
<ProjectsTile />
|
||||||
|
|
||||||
|
{/* CoreSkillsTile — full width */}
|
||||||
<CoreSkillsTile />
|
<CoreSkillsTile />
|
||||||
|
|
||||||
{/* LastConsultationTile — full width */}
|
{/* LastConsultationTile — full width */}
|
||||||
@@ -174,9 +178,6 @@ export function DashboardLayout() {
|
|||||||
|
|
||||||
{/* EducationTile — full width */}
|
{/* EducationTile — full width */}
|
||||||
<EducationTile />
|
<EducationTile />
|
||||||
|
|
||||||
{/* ProjectsTile — full width */}
|
|
||||||
<ProjectsTile />
|
|
||||||
</div>
|
</div>
|
||||||
</motion.main>
|
</motion.main>
|
||||||
</div>
|
</div>
|
||||||
@@ -187,6 +188,9 @@ export function DashboardLayout() {
|
|||||||
onClose={handlePaletteClose}
|
onClose={handlePaletteClose}
|
||||||
onAction={handlePaletteAction}
|
onAction={handlePaletteAction}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
{/* Detail panel */}
|
||||||
|
<DetailPanel />
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ export function CoreSkillsTile() {
|
|||||||
)
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card tileId="core-skills">
|
<Card full tileId="core-skills">
|
||||||
<CardHeader dotColor="amber" title="REPEAT MEDICATIONS" />
|
<CardHeader dotColor="amber" title="REPEAT MEDICATIONS" />
|
||||||
<div style={{ display: 'flex', flexDirection: 'column', gap: '10px' }}>
|
<div style={{ display: 'flex', flexDirection: 'column', gap: '10px' }}>
|
||||||
{skills.map((skill) => (
|
{skills.map((skill) => (
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ export function ProjectsTile() {
|
|||||||
)
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card full tileId="projects">
|
<Card tileId="projects">
|
||||||
<CardHeader dotColor="amber" title="ACTIVE PROJECTS" />
|
<CardHeader dotColor="amber" title="ACTIVE PROJECTS" />
|
||||||
|
|
||||||
<div style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
|
<div style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
|
||||||
|
|||||||
Reference in New Issue
Block a user