Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"trailingComma": "es5",
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "avoid"
"arrowParens": "avoid",
"endOfLine": "lf"
}
16 changes: 13 additions & 3 deletions src/components/WorkExperience.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const WorkExperience: FC<WorkExperienceProps> = ({ work }) => {
// Group contiguous roles by company name (assuming work is reverse chronological).
// Each group gets a wrapper with a single GrowthIndicator summarizing progression.
const groups: { company: string; items: Work[] }[] = [];
work.forEach((item) => {
work.forEach(item => {
const company = item.name || '';
const lastGroup = groups[groups.length - 1];
if (lastGroup && lastGroup.company === company) {
Expand Down Expand Up @@ -74,9 +74,19 @@ export const WorkExperience: FC<WorkExperienceProps> = ({ work }) => {
const showHeader = totalRoles > 1;

return (
<div key={`group-${gi}`} className={showHeader ? 'pl-3 border-l-2 border-brand mb-4 print:mb-2' : 'mb-4 print:mb-2'}>
<div
key={`group-${gi}`}
className={
showHeader ? 'pl-3 border-l-2 border-brand mb-4 print:mb-2' : 'mb-4 print:mb-2'
}
>
{showHeader && (
<GroupHeader company={group.company} start={earliestStart} end={latestEnd} roles={totalRoles} />
<GroupHeader
company={group.company}
start={earliestStart}
end={latestEnd}
roles={totalRoles}
/>
)}
{group.items.map((workItem, wi) => (
<TimelineEntry
Expand Down
19 changes: 11 additions & 8 deletions src/components/ui/GrowthIndicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export const GrowthIndicator: FC<GrowthIndicatorProps> = ({
className,
ariaLabel,
}) => {
const clampedPercent = typeof percent === 'number' ? Math.max(0, Math.min(100, percent)) : undefined;
const clampedPercent =
typeof percent === 'number' ? Math.max(0, Math.min(100, percent)) : undefined;
const clampedLevel = typeof level === 'number' ? Math.max(1, Math.min(5, level)) : undefined;

return (
Expand All @@ -34,13 +35,15 @@ export const GrowthIndicator: FC<GrowthIndicatorProps> = ({
aria-label={ariaLabel || label}
>
{/* Simple arrow glyph, avoids extra icon deps in tests */}
<span aria-hidden="true" className="font-bold leading-none">↑</span>
<span aria-hidden="true" className="font-bold leading-none">
</span>
<span className="leading-none">{label}</span>

{/* Optional tiny level dots (1-5) */}
{typeof clampedLevel === 'number' && (
<span className="ml-1 flex items-center gap-0.5" aria-hidden="true">
{[0, 1, 2, 3, 4].map((i) => (
{[0, 1, 2, 3, 4].map(i => (
<span
key={i}
className={cn(
Expand All @@ -54,11 +57,11 @@ export const GrowthIndicator: FC<GrowthIndicatorProps> = ({

{/* Optional tiny progress bar */}
{typeof clampedPercent === 'number' && (
<span className="ml-1 inline-flex items-center w-12 h-1.5 rounded-full bg-brand/10 overflow-hidden" aria-hidden="true">
<span
className="h-full bg-brand"
style={{ width: `${clampedPercent}%` }}
/>
<span
className="ml-1 inline-flex items-center w-12 h-1.5 rounded-full bg-brand/10 overflow-hidden"
aria-hidden="true"
>
<span className="h-full bg-brand" style={{ width: `${clampedPercent}%` }} />
</span>
)}
</span>
Expand Down
4 changes: 3 additions & 1 deletion src/components/ui/SectionCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ export const SectionCard: FC<SectionCardProps> = memo(
<div className={`flex flex-col ${spacing.card.gap.default} ${spacing.card.gap.print}`}>
{title && (
<div className="flex items-start justify-between gap-2">
<h3 id={titleId} className={`${typography.weight.medium} ${typography.size.base} flex-1`}
<h3
id={titleId}
className={`${typography.weight.medium} ${typography.size.base} flex-1`}
>
{title}
{subtitle && (
Expand Down
Loading