fix: Improve certification input handling#8
Conversation
✅ Deploy Preview for getcvdev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR improves how certifications are handled in the CV editor and preview, mainly by cleaning up certification input update/removal logic and minor formatting/style adjustments.
Changes:
- Refactors
CertificationInputsto update/remove entries by index with immutable array updates and a cleaner UI structure. - Renames the “empty certification” guard variable in the resume template for clarity.
- Minor formatting/style tweaks across types, editor inputs, and TODO tracking.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/types/cv.ts |
Fixes interface closing brace indentation/formatting. |
src/templates/JakesResume.tsx |
Renames certifications “empty item” flag variable for readability. |
src/components/inputs/EducationInputs.tsx |
Adjusts section heading classes (spacing/weight). |
src/components/inputs/CertificationInputs.tsx |
Refactors certification add/update/remove logic and restructures rendering. |
src/components/EditorInputs.tsx |
Formatting cleanup for prop spreading/spacing consistency. |
TODO.md |
Updates checklist/bug tracking items. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| className="px-4 py-2 border rounded-xl mx-auto hover:cursor-pointer" | ||
| onClick={() => addCertification()} | ||
| className="absolute -top-2 -right-2 bg-red-100 text-red-600 w-6 h-6 rounded-full flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity hover:bg-red-200 hover:cursor-pointer" | ||
| onClick={() => removeCertification(index)} |
There was a problem hiding this comment.
The remove (X) button is icon-only and currently has no accessible name. Please add an aria-label (e.g., "Remove certification") so screen readers can announce what the control does.
| onClick={() => removeCertification(index)} | |
| onClick={() => removeCertification(index)} | |
| aria-label="Remove certification" |
| const next = value.map((exp, i) => | ||
| i === index ? { ...exp, [key]: fieldValue } : exp, |
There was a problem hiding this comment.
updateCertification builds next with value.map((exp, i) => ...), but exp is a misleading name in the certifications context. Renaming the iterator variable to something like cert/certification will make the intent clearer and avoid confusion with the experience inputs pattern.
| const next = value.map((exp, i) => | |
| i === index ? { ...exp, [key]: fieldValue } : exp, | |
| const next = value.map((cert, i) => | |
| i === index ? { ...cert, [key]: fieldValue } : cert, |
No description provided.