Skip to content

fix(upgrade): remove duplicate "page last updated" line from the hero - #19026

Merged
wackerow merged 1 commit into
devfrom
fix/upgrade-hero-duplicate-last-updated
Aug 12, 2026
Merged

fix(upgrade): remove duplicate "page last updated" line from the hero#19026
wackerow merged 1 commit into
devfrom
fix/upgrade-hero-duplicate-last-updated

Conversation

@konopkja

Copy link
Copy Markdown
Contributor

Description

Fixes #19025.

On every template: upgrade page the last-edit date renders twice in the header region: once in the hero, preceded by a partial-width border-t rule that stops mid-page, and again about 150px below in FileContributors. The two lines even use different translation keys for the same string (common:page-last-updated in the hero, page-last-update in FileContributors).

On https://ethereum.org/roadmap/glamsterdam/ that reads, top to bottom: h1 → description → stray 768px rule → "Page last updated: July 20, 2026" → hero's full-width bottom border → "Page last update: July 20, 2026" → contributor avatars.

Why it started

The collision is a regression from 49d6425 (migrate/refactor(ui): ContentLayout, TableOfContents), which made the compact FileContributors unconditional at the top of the article. It was previously gated on asidePosition === "right-top", and the default left-bottom placed contributors at the bottom of the page — so the hero timestamp used to be the only date in the header.

The hero rule itself is older, carried verbatim from src/layouts/md/Upgrade.tsx into the showLastUpdatedInHero flag in cba15c3. In the old design the hero held a bulleted summaryPoints list, so the rule read as a footer under a block of bullets. Pages with a one-line description (Glamsterdam, Dencun) leave it floating under a single sentence.

Approach

Drop showLastUpdatedInHero rather than suppressing the lower line, so upgrade pages surface freshness the same way every other content page on the site does. The flag had exactly one consumer, so the config field and the now-dead branch in TopicLayout go with it.

The baseDescriptionheroDescription rename is just the collapse of the two-step derivation back into one; the expression is byte-identical.

Affected pages

All template: upgrade pages, in every locale: /roadmap/beacon-chain/, /roadmap/dencun/, /roadmap/fusaka/, /roadmap/glamsterdam/, /roadmap/merge/, /roadmap/pectra/.

Testing

Driven locally with a headless browser against next dev:

  • /roadmap/glamsterdam/ — hero description block now contains only the description <p>; .border-t.pt-4.italic count is 0 (was 1)
  • /roadmap/beacon-chain/summaryPoints still render as the <ul> in the hero, no stray rule
  • /staking/ and /roadmap/ — non-upgrade topics unchanged, no stray rule, no console errors

One thing I could not verify locally: that the remaining FileContributors date still renders. next dev leaves lastEditLocaleTimestamp empty (no git-history lookup), so neither date appears locally. It is already rendering on production today and this PR touches nothing in that path — but worth a glance on the deploy preview.

tsc --noEmit, eslint and prettier --check all clean on the changed files.

🤖 Generated with Claude Code

On every `template: upgrade` page the last-edit date rendered twice in
the header region: once in the hero (with a partial-width `border-t`
rule above it) and again ~150px below in `FileContributors`. The two
lines even used different translation keys for the same string
(`common:page-last-updated` vs `page-last-update`).

The collision is a regression from 49d6425, which made the compact
`FileContributors` unconditional at the top of the article. It was
previously gated on `asidePosition === "right-top"`, and the default
`left-bottom` put contributors at the bottom of the page — so the hero
timestamp used to be the only date in the header.

Drops `showLastUpdatedInHero` rather than suppressing the lower line, so
upgrade pages surface freshness the same way every other content page
does. The flag had a single consumer, so the config field and the dead
branch in `TopicLayout` go with it.

Fixes #19025

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@netlify

netlify Bot commented Aug 10, 2026

Copy link
Copy Markdown

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit 8fcae35
🔍 Latest deploy log https://app.netlify.com/projects/ethereumorg/deploys/6a79edc9784ee1000817af8a
😎 Deploy Preview https://deploy-preview-19026.ethereum.it
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 60 (🟢 up 3 from production)
Accessibility: 95 (no change from production)
Best Practices: 100 (🟢 up 1 from production)
SEO: 98 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

Copy link
Copy Markdown
Contributor

🔎 First-pass review — ✅ Looks mergeable

Removes the duplicate "page last updated" line that upgrade pages rendered in the hero (a regression from the ContentLayout refactor that made the lower FileContributors date unconditional). Clean deletion: the showLastUpdatedInHero config field, its single consumer in upgrade.ts, and the now-dead hero branch all go together, with baseDescription collapsed back into heroDescription. Grep confirms zero lingering references to the removed flag/binding, and lastEditLocaleTimestamp is still forwarded to ContentLayout (line 111) so there is no unused-var build break. Lint, type-check & markdown and Unit tests are already green.

Analysis
  • Lane: code (src/layouts/Topic.tsx, src/data/topics/*)
  • Checked: no unused variable/param after the flag removal (lastEditLocaleTimestamp still consumed by ContentLayout); no other consumers of showLastUpdatedInHero or baseDescription; the heroDescription rename is byte-identical to the prior baseDescription expression; base branch is dev (correct).
  • CI: Lint, type-check & markdown ✅, Unit tests ✅. Chromatic + Netlify deploy still running at review time.
  • Non-blocking: the common:page-last-updated key now appears orphaned (the surviving line uses page-last-update in FileContributors); harmless to leave, the intl pipeline owns cleanup. As the author notes, next dev doesnt populate lastEditLocaleTimestamp, so confirm the remaining FileContributors date still renders on the deploy preview.

Generated by PR Reviewer (team) for #19026 · 70.5 AIC · ⌖ 10.3 AIC · ⊞ 5.2K ·

@wackerow
wackerow merged commit 799a921 into dev Aug 12, 2026
22 checks passed
@wackerow
wackerow deleted the fix/upgrade-hero-duplicate-last-updated branch August 12, 2026 18:40
@claude claude Bot mentioned this pull request Aug 13, 2026
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.

Duplicate "page last updated" date + stray rule in the hero on all upgrade pages

2 participants