Skip to content

feat: scroll-aware nav, sliding active indicator, real GitHub + docs URLs - #9

Merged
yigitdot merged 5 commits into
mainfrom
feat/chrome-nav-polish-and-real-links
Apr 23, 2026
Merged

yigitdot merged 5 commits into
mainfrom
feat/chrome-nav-polish-and-real-links

Conversation

@yigitdot

@yigitdot yigitdot commented Apr 22, 2026 •

Copy link
Copy Markdown
Collaborator

Closes the design loop on the fixed navbar and lands the first two real external URLs.

Summary

  • Chrome.tsx — scroll-aware nav (Improve the navbar / Chrome #8). Transparent over the hero; once scroll crosses the threshold a tone-matched frosted backdrop at 92% opacity fades in under a 1px solid bottom line. @supports not (backdrop-filter) collapses to a fully opaque bar so text stays legible on older Safari. The existing IntersectionObserver + data-tone flip that works around Safari's mix-blend-mode: difference-on-fixed bug is preserved verbatim. Bar height raised (py-3 → py-5) so the bar has real physical presence when frosted.
  • Chrome.tsx — active-link affordance (Improve the navbar / Chrome #8). Replaced the opacity-only treatment with a 1px whisper-green underline that scales in from the left via 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.
  • Chrome.tsx — focus affordance (Improve the navbar / Chrome #8). :focus-visible paints a 1px dashed outline offset by 4px — matches the .terminal / .fleet border vocabulary.
  • Chrome.tsx — retired sm:Paper/md:Whitepaper swap (Improve the navbar / Chrome #8). The CTA now always reads "Whitepaper →"; it's the single visible interactive element at <md. The mobile drawer is intentionally deferred to a follow-up issue.
  • lib/links.ts (Fix placeholder links across the site #7, partial). github → https://github.com/decdn; docs → https://docs.decdn.org/overview/introduction. site, whitepaper, and runNode still point at decdn.example, so robots: { index: false } stays in app/layout.tsx — the TODO comment in lib/links.ts now tracks only the three remaining swaps.
  • New-tab policy: PDFs only. target="_blank" rel="noopener noreferrer" added to every links.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).
  • Hover each nav item — short whisper-green underline preview; active item shows the full underline plus a brighter label.
  • Tab through the nav — dashed focus ring appears on each item and on the Whitepaper CTA.
  • Open in Safari 17+ / iOS — nav text stays visible on §02 and §04 (the original mix-blend-mode bug does not regress); backdrop blur renders, or falls back to a fully opaque bar.
  • Narrow to 375px and 320px — nav list hidden, logo + "Whitepaper →" fit on one line, no "Paper" abbreviation anywhere.
  • Enable prefers-reduced-motion: reduce — underline snaps between states; backdrop color still fades.
  • Click every CTA: Whitepaper links (Hero / Close / nav) open in a new tab; source (GitHub) and run a node stay in the same tab; GitHub resolves to https://github.com/decdn.
  • pnpm build — static export succeeds; out/index.html still contains <meta name="robots" content="noindex, follow"> (full flip deferred until the three remaining URLs land).

Refs #7, #8.

🤖 Generated with Claude Code

yigitdot and others added 2 commits April 22, 2026 20:14
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]>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment thread app/globals.css Resolved
Comment thread app/globals.css Resolved
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]>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Apr 22, 2026 •

Copy link
Copy Markdown

@yigitdot
yigitdot requested a review from Copilot April 22, 2026 18:07
@yigitdot

Copy link
Copy Markdown
Collaborator Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.github and links.docs, and ensure all Whitepaper (PDF) CTAs use target="_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.

Comment thread lib/links.ts Resolved
Comment thread app/globals.css Resolved
yigitdot and others added 2 commits April 23, 2026 16:03
- 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]>
@yigitdot
yigitdot merged commit 68fb607 into main Apr 23, 2026
1 check passed
@yigitdot
yigitdot deleted the feat/chrome-nav-polish-and-real-links branch April 23, 2026 13:19
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