Skip to content

overview: the rounds go under the title when they need the room - #45

Merged
somebox merged 2 commits into
mainfrom
overview-header-rounds
Nov 22, 2026
Merged

somebox merged 2 commits into
mainfrom
overview-header-rounds

Conversation

@somebox

@somebox somebox commented Nov 22, 2026

Copy link
Copy Markdown
Owner

What changes

The header of the page pcbkit overview makes (pcbkit/data/overview/page.html):

  • It wraps instead of using a two-column grid. The rounds sit beside the title only while the title keeps 30rem. Otherwise they go to a row of their own under it, fill that row and scroll sideways there.
  • A few lines of script scroll the tab of the round being shown into view, on load, on a #rN link and on resize.
  • CHANGELOG: one line under [Unreleased] → Fixed.

Why

The grid gave the round strip an auto column, so the title got whatever width was left. On the audio node page (9 rounds) the title block was 36 px wide and 1080 px tall at every window width from 900 px up, even at 1800 px. With 4 rounds the title still broke onto two lines at 900–1000 px. Below 860 px the header already stacked, but the strip scrolled with the newest round (the one shown) off its right end.

Evidence

The pages were built with this branch from scratch copies of the audio node project: its 9 rounds, cut to 1 and 4 rounds, and padded to 14. Orbitchron was also built, with a round 1 started by pcbkit overview new (no project in ~/Documents/Projects other than the audio node has round files). Each page was measured in a browser at 375–1800 px and looked at in light and dark themes.

Title block width in px (rounds beside / below the title; ✗ = the shown round's tab is out of view):

page 375 800 1000 1400 1800
1 round, before 325 below 750 below 782 beside 949 beside 949 beside
1 round, after 325 below 613 beside 784 beside 951 beside 951 beside
4 rounds, before 325 below ✗ 750 below 383 beside (h1 two lines) 550 beside 550 beside
4 rounds, after 325 below 750 below 950 below 552 beside 552 beside
9 rounds, before 325 below ✗ 750 below ✗ 36 beside ✗ 36 beside 36 beside
9 rounds, after 325 below 750 below 950 below 1117 below 1117 below
14 rounds, before 325 below ✗ 750 below ✗ 36 beside ✗ 36 beside ✗ 36 beside ✗
14 rounds, after 325 below 750 below 950 below 1117 below 1117 below

After the change, the h1 is on one line at every width from 800 px up, no page scrolls sideways, and the shown round's tab is in view in every case. Following #r2 and #r14 on the 14-round page at 800 px scrolls the strip to its start and its end. Orbitchron (1 round) looks as before at 900 px and up. python3 tests/test_overview.py passes (101 tests).

Decisions

  • Wrap, not a fixed number of rounds: the strip's width depends on the round labels and the window, so the header wraps by measured widths. The title's flex-basis (30rem) decides when the strip moves under it. This keeps a typical title (about 20 characters at 44 px) on one line.
  • Scroll, not several rows of tabs: a 9-round strip would be three rows deep on a phone. A scrolling strip keeps the header short, and the script keeps the round being read in view.
  • Rules: the strip draws a top rule and a left rule, pulled 1.5px onto its neighbours. Whichever rule lands on the sheet's border can't be seen, so beside the title or below it, the strip has one divider.
  • Single round below 860 px: one round now stays beside the title in windows down to about 650–700 px, where before 860 px always stacked.
  • No new test: this is CSS layout and the repo has no browser tests. The check was the measurements above.

🤖 Generated with Claude Code

With many rounds the header's grid gave the round strip an auto column, and the
title and about text got what was left: nine rounds left the title 36 px wide
from 900 px windows up. The header now wraps: the rounds sit beside the title
while it keeps 30rem, otherwise they take a row of their own and scroll there,
and the tab of the round shown is scrolled into view.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 22, 2026 02:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the overview-header layout and selected-round visibility changes.

No open issues 🎉

What changed in this PR

This PR improves the header layout of pages generated by pcbkit overview, preventing long round strips from squeezing the project title.

Changes:

  • Replaces the header grid with a wrapping flex layout, moving rounds below the title when space is limited.
  • Keeps the selected round’s tab visible on page load, hash navigation, and window resize.
  • Documents the layout fix and revised single-round behavior in the changelog.
File Description
pcbkit/​data/​overview/​page.html Adds responsive header wrapping and automatic scrolling to the selected round tab.
CHANGELOG.md Records the overview header fix under Unreleased.

Review effort: Balanced

CHANGELOG's [Unreleased] keeps both: this PR's overview fix under Fixed, and
the JLC rotation entries from PR 46 under Changed, as earlier rotation
entries are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 22, 2026 12:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the responsive overview header and selected-round tab scrolling changes.

No open issues 🎉

Review effort: Balanced

@somebox
somebox merged commit 32867ca into main Nov 22, 2026
6 checks passed
@somebox
somebox deleted the overview-header-rounds branch November 22, 2026 12:41
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.

2 participants