Page MenuHomePhabricator

[Minerva TOC] Implement sticky header + TOC position
Closed, ResolvedPublic3 Estimated Story Points

Description

User story

As a mobile user, I want easy access to the TOC through a sticky header

Requirements

Implement a sticky header that includes:

  • an optional (only for those that have a TOC) toggle to turn a TOC overlay on/off
  • a heading that truncates at 2 lines
  • an optional subheading (wikidata description)
  • an optional edit button

This ticket is about both the sticky header implementation & TOC container design & placement; it is not about implementing logic the figure out when to update heading data on scroll.

Design

https://phabricator.wikimedia.org/T410325#11413314

Acceptance criteria

  • This is no button on pages that have no TOC
  • There is a sticky header of the page that matches design
  • There is a TOC overlay that matches design
  • The TOC button toggles the TOC overlay (open/close)
  • Headings longer than 2 lines are truncated
  • The "subtitle" (short description) may or may not be present
  • The edit link may not be present
  • Clicking the edit link takes you to edit the (correct section in) the article
  • The sticky header has a consistent height
  • Nice to have: both button and TOC state accurately reflect url hash (#toc) and update as it changes

Event Timeline

egardner moved this task from Incoming/Inbox to Needs Refinement on the Reader Growth Team board.
egardner set the point value for this task to 3.Jan 14 2026, 5:28 PM
egardner moved this task from Needs Refinement to Ready on the Reader Growth Team board.

Change #1235342 had a related patch set uploaded (by LWatson; author: LWatson):

[mediawiki/extensions/ReaderExperiments@master] Minerva TOC sticky: initial sticky header styles

https://gerrit.wikimedia.org/r/1235342

Remaining tasks: truncation and design alignment for the sticky header/TOC. If @bvibber or anyone wants to jump in, feel free to create a follow-up patch. Otherwise, I'll resume work on these next week. I'm out of the office for the rest of today!

lwatson changed the task status from Open to In Progress.Jan 30 2026, 2:29 PM
lwatson added a parent task: T415948: [EPIC] Minerva TOC.

@JScherer-WMF - a few design questions/unknowns:

  • How does the sticky header TOC appear on wider screens?
  • Can you provide a rough mockup or explain the intended behavior for the truncated header? (I'm currently shrinking the header text when it suspects the text is wrapping. This way it shows as much of the header text as possible and then truncates at 2 lines.)

Change #1237287 had a related patch set uploaded (by LWatson; author: LWatson):

[mediawiki/extensions/ReaderExperiments@master] Minerva TOC: use Codex Menu to display table of contents

https://gerrit.wikimedia.org/r/1237287

Change #1237287 abandoned by LWatson:

[mediawiki/extensions/ReaderExperiments@master] Minerva TOC: use Codex Menu to display table of contents

Reason:

Decided to abandon this approach using CdxMenu

https://gerrit.wikimedia.org/r/1237287

Change #1238340 had a related patch set uploaded (by Matthias Mullie; author: Matthias Mullie):

[mediawiki/extensions/ReaderExperiments@master] Dynamically update title size between xx-large & small

https://gerrit.wikimedia.org/r/1238340

Change #1238342 had a related patch set uploaded (by Matthias Mullie; author: Matthias Mullie):

[mediawiki/extensions/ReaderExperiments@master] Fix body-overflow workaround

https://gerrit.wikimedia.org/r/1238342

Change #1235342 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@master] Minerva TOC: sticky header styles

https://gerrit.wikimedia.org/r/1235342

Change #1238340 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@master] Dynamically update title size between xx-large & small

https://gerrit.wikimedia.org/r/1238340

Change #1238342 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@master] Fix body-overflow workaround

https://gerrit.wikimedia.org/r/1238342