Repository navigation
feat: scroll-aware nav, sliding active indicator, real GitHub + docs URLs - #9
Conversation
Polish the fixed navbar (issue #8) and land the real GitHub + docs URLs (issue #7, partial). - Chrome.tsx: add scroll-aware frosted backdrop (tone-matched to the current section, with @supports fallback for Safari < 17), switch nav labels to the §0X vocabulary used in SectionHeader, and replace the opacity-only active affordance with a whisper-green number + scaleX underline that glides in from the left. Add dashed focus-visible outline matching the .terminal / .fleet border vocabulary. Preserve the IntersectionObserver tone-flip workaround for Safari's mix-blend-mode-on-fixed bug. Retire the "Paper" / "Whitepaper" sm: label swap — now always "Whitepaper". - lib/links.ts: swap github → https://github.com/decdn, docs → https://docs.decdn.org/overview/introduction. site, whitepaper, and runNode still point at decdn.example; robots stays index:false until those land. - Hero.tsx, Close.tsx, Chrome.tsx: add target="_blank" rel="noopener noreferrer" to every whitepaper CTA. PDFs only — github / runNode / docs navigate in place. Refs #7, #8. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
- Drop the §0X number prefix on nav items — the sliding whisper-green underline is a strong enough active affordance on its own, backed by a small label-opacity ramp (0.65 → 0.9 on hover → 1.0 active) so there's still a tonal cue alongside the underline. - Push the scrolled backdrop from 72% → 92% tone-match so content stops bleeding through, and collapse the @supports-not fallback to a fully opaque bar on browsers without backdrop-filter. - Replace the 1px dashed bottom rule with a 1px solid line — reads as a proper navbar edge instead of a decorative panel border. - Raise vertical padding (py-3 → py-5) so the frosted bar has more physical presence now that the backdrop is solid. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request implements a scroll-responsive navigation bar with frosted glass effects, active section indicators, and updated link behaviors. It also updates several placeholder URLs and ensures external links open securely in new tabs. Feedback was provided to ensure the focus-visible outline is applied consistently to the Whitepaper CTA and to allow background color transitions even when reduced motion is preferred, aligning with the design specifications.
Two regressions against PR #9's own test plan, both caught by the gemini-code-assist review: - The dashed :focus-visible outline was scoped to .nav-item, missing the Whitepaper CTA (.meta class) and the logo lockup. Broaden to .chrome-nav a so every focusable chrome anchor gets the ring. - The reduced-motion rule blanket-killed every transition on .chrome-nav, which also snuffed the backdrop color fade the test plan explicitly says should still animate. prefers-reduced-motion targets vestibular motion (translate/scale/rotate), not color or opacity fades. Scope the rule to suppress only the underline's scaleX transform; keep its background-color transition so the ink → whisper-green swap still fades. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Deploying website with
|
| Latest commit: |
c814e4d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://8ac11243.website-70y.pages.dev |
| Branch Preview URL: | https://feat-chrome-nav-polish-and-r.website-70y.pages.dev |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request implements a redesigned navigation bar with scroll-triggered styling, tone-matched backdrops, and updated link behaviors. It also updates several external links and adds security attributes to external anchors. A review comment notes that the navigation items are missing the section numbers mentioned in the design description.
| aria-current={isActive ? "true" : undefined} | ||
| className="nav-item" | ||
| > | ||
| <span className="nav-label">{item.label}</span> |
There was a problem hiding this comment.
The pull request description mentions that the active section should display a 'whisper-green §0X number', but the current implementation only renders the label text. To align with the intended design, you should include the section index (e.g., derived from item.id) and apply the whisper-green color when the item is active. Currently, only the underline color is updated to whisper-green via CSS.
There was a problem hiding this comment.
Stale premise — the §0X prefix was intentionally removed in commit 16385bf during PR iteration ("drop §0X numbers, solidify backdrop, taller bar"). The shipped active affordance is the label text + a whisper-green underline that scales in from the left, which matches the PR body's "active-link affordance" section. Not acting on the suggestion.
There was a problem hiding this comment.
Pull request overview
Updates the landing page navbar to be scroll-aware with improved active/focus affordances, and swaps in real external URLs for GitHub + docs while standardizing “open PDF in new tab” behavior.
Changes:
- Add scroll threshold state to the fixed navbar and drive a frosted/opaque backdrop via
data-scrolled+data-tone. - Replace opacity-only active state with underline + hover preview + focus-visible styling (implemented via new global CSS classes).
- Update
links.githubandlinks.docs, and ensure all Whitepaper (PDF) CTAs usetarget="_blank" rel="noopener noreferrer".
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/links.ts | Updates GitHub/docs URLs and narrows the launch TODO note. |
| components/site/Hero.tsx | Opens Whitepaper PDF in a new tab with noopener/noreferrer. |
| components/site/Close.tsx | Opens Whitepaper PDF in a new tab with noopener/noreferrer. |
| components/site/Chrome.tsx | Adds scroll-aware navbar behavior and new nav item markup for underline affordance. |
| app/globals.css | Adds .chrome-nav and .nav-* styles for backdrop, active underline, and focus ring. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- lib/links.ts: swap contact → mailto:[email protected]. Leaves site, whitepaper, and runNode as the only remaining placeholders gating the robots flip (matching the TODO). - app/globals.css: rewrite the chrome-nav block comment. The §0X number prefix was removed in 16385bf but the doc comment still described it; now it accurately describes the shipped underline + opacity affordance. Addresses the Copilot review notes. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Applies the gemini-code-assist suggestion from PR #9 discussion r3125779645. Under prefers-reduced-motion: reduce, only the .chrome-nav backdrop background-color transition survives — matching the "backdrop color still fades" line in the PR test plan. All other transitions on the nav (backdrop-filter, border, text color tone flip, label opacity, underline color + scale) snap between states. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Closes the design loop on the fixed navbar and lands the first two real external URLs.
Summary
@supports not (backdrop-filter)collapses to a fully opaque bar so text stays legible on older Safari. The existing IntersectionObserver +data-toneflip that works around Safari'smix-blend-mode: difference-on-fixedbug is preserved verbatim. Bar height raised (py-3 → py-5) so the bar has real physical presence when frosted.transform: scaleX(). Hover shows a short preview (~40% width); active fills the label. A quiet opacity ramp (0.65 → 0.9 hover → 1.0 active) gives a second tonal cue.aria-current="true"is the single source of truth for the state.:focus-visiblepaints a 1px dashed outline offset by 4px — matches the.terminal/.fleetborder vocabulary.<md. The mobile drawer is intentionally deferred to a follow-up issue.github→https://github.com/decdn;docs→https://docs.decdn.org/overview/introduction.site,whitepaper, andrunNodestill point atdecdn.example, sorobots: { index: false }stays inapp/layout.tsx— the TODO comment inlib/links.tsnow tracks only the three remaining swaps.target="_blank" rel="noopener noreferrer"added to everylinks.whitepaper<a>(Hero, Close, Chrome). GitHub, docs, and run-a-node navigate in place to preserve the one-pager's scroll state.Test plan
pnpm dev— scroll from §01 through §05: nav starts transparent, backdrop fades in after the hero, tone flips correctly on §02 and §04 (ink sections).Tabthrough the nav — dashed focus ring appears on each item and on the Whitepaper CTA.mix-blend-modebug does not regress); backdrop blur renders, or falls back to a fully opaque bar.prefers-reduced-motion: reduce— underline snaps between states; backdrop color still fades.source(GitHub) andrun a nodestay in the same tab; GitHub resolves tohttps://github.com/decdn.pnpm build— static export succeeds;out/index.htmlstill contains<meta name="robots" content="noindex, follow">(full flip deferred until the three remaining URLs land).Refs #7, #8.
🤖 Generated with Claude Code