US-002: Add TypeScript types and CSS custom properties for depth features
Add foundation types and styles for upcoming depth enhancements: TypeScript types (src/types/pmr.ts): - SkillCategory type for grouping skills - KPIStory interface for rich KPI detail content - story? field added to KPI interface - ConstellationNode and ConstellationLink for D3 career graph - DetailPanelContent discriminated union for panel routing - EducationExtra interface for expanded education detail CSS custom properties (src/index.css): - --subnav-height: 36px (section jump bar) - --panel-narrow: 400px, --panel-wide: 60vw (detail panel widths) - --backdrop-blur: 4px, --backdrop-bg (panel overlay) - @keyframes panel-slide-in, panel-slide-out, backdrop-fade-in - prefers-reduced-motion overrides for instant panel animations Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -132,6 +132,7 @@ export interface KPI {
|
||||
sub: string
|
||||
colorVariant: 'green' | 'amber' | 'teal'
|
||||
explanation: string
|
||||
story?: KPIStory // NEW: rich detail for panel
|
||||
}
|
||||
|
||||
export interface SkillMedication {
|
||||
@@ -145,3 +146,51 @@ export interface SkillMedication {
|
||||
status: 'Active' | 'Historical'
|
||||
icon: string
|
||||
}
|
||||
|
||||
// Skill categories for grouped display
|
||||
export type SkillCategory = 'Technical' | 'Domain' | 'Leadership'
|
||||
|
||||
// Extended KPI with story content for detail panel
|
||||
export interface KPIStory {
|
||||
context: string // What this number covers
|
||||
role: string // Your role / what you did
|
||||
outcomes: string[] // Key decisions or results
|
||||
period?: string // Time period
|
||||
}
|
||||
|
||||
// Constellation-specific types
|
||||
export interface ConstellationNode {
|
||||
id: string
|
||||
type: 'role' | 'skill'
|
||||
label: string
|
||||
shortLabel?: string // abbreviated for small nodes
|
||||
organization?: string
|
||||
startYear?: number
|
||||
endYear?: number | null
|
||||
orgColor?: string
|
||||
domain?: 'clinical' | 'technical' | 'leadership'
|
||||
}
|
||||
|
||||
export interface ConstellationLink {
|
||||
source: string
|
||||
target: string
|
||||
strength: number
|
||||
}
|
||||
|
||||
// Detail panel content union
|
||||
export type DetailPanelContent =
|
||||
| { type: 'kpi'; kpi: KPI }
|
||||
| { type: 'skill'; skill: SkillMedication }
|
||||
| { type: 'skills-all'; category?: SkillCategory }
|
||||
| { type: 'consultation'; consultation: Consultation }
|
||||
| { type: 'project'; investigation: Investigation }
|
||||
| { type: 'education'; document: Document }
|
||||
| { type: 'career-role'; consultation: Consultation }
|
||||
|
||||
// Education extras (for detail panel)
|
||||
export interface EducationExtra {
|
||||
documentId: string
|
||||
extracurriculars?: string[]
|
||||
researchDescription?: string
|
||||
programmeDetail?: string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user