fix: address UI component review feedback — timeouts, ARIA, active nav, env vars, type cleanup#11
Conversation
|
🚀 Preview deployment ready! 📎 Preview URL: https://dev.codebuilder.org/preview/copilot-sub-pr-10/ Deployed from commit |
…env vars, types Co-authored-by: digitalnomad91 <2067771+digitalnomad91@users.noreply.github.com>
…link occurrences Co-authored-by: digitalnomad91 <2067771+digitalnomad91@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Pull request overview
This PR addresses a set of UI review follow-ups across the Next.js app, focusing on timer cleanup, accessibility semantics, safer navigation/progress handling, privacy/security tweaks, and small type/prop cleanups.
Changes:
- Fix leaked/uncleared timers (Contact banner + VideoPlayer retry) and improve VideoPlayer source handling/MIME typing.
- Improve UI semantics and navigation UX (active nav with
aria-current, safer global click interception, modal ARIA attributes). - Remove sensitive/hardcoded values (PII logging reduction + move Google Maps key to
NEXT_PUBLIC_GOOGLE_MAPS_API_KEY) and perform general cleanup (dead links, unused imports, Tailwind class fix, grid refactor).
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/components/video-player.tsx |
Makes webmSrc optional, infers <source type> from extension, and clears the retry timeout on unmount. |
src/components/portfolio/PortfolioModal.tsx |
Adds dialog ARIA attributes and rewrites description link rendering; improves body overflow restoration. |
src/components/layout/header.tsx |
Improves click interception safety and adds active-link styling with aria-current="page". |
src/components/layout/footer.tsx |
Updates social URLs to https, avoids _blank for Skype, and removes dead footer routes. |
src/components/layout/contact-banner.tsx |
Fixes timer cleanup via refs and replaces <a> with Next.js <Link>. |
src/components/about/TeamMember.tsx |
Removes unused Link import and simplifies ContactLink typing (label/href only). |
src/components/about/ProgressBar.tsx |
Fixes Tailwind duration class to a generated arbitrary value. |
src/app/services/page.tsx |
Removes incorrect duplicate .mp4 passed as webmSrc. |
src/app/portfolio/page.tsx |
Replaces fixed 2-row slicing with a single dynamic grid render. |
src/app/contact/page.tsx |
Removes incorrect duplicate .mp4 webmSrc and moves Maps key to env var. |
src/app/api/contact/route.ts |
Gates logging to development and removes PII fields from logs. |
src/app/about/page.tsx |
Removes unused FontAwesome imports and updates contactLinks to match simplified typing. |
.env.example |
Documents NEXT_PUBLIC_GOOGLE_MAPS_API_KEY. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
|
|
||
| // Safely render description with optional inline links for all occurrences of link.label | ||
| const renderDescription = () => { | ||
| if (!link || !description.includes(link.label)) { |
| <div | ||
| ref={backdropRef} | ||
| role="dialog" | ||
| aria-modal="true" | ||
| aria-labelledby={titleId} | ||
| className="fixed inset-0 z-50 flex items-center justify-center bg-black/50 animate-fadeIn" | ||
| onClick={handleBackdropClick} |
| <iframe | ||
| className="border-0 w-full rounded" | ||
| style={{ height: '300px' }} | ||
| src="//www.google.com/maps/embed/v1/place?q=1211%2022nd%20Ave%20NE%20Minneapolis%20MN&zoom=17&key=AIzaSyCdnSPXfE71_GBBjj1lZYzmkohP_E9Ivm8" | ||
| src={`//www.google.com/maps/embed/v1/place?q=1211%2022nd%20Ave%20NE%20Minneapolis%20MN&zoom=17&key=${process.env.NEXT_PUBLIC_GOOGLE_MAPS_API_KEY}`} | ||
| allowFullScreen | ||
| loading="lazy" | ||
| referrerPolicy="no-referrer-when-downgrade" |
Resolves a batch of bugs and code quality issues flagged in review on the UI overhaul PR: leaked timers, PII in logs, hardcoded secrets, missing ARIA semantics, incorrect MIME types, dead nav links, and unused imports/props.
Timer & Cleanup Fixes
contact-banner.tsx:revertTimeoutwas returned from inside thesetTimeoutcallback (no-op). Both timers now tracked in refs and cleared in effect cleanup.video-player.tsx: RetrysetTimeoutID stored in a ref, cleared on unmount.MIME Type / VideoPlayer
webmSrcoptional; MIME type inferred from extension via module-levelgetType().services/page.tsx&contact/page.tsx: Removed duplicate.mp4URL incorrectly passed aswebmSrc.Security / Privacy
api/contact/route.ts: PII fields (name, email, message) removed from server log; log gated behindNODE_ENV === 'development'.contact/page.tsx: Hardcoded Google Maps API key moved toNEXT_PUBLIC_GOOGLE_MAPS_API_KEY;.env.exampleupdated.Header — Active Links & Safe Click Handling
pathnameto apply active styles andaria-current="page".target≠_selfanchors to avoid stalled progress bar.PortfolioModal
role="dialog",aria-modal,aria-labelledby(viauseId())."".Cleanup
footer.tsx:http://→https://for social URLs; Skype gets notarget="_blank"; dead routes (/technology,/sitemap,/privacy-policy) removed.contact-banner.tsx:<a href="/contact">→<Link>.TeamMember.tsx: Removed unusedLinkimport; droppedicon/iconPackfromContactLink(never read — icon chosen bylabel).about/page.tsx: Removed unused FA imports (faEnvelope,faPhone,faGithub,faLinkedin,faDiscord).portfolio/page.tsx: Replaced two hard-coded 4-item row slices with a single dynamic grid over the fullportfolioItemsarray.ProgressBar.tsx:duration-800→duration-[800ms](non-standard class wasn't generated by Tailwind).📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.