feat: US-014 - Responsive verification and fixes across breakpoints

- Fix grid overflow at mobile: add minWidth:0 + overflow:hidden to Card
- Scale ParentSection h2 responsively (1.5rem mobile → 2.4rem desktop)
- Make KPI grid single-column below 480px, 2-column above
- Fix SubNav alignment: left-aligned on mobile, centered on md+
- Fix SubNav tileIds to match restructured dashboard sections
- Add data-tile-id anchors to experience/skills/education subsections
This commit is contained in:
2026-02-14 18:41:07 +00:00
parent 6bd12dd776
commit f9b4062dd5
5 changed files with 17 additions and 11 deletions
+2
View File
@@ -20,6 +20,8 @@ export function Card({ children, full, className, tileId }: CardProps) {
boxShadow: isHovered ? 'var(--shadow-md)' : 'var(--shadow-sm)', boxShadow: isHovered ? 'var(--shadow-md)' : 'var(--shadow-sm)',
transition: 'box-shadow 0.2s, border-color 0.2s', transition: 'box-shadow 0.2s, border-color 0.2s',
gridColumn: full ? '1 / -1' : undefined, gridColumn: full ? '1 / -1' : undefined,
minWidth: 0,
overflow: 'hidden',
} }
return ( return (
+9 -3
View File
@@ -392,12 +392,18 @@ export function DashboardLayout() {
{/* Two-column experience/skills grid */} {/* Two-column experience/skills grid */}
<div className="pathway-columns" style={{ marginTop: '24px' }}> <div className="pathway-columns" style={{ marginTop: '24px' }}>
<WorkExperienceSubsection onNodeHighlight={handleNodeHighlight} /> <div data-tile-id="section-experience">
<RepeatMedicationsSubsection onNodeHighlight={handleNodeHighlight} /> <WorkExperienceSubsection onNodeHighlight={handleNodeHighlight} />
</div>
<div data-tile-id="section-skills">
<RepeatMedicationsSubsection onNodeHighlight={handleNodeHighlight} />
</div>
</div> </div>
{/* Education subsection */} {/* Education subsection */}
<EducationSubsection /> <div data-tile-id="section-education">
<EducationSubsection />
</div>
</ParentSection> </ParentSection>
</div> </div>
</motion.main> </motion.main>
+1 -1
View File
@@ -12,8 +12,8 @@ export function ParentSection({ title, children, className, tileId }: ParentSect
return ( return (
<Card full className={className} tileId={tileId}> <Card full className={className} tileId={tileId}>
<h2 <h2
className="text-[1.5rem] sm:text-[1.8rem] md:text-[2rem] lg:text-[2.4rem]"
style={{ style={{
fontSize: '2.4rem',
fontWeight: 700, fontWeight: 700,
color: 'var(--text-primary)', color: 'var(--text-primary)',
lineHeight: 1.1, lineHeight: 1.1,
+4 -5
View File
@@ -11,10 +11,10 @@ interface SubNavProps {
const sections: NavSection[] = [ const sections: NavSection[] = [
{ id: 'overview', label: 'Overview', tileId: 'patient-summary' }, { id: 'overview', label: 'Overview', tileId: 'patient-summary' },
{ id: 'skills', label: 'Skills', tileId: 'core-skills' }, { id: 'skills', label: 'Skills', tileId: 'section-skills' },
{ id: 'experience', label: 'Experience', tileId: 'career-activity' }, { id: 'experience', label: 'Experience', tileId: 'section-experience' },
{ id: 'projects', label: 'Projects', tileId: 'projects' }, { id: 'projects', label: 'Projects', tileId: 'projects' },
{ id: 'education', label: 'Education', tileId: 'education' }, { id: 'education', label: 'Education', tileId: 'section-education' },
] ]
export function SubNav({ activeSection, onSectionClick }: SubNavProps) { export function SubNav({ activeSection, onSectionClick }: SubNavProps) {
@@ -31,7 +31,7 @@ export function SubNav({ activeSection, onSectionClick }: SubNavProps) {
return ( return (
<nav <nav
aria-label="Section navigation" aria-label="Section navigation"
className="subnav-scroll" className="subnav-scroll md:justify-center"
style={{ style={{
position: 'sticky', position: 'sticky',
top: 'var(--topbar-height)', top: 'var(--topbar-height)',
@@ -41,7 +41,6 @@ export function SubNav({ activeSection, onSectionClick }: SubNavProps) {
borderBottom: '1px solid var(--border-light)', borderBottom: '1px solid var(--border-light)',
display: 'flex', display: 'flex',
alignItems: 'center', alignItems: 'center',
justifyContent: 'center',
gap: '24px', gap: '24px',
overflowX: 'auto', overflowX: 'auto',
overflowY: 'hidden', overflowY: 'hidden',
+1 -2
View File
@@ -93,7 +93,6 @@ export function PatientSummaryTile() {
const kpiGridStyles: React.CSSProperties = { const kpiGridStyles: React.CSSProperties = {
display: 'grid', display: 'grid',
gridTemplateColumns: '1fr 1fr',
gap: '12px', gap: '12px',
} }
@@ -113,7 +112,7 @@ export function PatientSummaryTile() {
{/* Latest Results subsection */} {/* Latest Results subsection */}
<div style={{ marginTop: '24px' }}> <div style={{ marginTop: '24px' }}>
<CardHeader dotColor="teal" title="LATEST RESULTS" rightText="Updated May 2025" /> <CardHeader dotColor="teal" title="LATEST RESULTS" rightText="Updated May 2025" />
<div style={kpiGridStyles}> <div className="grid-cols-1 xs:grid-cols-2" style={kpiGridStyles}>
{kpis.map((kpi) => ( {kpis.map((kpi) => (
<MetricCard key={kpi.id} kpi={kpi} /> <MetricCard key={kpi.id} kpi={kpi} />
))} ))}