[r3.4] docs: enforce brand font consistency and fix installation page UX#20997
Conversation
yperbasis
left a comment
There was a problem hiding this comment.
- Footer still references Quantify — will silently fall back after this PR (bug)
docs/site/src/theme/Footer/index.tsx:47:
<span style={{fontFamily: "'Quantify', sans-serif", fontWeight: 700, ...}}>erigon.tech
With the @font-face removed and Quantify.woff2 deleted, this brand text will fall back to whatever the browser resolves sans-serif to — different from both Quantify and the navbar's
new Montserrat 800. The PR description says "No change to headings, body, or any other element", but the footer brand text will visibly change.
The PR reasoning explicitly calls out that "Quantify is the brand font on erigon.tech (logo wordmark only, two occurrences: header + footer)" — so the same fix that's being applied to
the navbar should be applied to the footer in the same PR. Otherwise the navbar and footer brand text will diverge.
- docs/site/DESIGN-SPEC.md is now stale
Four references contradict the new state:
- Line 119: "Font: Quantify, weight 700, letter-spacing 0.04em" (navbar title)
- Line 159: "Brand text: Quantify font, weight 700" (footer brand)
- Line 272: @import url('https://fonts.cdnfonts.com/css/quantify'); (already stale from #20991, but worth fixing here)
- Line 280: | Navbar title, footer brand | Quantify | 700 |
The doc was written as a brand spec, so leaving it describing a font that no longer ships is confusing for future contributors.
Addresses review feedback on #20997: - Footer/index.tsx: replace inline Quantify/700 with Montserrat/800 to match the navbar change; without this the footer brand text would silently fall back to sans-serif after the @font-face and .woff2 are removed - DESIGN-SPEC.md: update four stale Quantify references (navbar title, footer brand, CDN @import, font-roles table) to reflect Montserrat 800 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
There was a problem hiding this comment.
Pull request overview
Updates the docs site branding typography by removing the custom Quantify font usage and switching the navbar title (and footer brand text) to the already self-hosted Montserrat ExtraBold (800), aligning the docs UI with the stated brand guidelines.
Changes:
- Removed the
@font-facefor Quantify and updated.navbar__titletoMontserratweight800. - Updated the footer “erigon.tech” brand text to use
Montserratweight800. - Adjusted the design spec to reflect the new navbar/footer brand font choice (but see documentation note below).
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| docs/site/src/theme/Footer/index.tsx | Switch footer brand text font from Quantify to Montserrat 800. |
| docs/site/src/css/custom.css | Remove Quantify font-face and update navbar title typography to Montserrat 800. |
| docs/site/DESIGN-SPEC.md | Update spec to state Montserrat 800 for navbar title/footer brand. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…font-face Agent-Logs-Url: https://github.com/erigontech/erigon/sessions/80b1bb4b-9da9-4c6b-b0a3-18baed62cf6d Co-authored-by: bloxster <40316187+bloxster@users.noreply.github.com>
yperbasis
left a comment
There was a problem hiding this comment.
Hmm. We can keep Quantify because we have the licence now, right?
|
Yes, correct, we are licensed. |
…tion Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Closing because we can keep Quantify. |
|
@yperbasis the PR about fixing CSS with the right place for each font, please approve / merge. |
Typography (custom.css): - Negative letter-spacing on h1 (-0.015em) and h2 (-0.01em) — Montserrat ExtraBold reads tighter at display sizes - Treat h6 as a section label (uppercase, 0.85rem, muted) — gives real visual hierarchy below h1–h5 instead of yet-another-bold-heading - Heading line-height 1.2 (was Docusaurus default 1.25), font-smoothing + optimizeLegibility on <html> - Vertical rhythm: 2.5rem above .markdown h2, 1.75rem above h3 - scroll-margin-top on all .markdown headings = navbar + 1rem so anchor links land just below the sticky navbar Installation scroll fix (get-started/installation/index.mdx): The OS-method links no longer scroll to the wrong place on the first click. Two issues addressed: 1. Section anchor mapping — clicking an install method now scrolls to the parent section heading (`#linuxmacos`, `#windows`, `#all-operating-systems`) rather than the <details> element itself, and the URL hash is updated to match via history.replaceState. 2. Layout-stability sequencing — the previous code tried to scroll while close/open animations were still in flight, which caused non-deterministic landing positions (especially on second clicks that crossed sections, e.g. macOS→Windows). The new flow: close other open methods → open the requested one → poll document.body.scrollHeight via requestAnimationFrame until stable for 6 frames (~100ms) → smooth-scroll to the section heading. Also closes any other open install method first so only one is visible at a time. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@bloxster Please update the title and description then to match the end result. |
|
The This is fixed in #21074, which is currently green and awaiting review. Once #21074 merges into |
yperbasis
left a comment
There was a problem hiding this comment.
Overview
Three independent changes bundled into one PR:
- Brand font realignment — Quantify → Montserrat 800 for navbar + footer (
erigon.tech), and deletesQuantify.woff2since no text on the docs site uses it anymore. - Typography polish in
custom.css— letter-spacing on h1/h2, h6 as a small uppercase label, tighter heading line-height, font smoothing, vertical rhythm,scroll-margin-top. - Install-page scroll behavior rewrite — replaces the
toggle-event-listener-then-scroll flow with a "wait for stable layout, then resolve target section heading, then smooth-scroll" flow that also closes sibling<details>and updateslocation.hash.
Approving — direction is right, brand fix is correct, all four stale DESIGN-SPEC.md references caught after the prior round. A few suggestions below, none blocking.
What's good
- Self-hosted fonts only. Replaces two Google/CDN
@importlines with explicit@font-facedeclarations. Removes a cross-origin runtime dependency and a referrer leak. history.replaceStatenotpushStatefor the hash update — correct UX choice; clicking install-method tabs shouldn't pollute back-button history.- 6-frame stability + 90-frame cap in
waitForStableLayout— sensible defensive pattern: bounded worst case (~1.5s @ 60Hz) and avoids the previous race between toggle animation and smooth-scroll. scroll-margin-top: calc(var(--ifm-navbar-height) + 1rem)on all.markdownheadings — the right fix for in-page anchor offset under a sticky navbar.
Suggestions (non-blocking)
1. if (e) e.preventDefault() in the new go(id, e) is dead code
The go function signature gained an e parameter, but all call sites are unchanged and still look like:
<a href=\"#install-prebuilt\" onClick={e => { e.preventDefault(); go('install-prebuilt'); }}>go is invoked with a single argument, so e is always `undefined` inside go and the new guard never fires. Either drop the second param, or simplify call sites to onClick={e => go('install-prebuilt', e)} and rely on go to call preventDefault. Don't ship both forms.
2. summary.click() for opening/closing <details> is roundabout
const s = d.querySelector('summary');
if (s) s.click();
else d.open = false;Direct d.open = false / el.open = true produces the same visible result, fires the toggle event, and is one less thing to reason about. A synthetic click runs through any other listeners on <summary> and depends on the browser's default-action toggle behavior — indirect for no apparent gain.
3. h6 visual reassignment changes existing semantics
Repurposing h6 as a small uppercase muted label is a stylistic call, but any existing MDX page that uses ###### as a real sub-sub-heading will silently re-render as uppercase muted text. Worth either grepping the docs to confirm no collateral damage, or documenting the new h6 role explicitly in DESIGN-SPEC.md (the spec currently lists h1–h6 as one row at Montserrat 800).
4. Typography polish not reflected in DESIGN-SPEC.md
The PR fixes the spec for the Quantify→Montserrat changes but adds new rules the spec doesn't describe:
-0.015em/-0.01emletter-spacing on h1/h2--ifm-heading-line-height: 1.2- h6 as small uppercase label
- vertical rhythm above
.markdown h2/h3 scroll-margin-topon markdown headingstext-rendering: optimizeLegibility+ font-smoothing on<html>
If DESIGN-SPEC.md is the brand source-of-truth, a "Typography rhythm" subsection that mirrors what landed in custom.css would keep it complete.
5. text-rendering: optimizeLegibility on <html> — minor perf caveat
Forces ligatures + kerning across the entire document. There's a long-standing known cost on very text-heavy pages and on older Android browsers where it triggers a slower text path. Consider scoping to headings (h1,h2,h3,h4,h5,h6 { text-rendering: optimizeLegibility; }) where the visual gain is real, rather than globally on <html>.
6. resolveTarget mapping is fragile
sectionForMethod is hardcoded against three Docusaurus-generated section ids (linuxmacos, windows, all-operating-systems). If the docs author later renames ### Linux/macOS to ### Linux / macOS, the slug changes (linux--macos or similar), the mapping breaks silently, and we fall through to the previous-sibling walk — at which point we're scrolling to whatever heading happens to precede the details element. Two ways to harden:
- Add a runtime warning when
sectionForMethod[id]resolves to a non-existent element. - Better, walk up the DOM from the
<details>until the first heading is found, removing the hardcoded mapping entirely.
Fine for now since it'll be discovered visually, but worth acknowledging as a coupling between content and JS.
7. Add font-display: swap to the new @font-face blocks
The previous Quantify rule had font-display: swap explicitly; the four new @font-face declarations omit it and rely on the browser default (auto). Adding swap keeps FOUT behavior consistent and explicit.
8. Scope
Original change was the Quantify→Montserrat brand fix; typography polish and install-page rewrite rode along. Each is independently reviewable. Bundling means a regression in one area shares a single git revert with the others. Not blocking, but worth a thought for future PRs in this area.
9. CI
docs-site / build is red; the author flagged it as a pre-existing SidebarsConfig TS error fixed by another PR. The actual fix appears to be #21083 (docs: fix SidebarsConfig TypeScript import for Docusaurus 3.10 compatibility), not #21074 (which is the llms.txt regen). Worth confirming the merge order with that PR.
## Summary Brings the full `docs/site/` Docusaurus tree into `main`, incorporating all documentation improvements developed against `release/3.4`. **Scope:** `docs/site/**` + root `llms.txt` / `llms-full.txt` + removal of superseded `docs/gitbook/` and `docs/gitbook-help/`. No changes to Go, proto, or any non-docs source files. ### Included — merged to release/3.4 | PR | What | |----|------| | [erigontech#20883](erigontech#20883) | Docusaurus v3 migration — full `docs/site/` tree, Docusaurus config, versioned v3.3 snapshot | | [erigontech#20263](erigontech#20263) / [erigontech#20264](erigontech#20264) | All v3.3 docs ported; branch/versioning convention established | | [erigontech#20978](erigontech#20978) | Mobile footer fix, SEO meta tags, OG image | | [erigontech#20991](erigontech#20991) | Self-host brand fonts (remove Google Fonts / CDN) | | [erigontech#21000](erigontech#21000) | `llms.txt` / `llms-full.txt` generator script + root artifacts | | [erigontech#21018](erigontech#21018) | May 2026 w19 maintenance — stale flags, broken links, accuracy fixes | | [erigontech#21045](erigontech#21045) | CI: docs-only path filter (skip Go jobs, run docs-site build) | | [erigontech#21063](erigontech#21063) | `trace` response fields reference + sync-monitoring guidance | | [erigontech#21074](erigontech#21074) | Regenerate `llms.txt` after sync-modes update | | [erigontech#20997](erigontech#20997) | Brand font consistency fix, installation page UX | ### Included — pending review on release/3.4 | PR | What | |----|------| | [erigontech#21030](erigontech#21030) | Automated disk size pipeline: `update-disk-sizes.py`, `disk-sizes.json`, `hardware-requirements.mdx` JSX fix, `generate-llms.py` `—` fallback, unit tests | | [erigontech#21129](erigontech#21129) | May 2026 w20 maintenance — `--caplin.nat`, `--caplin.columns-keep-slots`, RPC subscription defaults, `nat.md` Caplin section, log.dir.verbosity default | ### What changes on `main` - `docs/site/` added (full Docusaurus tree, current v3.4 + frozen v3.3 snapshot) - `docs/gitbook/` and `docs/gitbook-help/` removed (superseded by Docusaurus) - Root `llms.txt` and `llms-full.txt` updated to Docusaurus-generated versions >⚠️ This PR does **not** remove `docs/gitbook/` yet — that cleanup will be a separate commit once this PR is reviewed and approved. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Bloxster <bloxster@proton.me> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: lupin012 <58134934+lupin012@users.noreply.github.com>
Summary
Originally a typography fix for the brand font; expanded into broader design tuning on the same scope.
1. Quantify → Montserrat 800 (the original fix)
@font-facedeclaration for Quantify fromcustom.cssdocs/site/static/fonts/Quantify.woff2(non-commercial license, wrong usage scope).navbar__titleand footer brand to use Montserrat weight 800 (already self-hosted) instead of Quantify weight 700Reason: Quantify is the brand font on erigon.tech for the logo wordmark only (header + footer wordmark). Per brand guidelines, everything else must use Montserrat / Nunito Sans.
2. Typography polish (
custom.css)Refinements that target Montserrat ExtraBold at display sizes — no new fonts, no size changes:
h1(-0.015em) andh2(-0.01em)h6treated as a section label (uppercase, 0.85rem, muted) — gives real visual hierarchy--ifm-heading-line-height: 1.2(was Docusaurus default 1.25)text-rendering: optimizeLegibilityon<html>.markdown h2/h3scroll-margin-topon all.markdownheadings so in-page anchor links land just below the sticky navbar3. Installation page scroll behavior fix (
get-started/installation/index.mdx)Restores and improves the smooth scroll + auto-open behavior on the install-method tabs:
#linuxmacos,#windows,#all-operating-systems) — not the<details>element — and updates the URL hash.document.body.scrollHeightperrequestAnimationFrameuntil stable for 6 frames (~100ms), then scrolls — so the smooth-scroll target is always at its final position.Visual change
Test plan
pnpm run start— local dev, all scroll/open paths verified across Brave, Chromium, Firefox, LibreWolfcd docs/site && pnpm run build— clean build/fundamentals/logs,/interacting-with-erigon/trace)🤖 Generated with Claude Code