Skip to content

Remove the previous/next article component - #3356

Merged
enf0rc3 merged 2 commits into
mainfrom
wl/remove-article-journey
Aug 13, 2026
Merged

Remove the previous/next article component#3356
enf0rc3 merged 2 commits into
mainfrom
wl/remove-article-journey

Conversation

@enf0rc3

@enf0rc3 enf0rc3 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Removes the article journey nav (the "Previous article" / "Next article" buttons at the foot of every page).

Preview

A page that used to carry the buttons: Create a release

What it did

It flattened the nav tree to its leaves in menu order and linked the reader to the entries either side of the current page. That order is an artefact of how the nav tree sorts, so the "next article" was frequently unrelated to what the reader was doing. The sidebar nav and the Related section already cover moving between pages.

What goes with it

Removed Why
src/components/ArticleJourney.astro The component
Import + render in src/layouts/Default.astro Its only usage
journeyOrder() in src/lib/navigationTree.ts Nothing else flattened the tree
.article-journey* in src/styles/main.css ~100 lines, no other consumers
<script type="speculationrules"> Prerendered the prev/next pages specifically
<div style="position: fixed;"> Chromium workaround for position: sticky; bottom: 0, which this site has none of

On that last one: .site-nav and .side-nav are the only sticky elements here, both anchor to a top offset, and both switch to position: static under 1130px.

Verification

Local pnpm build — 2674 pages, exit 0. The preview page above returns 200, with no article-journey, speculationrules, or position: fixed in the served HTML.

🤖 Generated with Claude Code

The article journey nav sat at the foot of every page, pushing readers
along the flattened menu order. That order is an artefact of how the nav
tree happens to sort, so the "next article" was often unrelated to what
the reader was doing. The sidebar and Related section already cover
moving between pages.

Removing it takes journeyOrder() with it, since nothing else flattened
the tree, and the speculation rules that prerendered the two neighbour
pages.

The position:fixed Chromium sticky workaround lived in the same
component but is unrelated to it - both nav columns are position:sticky -
so it moves to the layout.

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

Copy link
Copy Markdown

Pull request environment is available at https://stoctodocspr3356.z22.web.core.windows.net.

You can view the ephemeral environment status in Octopus Deploy.

This environment will be automatically deprovisioned when the pull request is closed, or after 7 days of inactivity.

The linked bug is specific to position: sticky with bottom: 0, where the
element lands a toolbar's height above the viewport floor once the mobile
browser chrome hides. Nothing here is bottom-anchored: .site-nav and
.side-nav both stick to a top offset.

Both also drop to position: static under 1130px, so at the widths where
the bug appears the page has no sticky element at all.

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

@borland borland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code LGTM and I'm happy to remove it, but if you haven't already, check with Ellen on the design before we merge this

@enf0rc3

enf0rc3 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

@borland Thanks, she has approved:

image

@enf0rc3
enf0rc3 merged commit e818d88 into main Aug 13, 2026
7 checks passed
@enf0rc3
enf0rc3 deleted the wl/remove-article-journey branch August 13, 2026 23:13
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.

3 participants