Skip to content

fix: Improve certification input handling#8

Merged
jcf-junior merged 3 commits intomainfrom
fix/certification-logic
Mar 3, 2026
Merged

fix: Improve certification input handling#8
jcf-junior merged 3 commits intomainfrom
fix/certification-logic

Conversation

@jcf-junior
Copy link
Owner

No description provided.

@jcf-junior jcf-junior requested a review from Copilot March 3, 2026 01:36
@netlify
Copy link

netlify bot commented Mar 3, 2026

Deploy Preview for getcvdev ready!

Name Link
🔨 Latest commit 79818a0
🔍 Latest deploy log https://app.netlify.com/projects/getcvdev/deploys/69a63cf54f2137000801e3e7
😎 Deploy Preview https://deploy-preview-8--getcvdev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 CertificationInputs to 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)}
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
onClick={() => removeCertification(index)}
onClick={() => removeCertification(index)}
aria-label="Remove certification"

Copilot uses AI. Check for mistakes.
Comment on lines +14 to +15
const next = value.map((exp, i) =>
i === index ? { ...exp, [key]: fieldValue } : exp,
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
const next = value.map((exp, i) =>
i === index ? { ...exp, [key]: fieldValue } : exp,
const next = value.map((cert, i) =>
i === index ? { ...cert, [key]: fieldValue } : cert,

Copilot uses AI. Check for mistakes.
@jcf-junior jcf-junior merged commit 9e21406 into main Mar 3, 2026
5 checks passed
@jcf-junior jcf-junior deleted the fix/certification-logic branch March 3, 2026 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants