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:
@@ -20,6 +20,8 @@ export function Card({ children, full, className, tileId }: CardProps) {
|
||||
boxShadow: isHovered ? 'var(--shadow-md)' : 'var(--shadow-sm)',
|
||||
transition: 'box-shadow 0.2s, border-color 0.2s',
|
||||
gridColumn: full ? '1 / -1' : undefined,
|
||||
minWidth: 0,
|
||||
overflow: 'hidden',
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -392,12 +392,18 @@ export function DashboardLayout() {
|
||||
|
||||
{/* Two-column experience/skills grid */}
|
||||
<div className="pathway-columns" style={{ marginTop: '24px' }}>
|
||||
<div data-tile-id="section-experience">
|
||||
<WorkExperienceSubsection onNodeHighlight={handleNodeHighlight} />
|
||||
</div>
|
||||
<div data-tile-id="section-skills">
|
||||
<RepeatMedicationsSubsection onNodeHighlight={handleNodeHighlight} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Education subsection */}
|
||||
<div data-tile-id="section-education">
|
||||
<EducationSubsection />
|
||||
</div>
|
||||
</ParentSection>
|
||||
</div>
|
||||
</motion.main>
|
||||
|
||||
@@ -12,8 +12,8 @@ export function ParentSection({ title, children, className, tileId }: ParentSect
|
||||
return (
|
||||
<Card full className={className} tileId={tileId}>
|
||||
<h2
|
||||
className="text-[1.5rem] sm:text-[1.8rem] md:text-[2rem] lg:text-[2.4rem]"
|
||||
style={{
|
||||
fontSize: '2.4rem',
|
||||
fontWeight: 700,
|
||||
color: 'var(--text-primary)',
|
||||
lineHeight: 1.1,
|
||||
|
||||
@@ -11,10 +11,10 @@ interface SubNavProps {
|
||||
|
||||
const sections: NavSection[] = [
|
||||
{ id: 'overview', label: 'Overview', tileId: 'patient-summary' },
|
||||
{ id: 'skills', label: 'Skills', tileId: 'core-skills' },
|
||||
{ id: 'experience', label: 'Experience', tileId: 'career-activity' },
|
||||
{ id: 'skills', label: 'Skills', tileId: 'section-skills' },
|
||||
{ id: 'experience', label: 'Experience', tileId: 'section-experience' },
|
||||
{ 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) {
|
||||
@@ -31,7 +31,7 @@ export function SubNav({ activeSection, onSectionClick }: SubNavProps) {
|
||||
return (
|
||||
<nav
|
||||
aria-label="Section navigation"
|
||||
className="subnav-scroll"
|
||||
className="subnav-scroll md:justify-center"
|
||||
style={{
|
||||
position: 'sticky',
|
||||
top: 'var(--topbar-height)',
|
||||
@@ -41,7 +41,6 @@ export function SubNav({ activeSection, onSectionClick }: SubNavProps) {
|
||||
borderBottom: '1px solid var(--border-light)',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
gap: '24px',
|
||||
overflowX: 'auto',
|
||||
overflowY: 'hidden',
|
||||
|
||||
@@ -93,7 +93,6 @@ export function PatientSummaryTile() {
|
||||
|
||||
const kpiGridStyles: React.CSSProperties = {
|
||||
display: 'grid',
|
||||
gridTemplateColumns: '1fr 1fr',
|
||||
gap: '12px',
|
||||
}
|
||||
|
||||
@@ -113,7 +112,7 @@ export function PatientSummaryTile() {
|
||||
{/* Latest Results subsection */}
|
||||
<div style={{ marginTop: '24px' }}>
|
||||
<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) => (
|
||||
<MetricCard key={kpi.id} kpi={kpi} />
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user