Skip to content

Make page tabs sections of one page, and trim frame edges without wrapper declarations - #1203

Merged
max-sixty merged 8 commits into
mainfrom
how-it-works-one-layout
Sep 26, 2026
Merged

max-sixty merged 8 commits into
mainfrom
how-it-works-one-layout

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Two simplifications of the page layout model, both agreed on the layout review page.

Page tabs are sections of one page

A page tab set rebuilt the 720px column on its header, strip and panel, discarding main's own width. So data-width on main half-applied to a page of tabs: the gutters, title and rail changed while the content stayed in the column. A sidebar beside the tabs demoted them to a framed section.

Now the first lf-tabs placed directly in main is page navigation, whatever else main holds. Its strip and panels are blocks of main and take the page's width, column or wide, and a header or sidebar stands beside them as on any page. A later or nested set is a framed tabbed section.

  • Measured: on a wide page with tabs at 1440px, the panel goes from 720 to 1325px and a 2fr 1fr side track from 232 to 434px, matching the same page without tabs.
  • lf-tabs.js: root is "the first lf-tabs among main's children", watched on main's children only. The whole-subtree observer goes.
  • Theme: the column-rebuilding rules and the hand-built breakout for a workspace-only tab are gone. A workspace alone in main, or alone in a page tab that ends the page, holds the window under one rule.
  • Validators: markup.py counts a page-navigation block anywhere directly in main as the outline, and misalignedSplits reads grids inside the shown page tab.
  • Corpus: the generated corpus nests its tab set in a section, so every panel's controls stay pressable.

The edge trim needs no wrapper declarations

#1185 made a frame's margin trim pass only through wrappers declaring --lf-passes-block-edge, so 14 examples and docs, three fixtures and five default-theme widgets carried it. The trim now follows the edge through each first or last child, as #1178 had it.

  • A box that draws an inset: it declares its frame (--lf-block-frame), as theme boxes already do. The case Pass frame edges through transparent wrappers #1185 protected, a heading's 48px kept inside an undeclared padded section, trims to 0 as soon as that section declares its frame.
  • A row that lays its children out side by side: a flex row or grid at a frame's edge would otherwise lose only its first item's margin. It declares --lf-holds-edge: 1 and the trim stops there. A new gate reading, splitEdges, names a row that splits; no shipped or product page has one.
  • Cleanup: --lf-passes-block-edge is removed everywhere, and the corpus is regenerated.

Tests

  • The gallery composition test asserts placement (alone, among other blocks, nested).
  • The inline-tab test nests its set.
  • New tests cover a wide page's tabs sharing main's width beside a sidebar, and a page-tab workspace holding only where the tabs end the page.
  • The frame-edge test asserts the trim through bare, boxless and padded-grid sections, plus the undeclared-padded-box advice.
  • A split-row test covers --lf-holds-edge.
  • Each new test fails without its change.
  • The everyday suite, the runtime folds, and the render gate on all 24 authored pages and fixtures and the six product pages pass.

This was written by Claude Code on behalf of max-sixty

🤖 Generated with Claude Code

max-sixty and others added 8 commits September 25, 2026 17:01
Desktop Chrome defines TouchEvent only where touch input is enabled, so the
interaction trace's `instanceof window.TouchEvent` threw on every gesture there
and reported an uncaught error to the page. The trace now checks the constructor
exists first. A browser test deletes TouchEvent before load and asserts a click
still reaches /api/interaction with no page error.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts:
#	skills/leaf/assets/runtime/interaction-log.js
#	tests/test_render_application_boundary.py
A page tab set rebuilt the 720px column on its header, strip and panel and
discarded main's own width, so data-width on main half-applied to a page of tabs
(the gutters, title and rail changed while the content stayed in the column),
and a sidebar beside the tabs demoted them to a framed section. The first tab
set placed directly in main is now page navigation whatever else main holds:
its strip and panels are blocks of main and take the page's width, column or
wide, and a header or sidebar stands beside them as on any page.

- lf-tabs.js: root is "the first lf-tabs among main's children", watched on
  main's children only; the whole-subtree observer goes.
- theme: the rules that rebuilt the column on main, the header, the strip and
  the panel, and the hand-built breakout for a workspace-only tab, are gone. A
  workspace in a page tab grows out through its own declared width. The
  window-height hold for a workspace alone in main or in a page tab is one rule.
- markup.py: a page-navigation block anywhere directly in main counts as the
  page's outline.
- misalignedSplits reads grids inside the shown page tab.
- Registry, authoring guide, registry docs and the How it works Layout tab say
  so.

Tests: the gallery composition test now asserts placement (alone, among other
blocks, nested) instead of "content after the set demotes it"; the inline-tab
test nests its set in a section; a new test asserts a wide page's tabs share
main's width and left edge beside a sidebar.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
#1185 made a frame's margin trim pass only through wrappers that declared
--lf-passes-block-edge, so 14 examples and docs, three fixtures and five of the
default theme's own widgets carried the declaration, and a page failed the
render gate until every plain section at a frame's edge said so. The trim now
follows the edge through each first or last child, as #1178 had it: a wrapper
declares nothing, and a box that draws its own inset declares its frame
(--lf-block-frame, as every theme box already does) and trims its own edge the
same way.

The case #1185 protected, a heading's 48px kept inside an undeclared padded
grid section, is the trapped margin the trim exists to remove: measured on main,
the same section trims its heading to 0 as soon as it declares its frame. The
render gate's advice for a trapped margin now names only the frame declaration.

- theme.css: the pass-through container queries drop the wrapper condition;
  --lf-passes-block-edge is gone.
- Every declaration in the default theme, examples, docs and fixtures is
  removed; the corpus is regenerated.
- packages.md and page-authoring.md stop describing the wrapper declaration.
- The frame-edge gate test now asserts the trim through a bare, a boxless and
  a padded grid section with nothing declared, and that an undeclared padded
  box away from a frame's edge is reported until it declares its frame.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The outline advice test now expects no advice for a page tab set with context
beside it, and advice for one nested in a section; docs/registry.html is the
key generator's output for the new x-page-navigation text.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…he page's end

Review fixes for the two changes before this one.

- The trim now follows the edge through every wrapper, which took the margin
  off a flex row's first item and not the items beside it. A box that lays its
  children out side by side declares --lf-holds-edge: 1 and the trim stops
  there; a new gate reading, splitEdges, names a row at a frame's edge that
  splits. No shipped page or product page has one.
- A workspace alone in a page tab held the window and zeroed the page's closing
  room even with blocks after the tab set. It now holds only where the tab set
  is main's last block.
- The corpus page nests its tab set in a section, so it stays a framed section
  with every panel's controls pressable, as the aim sweep needs.
- lf-tabs.js's header and the arrangement eval's $keys anchor say the new rule.
- Tests: a split-row case; the hold with and without blocks after the tabs; the
  page-width test asserts the sidebar stands beside the panel.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit 449c3e2 into main Sep 26, 2026
5 checks passed
@max-sixty
max-sixty deleted the how-it-works-one-layout branch September 26, 2026 03:59
max-sixty added a commit that referenced this pull request Sep 26, 2026
#1203 made page tabs sections of one page and let a frame trim its edges
without wrapper declarations. The structure beyond that is still unsettled,
so TODO.md's Layout list now opens with what remains: named page areas that
a block spans, dropping `wide` from main, the workspace that holds the window
when it ends the page, package region templates, and the examples and docs
that still work around the model.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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