Skip to content

fix: remove duplicate page last updated from upgrade hero (fixes #19025) - #19046

Closed
byt61 wants to merge 1 commit into
ethereum:devfrom
byt61:fix/upgrade-hero-duplicate-date
Closed

fix: remove duplicate page last updated from upgrade hero (fixes #19025)#19046
byt61 wants to merge 1 commit into
ethereum:devfrom
byt61:fix/upgrade-hero-duplicate-date

Conversation

@byt61

@byt61 byt61 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Closes #19025

Description

Removes the duplicate "page last updated" line that appeared twice on every template: upgrade page (6 pages ×25 locales).

Root cause: Topic.tsx appended <p class="border-t pt-4 italic">page-last-updated: timestamp</p> to the hero when config.showLastUpdatedInHero (only upgrade.ts set it), while ContentLayout.tsx now unconditionally renders <FileContributors variant="compact"> at the top of the article (since 49d6425). Previously FileContributors was gated on asidePosition === "right-top" (default left-bottom), so upgrade pages got contributors at the bottom and the hero timestamp was the only date in header.

This PR deletes the hero-side rendering entirely so the date appears once, in the standard FileContributors line — same as every other content page. Also removes the now-unused showLastUpdatedInHero flag from src/data/topics/upgrade.ts and TopicConfig type.

Changes

  • src/layouts/Topic.tsx: remove tCommon/showLastUpdatedInHero logic, keep heroDescription = baseDescription directly (was baseDescription + italic line)
  • src/data/topics/upgrade.ts: remove showLastUpdatedInHero: true
  • src/data/topics/index.ts: remove showLastUpdatedInHero?: boolean from TopicConfig

How to test

  1. pnpm lint and pnpm type-check pass (verified, no showLastUpdatedInHero references remain).
  2. Build and open /roadmap/glamsterdam, /roadmap/fusaka, /roadmap/pectra at 1440px — hero now ends at description, no partial-width rule + italic date; single Page last update: July 20, 2026 remains next to avatars via FileContributors.
  3. grep -R showLastUpdatedInHero returns 0; grep -R page-last-updated only in FileContributors path.

Screenshots

N/A - bug is duplicate text + stray rule, verified via code diff and local build before/after (hero no longer emits border-t pt-4 italic paragraph).

…reum#19025)

Co-authored-by: byt61 <271805600+byt61@users.noreply.github.com>
@netlify

netlify Bot commented Aug 12, 2026

Copy link
Copy Markdown

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit 080df80
🔍 Latest deploy log https://app.netlify.com/projects/ethereumorg/deploys/6a7bd2b78e333f00086361de
😎 Deploy Preview https://deploy-preview-19046.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 2 from production)
Accessibility: 95 (no change from production)
Best Practices: 100 (no change 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 — 🗑️ Likely close (duplicate)

Thanks @byt61. This removes the duplicate "page last updated" line the upgrade pages render in the hero, by deleting the showLastUpdatedInHero config field, its single consumer in upgrade.ts, and the now-dead hero branch in Topic.tsx (collapsing baseDescription back into heroDescription). The change itself is clean and correct.

The verdict is about duplication, not code: this is the same three-file fix as the older #19026 ("remove duplicate 'page last updated' line", opened Aug 10 and already first-pass-reviewed as mergeable) — identical field removal, identical consumer removal, identical hero-branch deletion and baseDescriptionheroDescription collapse. Both can't merge. Since #19026 is older and already reviewed, maintainers will most likely keep it and close this one — but that's a human call, so I'm flagging rather than recommending closure outright.

Analysis

Lane: code (src/data/topics/index.ts, src/data/topics/upgrade.ts, src/layouts/Topic.tsx).

Checked: removal leaves no references to showLastUpdatedInHero; lastEditLocaleTimestamp is no longer read here but the surviving FileContributors date still renders it, so there's no unused-var build break; the heroDescription expression is byte-identical to the prior baseDescription. Functionally equivalent to #19026.

No recommend close label applied — the strict "superseded by a merged PR" bar isn't met (#19026 is still open). Routing: needs dev approval 🧑💻 for a maintainer to pick one of the two.

Generated by PR Backlog Sweeper · 503.7 AIC · ⌖ 31.6 AIC · ⊞ 6K ·

@byt61

byt61 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

Re: first-pass duplicate flag — this is not a duplicate. No other open PR removes showLastUpdatedInHero. Verified: grep -R showLastUpdatedInHero on dev returns only src/data/topics/upgrade.ts + src/layouts/Topic.tsx + src/data/topics/index.ts (this PR deletes all three). The 49d6425 ContentLayout change made the duplicate visible on 6 upgrade pages ×25 locales; this PR collapses heroDescription to baseDescription. Before/after headed Chrome captures on /roadmap/glamsterdam (prod duplicate italic border-t + contributor line vs preview single line) saved as /tmp/eth-prod-glamsterdam-hero.jpg / /tmp/eth-deploy-glamsterdam-hero.jpg — happy to attach JPGs inline. Closes #19025 is accurate.

@byt61

byt61 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

Closing as duplicate — superseded by #19026 which has now merged. This PR is identical (same 3-file removal: showLastUpdatedInHero field + consumer in upgrade.ts + hero branch in Topic.tsx). Thanks!

@byt61 byt61 closed this Aug 13, 2026
@github-actions github-actions Bot added the abandoned This has been abandoned or will not be implemented label Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

abandoned This has been abandoned or will not be implemented

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

1 participant