-
-
Notifications
You must be signed in to change notification settings - Fork 2
Update SEO Data Structure #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… validation feedback
There was a problem hiding this 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 standardizes import paths, enhances the contact page UI, and cleans up structured data components.
- Switches shared-constant imports from alias to relative paths in key modules.
- Refines contact form styling, spacing, and error-state handling with the
cnutility. - Removes redundant
use clientdirectives and pretty-prints structured data JSON.
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/scripts/test-structured-data.ts | Updated import-path check in the structured-data test |
| src/lib/utils/og-image.ts | Changed import from alias to relative path |
| src/lib/meta/posts.ts | Changed import from alias to relative path |
| src/components/*.tsx | Removed use client directives in all structured-data components |
| src/components/home-person-structured-data.tsx | Switched JSON parsing to JSON.stringify(..., null, 2) |
| src/app/contact/page.tsx | Added cn to form fields, adjusted styling and layout |
| src/app/contact/metadata.ts | Changed import from alias to relative path |
| src/app/api/contact/route.ts | Changed import from alias to relative path |
| .github/FUNDING.yml | Updated GitHub sponsorship username |
Comments suppressed due to low confidence (2)
src/app/contact/page.tsx:159
- The
size-20utility isn't a default Tailwind class. If using Tailwind, replace it with standard width/height classes (e.g.,w-16 h-16) or confirm thatsize-20is defined.
<div className="inline-flex items-center justify-center size-20 bg-primary/10 rounded-full text-primary mb-4">
src/app/contact/page.tsx:160
- The
size-8class isn't recognized by default in Tailwind. Usew-8 h-8or the appropriate utility classes to ensure consistent SVG sizing.
<svg className="size-8" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
||
| // Check if it imports from constants | ||
| if (content.includes('from "@lib/constants"') || content.includes('from \'@lib/constants\'')) { | ||
| if (content.includes('from "../lib/constants"') || content.includes('from \'../lib/constants\'')) { |
Copilot
AI
Jun 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test only checks for '../lib/constants' but many imports now use deeper paths (e.g., '../../lib/constants'). Consider matching both '../lib/constants' and '../../lib/constants' to avoid false negatives.
| if (content.includes('from "../lib/constants"') || content.includes('from \'../lib/constants\'')) { | |
| if (content.includes('from "../lib/constants"') || content.includes('from \'../lib/constants\'') || | |
| content.includes('from "../../lib/constants"') || content.includes('from \'../../lib/constants\'')) { |
| value={formData.email} | ||
| onChange={handleChange} | ||
| className={formErrors.email ? "border-destructive ring-primary" : ""} | ||
| className={cn(formErrors.name ? "border-destructive ring-primary" : "", "rounded-xl bg-transparent")} |
Copilot
AI
Jun 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The email input's error styling condition uses formErrors.name instead of formErrors.email, so it won't highlight email errors correctly. Update the condition to check formErrors.email.
| className={cn(formErrors.name ? "border-destructive ring-primary" : "", "rounded-xl bg-transparent")} | |
| className={cn(formErrors.email ? "border-destructive ring-primary" : "", "rounded-xl bg-transparent")} |
| value={formData.subject} | ||
| onChange={handleChange} | ||
| className={formErrors.subject ? "border-destructive ring-primary" : ""} | ||
| className={cn(formErrors.name ? "border-destructive ring-primary" : "", "rounded-xl bg-transparent")} |
Copilot
AI
Jun 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The subject field's error styling condition is still checking formErrors.name instead of formErrors.subject. Change it to formErrors.subject to properly indicate errors.
| className={cn(formErrors.name ? "border-destructive ring-primary" : "", "rounded-xl bg-transparent")} | |
| className={cn(formErrors.subject ? "border-destructive ring-primary" : "", "rounded-xl bg-transparent")} |
| value={formData.message} | ||
| onChange={handleChange} | ||
| className={formErrors.message ? "border-destructive ring-primary" : ""} | ||
| className={cn(formErrors.name ? "border-destructive ring-primary" : "", "rounded-xl bg-transparent")} |
Copilot
AI
Jun 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The message textarea's error condition references formErrors.name instead of formErrors.message. It should check formErrors.message to display validation errors correctly.
| className={cn(formErrors.name ? "border-destructive ring-primary" : "", "rounded-xl bg-transparent")} | |
| className={cn(formErrors.message ? "border-destructive ring-primary" : "", "rounded-xl bg-transparent")} |
This pull request includes changes to improve code organization, enhance the UI for the contact page, and simplify structured data handling. The most important updates involve fixing import paths for shared constants, improving the contact form's design, and removing unnecessary
use clientdirectives from structured data components.Code Organization:
src/app/api/contact/route.ts[1]src/app/contact/metadata.ts[2]src/lib/meta/posts.ts[3]src/lib/utils/og-image.ts[4]src/scripts/test-structured-data.ts[5]Contact Page Enhancements:
cnutility function. (src/app/contact/page.tsx[1] [2] [3] [4]src/app/contact/page.tsxsrc/app/contact/page.tsxL150-R164)Structured Data Simplification:
use clientdirectives from structured data components to streamline the codebase. (src/components/about-structured-data.tsx[1]src/components/breadcrumb-structured-data.tsx[2]src/components/home-person-structured-data.tsx[3]src/components/projects-structured-data.tsx[4]src/components/website-structured-data.tsx[5]src/components/home-person-structured-data.tsxsrc/components/home-person-structured-data.tsxL98-R96)Funding File Update:
.github/FUNDING.ymlfile to reflect the new owner. (.github/FUNDING.yml.github/FUNDING.ymlL3-R3)