Skip to content

Prototype panel starts folded on a phone - #104

Merged
jamescalam merged 1 commit into
mainfrom
skill-464-panel-phone-fold
Dec 4, 2026
Merged

jamescalam merged 1 commit into
mainfrom
skill-464-panel-phone-fold

Conversation

@jamescalam

Copy link
Copy Markdown
Contributor

On a phone the Prototype panel loaded open: <details class="tweaks" open> was open at every width, so about 300 px of rows sat above the design instead of the one-line summary the phone layout is built for.

Change

  • The markup drops open. The controls script opens the panel when (min-width: 41.51rem) matches, the same edge where the panel moves to the side (the bar's 40rem container plus its padding). At 41.5rem and under it stays folded to its line, so a phone never paints it open.
  • It runs once per panel element (an ssStarted mark), so a person's own fold or open survives the page's MutationObserver runs and script re-runs. A panel that a live push puts back fresh starts the same way.
  • starter.html and shepherd.html rebuilt from base.html (shepherd 37,334 of 37,500 characters).

Tests

  • New: fresh loads at 390 and 664 px start folded, 1440 starts open; a fold at 1440 and an open at 390 stay after the page changes.
  • node --test test/: 177 pass, 0 fail, 2 skipped.
  • Chromium (Playwright 1.50) on a page with the panel, fresh loads: 390 folded at 45 px with its values line, 664 folded, 680 and 1440 open at 280 px. The panel's state as the parser reaches it is closed at every width. A click and Enter on its head toggle it at each width.

Pages made before this keep open in their markup until edited by hand.

… and open at the side on a wider window, set once by its script so a phone never shows it open first and a person's fold stays

Co-authored-by: Pointman <noreply@pointman.ai>
Co-authored-by: Claude <noreply@anthropic.com>
@jamescalam
jamescalam merged commit e927ab1 into main Dec 4, 2026
4 checks passed
@jamescalam jamescalam mentioned this pull request Dec 4, 2026
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.

1 participant