[Website] Fix minor issues#9878
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR applies a set of small website (Next.js) UX/performance tweaks and minor refactors: stabilizing local start behavior, improving nav/link loading characteristics, enhancing image/analytics loading, and modernizing the support contact flow.
Changes:
- Refactors the header navigation into dedicated components/data and disables Next.js link prefetch in multiple UI components.
- Improves perceived performance via LCP image preloading, smoother hash-navigation behavior (opt-in after first paint), and defers GTM to
lazyOnloadwith preconnect hints. - Updates the support contact page to use a client-side form submission endpoint and adds GitHub star count fetching/caching for the header.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| website-next/start-optimized.sh | Ensures the script runs from the package root for consistent Yarn/Docker context resolution. |
| website-next/src/image-optimization/generate.mjs | Improves orphan cleanup by also pruning remote original downloads. |
| website-next/src/helpers/githubStars.ts | Adds GitHub repo stargazer count fetching with hourly revalidation. |
| website-next/src/design-system/Tag.tsx | Disables link prefetch to reduce background navigation work. |
| website-next/src/design-system/Sidebar.tsx | Disables link prefetch for sidebar links. |
| website-next/src/design-system/Picture.tsx | Adds ReactDOM.preload for priority AVIF LCP candidates. |
| website-next/src/design-system/Pagination.tsx | Disables link prefetch for pagination links. |
| website-next/src/components/header/navData.tsx | Extracts header nav config/constants into a shared module. |
| website-next/src/components/header/HeaderNav.tsx | Introduces a client header nav component with submenu behavior. |
| website-next/src/components/Header.tsx | Refactors header to use new nav, renders blog image server-side, and displays GitHub star count. |
| website-next/src/components/EnableSmoothScroll.tsx | Adds a client helper to enable smooth scrolling after first paint. |
| website-next/src/components/AnalyticsScripts.tsx | Defers GTM from afterInteractive to lazyOnload and updates rationale. |
| website-next/package.json | Updates ci-local to run the optimized start script. |
| website-next/app/layout.tsx | Adds preconnect/dns-prefetch hints and mounts smooth-scroll enabler. |
| website-next/app/globals.css | Makes smooth scrolling conditional on a runtime flag. |
| website-next/app/(content)/services/support/contact/page.tsx | Moves the contact form UI into a dedicated client component. |
| website-next/app/(content)/services/support/contact/ContactForm.tsx | Implements client-side validation + POST submission to support form API. |
| .github/workflows/publish-website-next.yml | Broadens Next.js cache restore keys to improve cache hit rates. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| message: string; | ||
| } | ||
|
|
||
| type FormErrors = Partial<Record<"name" | "email" | "company", string>>; |
Comment on lines
+55
to
+68
| function validate(): boolean { | ||
| const next: FormErrors = {}; | ||
| if (data.name.trim().length < 2) { | ||
| next.name = "Name is required"; | ||
| } | ||
| if (!EMAIL_REGEX.test(data.email)) { | ||
| next.email = "Please enter a valid email address"; | ||
| } | ||
| if (data.company.trim().length < 2) { | ||
| next.company = "Company is required"; | ||
| } | ||
| setErrors(next); | ||
| return Object.keys(next).length === 0; | ||
| } |
Comment on lines
+162
to
+175
| <div className="flex flex-col gap-1"> | ||
| <label htmlFor="message" className="text-sm font-medium text-cc-ink"> | ||
| Message | ||
| </label> | ||
| <textarea | ||
| id="message" | ||
| name="message" | ||
| rows={5} | ||
| value={data.message} | ||
| disabled={isSubmitting} | ||
| onChange={(e) => update("message", e.target.value)} | ||
| className={`${inputClasses} border-cc-card-border focus:border-fuchsia-500`} | ||
| /> | ||
| </div> |
Comment on lines
+12
to
+17
| useEffect(() => { | ||
| const id = requestAnimationFrame(() => { | ||
| document.documentElement.dataset.smoothScroll = "true"; | ||
| }); | ||
| return () => cancelAnimationFrame(id); | ||
| }, []); |
Comment on lines
+1
to
+3
| const GITHUB_REPO_API = | ||
| "https://api.github.com/repos/ChilliCream/graphql-platform"; | ||
|
|
This was referenced Jun 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.