BeatlesAnswers.org Under construction

Restyling 137 song pages without changing a word of their facts

By · Build log; logged

On 28 November the two fact sections of every song page took a new look. The dated log, now headed Timeline, runs down a rail, with chips for the work done, the room and each person credited; every Studio Notes point carries an icon for its category. Apart from the section’s new name, not a word on the 137 song pages changed. This post is about how we chose the look and why a script draws it in the reader’s browser instead of writing it into the pages.

A survey before any design

Before drawing anything, the lab page Timeline formats listed every timeline form the site has carried: the list on the song pages, the Sessions calendar and its study, Making of Revolver, song lifespans, gear lifelines, the evolution chart, On This Day, the Timeline list and Recording week in the design kit, and the retired Recording section. Only then did we build new looks, and we built them from real points rather than placeholder text: Act Naturally (2 dated points, 8 notes), Hey Jude (9 and 26) and Doctor Robert (5 and 12), so each option had to cope with a short page, a long one and one in between.

The page compared five Timeline looks (a rail, session cards, a session sheet, a day strip over a rail, and icons only) and three for Studio Notes (category groups on the rail, note cards, and a headline index). We chose the rail for the Timeline and the category groups for Studio Notes, the latter without the rail or the category word: the icon names the category, and a screen reader hears it as the icon’s label.

Why the pages were not edited

The obvious way to ship a new look is to write the new markup into each page. Here that would have touched the most depended-on text on the site. About twenty checkers read the Timeline heads and the notes as they are written, as do the Sessions calendar, the Places pages, the Equipment-tag generator, the claims and quotation tools and the lab generator. New spans in every head would have meant changing all of them and proving each one again.

So the look is a generated script, js/fact-look.js, written by one generator and added to every song page by the publish chain. In the browser it wraps the page’s own text in spans and adds icons and chips; it never adds or removes a word. The markup every checker reads is unchanged, and without JavaScript the sections read as the plain lists they always were.

The Timeline section of the Hey Jude page drawn as a rail: a dot for each date, chips for the work done, the studio and each credited person, then the session text with source markers.
The Timeline of Hey Jude as published, drawn by the script: the rail, the work and room chips, and the credits as person chips.
The same Hey Jude Timeline as a plain bulleted list, each point opening with its date, work, studio and times in bold, followed by the credits and the session text.
The same section from the same markup with the script removed: the plain list the checkers read, word for word the text of the rail above.

A guard on every point

A presentation layer that can change text is a way for an unchecked fact to reach the page, so the script checks itself: it compares each point’s text before and after decoration and restores any point whose text would differ. Before release we ran it over every song page in a headless DOM. It decorated 687 of the 689 dated points (the two left alone are undated points on legacy pages), 1,414 notes, 1,274 credit chips and 618 room chips, and every section’s text came out identical to what went in.

A rename that keeps every link

The section was also renamed, from Recording Timeline to Timeline. The heading and its entry in the page’s contents box changed; the section’s id did not, so every link from another page, and every checker that keys on the id, still lands in the same place. A small script makes the rename in the publish chain, and its check mode, which reports any page it would still change, joins the chain’s other idempotence checks. The twenty listening-path leads that pointed readers to the section now say ‘see Timeline’, and the generator that renders them accepts either wording.

The first publish of the change hit the 180-second limit of a single shell call partway through the chain’s first step. No file was damaged: every recently written page was checked whole before the run resumed. The first step now always runs in time slices, so a long run stops cleanly before the limit instead of being cut off inside a write.