Repository navigation
Start an option's paragraph on its title's next line - #3936
Merged
Merged
Conversation
A titled `lf-option` card reads as a `<strong>` title and the consequence of choosing it. Authors write that consequence either as a sentence after the title, as review-a-plan and alert-review do, or as its own `<p>`, as ideas-to-implement, dynamic-widgets and review-a-fix do. The paragraph form set the consequence 13px lower than the sentence form, because the paragraph's top margin collapsed with the title's. In ideas-to-implement, which is all paragraph cards, each title floated apart from the text it heads, and the cards read looser than every other decision in the catalog. ## The fix `options.css` drops the margins between a title and a paragraph that directly follows it, so the paragraph starts on the title's next line, where a sentence would. Other blocks after a title, such as a figure or a `.facts` list, keep their spacing, and so does the working-density row form, where the title runs into its consequence. ## Evidence `leaf-dev stills origin/main --state ideas-ask` shows ideas-to-implement's four cards with each description directly under its title. The sentence-form cards (`alert-option-long`) are unchanged by this commit. ## Checks - New `test_an_option_set_as_a_paragraph_starts_under_its_title_as_a_sentence_does`: a sentence card and a paragraph card put their first line of text the same distance under the title. With only the paragraph's margin dropped, it measured 7px against 3px, and on main the gap is larger still. - `test_page_fixture_renders` for ideas-to-implement, dynamic-widgets and review-a-fix; the card, title, across and facts cases of `test_render_options.py`; `pnpm run test:runtime`; pre-commit. - `wt refresh-previews` recaptured the catalog stills; ideas-to-implement's first screen changes. Other open PRs from this sweep also move the `leaf-assets.json` pin. Whichever lands later takes the later `revision` and runs `wt refresh-previews` again from the merged tree (`dev/leaf_dev/leaf_assets.py`). > _This was written by Claude Code on behalf of max-sixty_
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 25, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 25, 2026
A sidebar page's `aside` is the room the page gives to navigation, and
`page-authoring.md` ("Contents navigation") tells authors to put the
contents outline there. The outline still drew as a folded disclosure,
so pr-walkthrough at 1440×900 and 1024×768 showed "▸ ON THIS PAGE" alone
at the top of an empty third of the window, beside an eleven-screen
review, on every screen of it.
## The fix
The Layout (`layouts.css`) now sets `--lf-sidebar-slot: beside` on a
sidebar page's `aside` while it stands beside the body
(`data-lf-beside`, which prepaint already writes). A column's margin
sidebar already says `--lf-sidebar-slot: margin` the same way. `lf-toc`
(`toc.css`) reads the token. Beside the body, it hides its toggle, shows
its "On this page" label, and draws the section in view in ink rather
than muted. With the summary hidden, `lf-toc.js` already opens the
disclosure. When the track stacks above the body, the toggle comes back
and the disclosure returns to the reader's own open or closed choice.
The widget reads only a token describing its box (`browser/AGENTS.md`,
"A Layout, a style and a widget never read one another"), so a
hand-written page can opt in with the same token.
The open outline's last link sits at the foot of the track's scrolling
body, so its focus ring relies on the ring room #3939 gave that body;
this change adds no rule of its own for it.
## Evidence
`leaf-dev stills origin/main --state walkthrough-wide --state
walkthrough-body-short`. `walkthrough-wide` is a new state:
pr-walkthrough at the desktop viewport, two windows down. The base shows
the folded toggle beside the body. The head shows the nine section links
with "Change surface", the section in view, in ink.
`walkthrough-body-short` (900×600) shows the same change.
## Checks
- New
`test_a_sidebar_page_track_beside_the_body_stands_its_outline_open`: the
outline is open with its summary hidden beside the body at 1440, and
folded again at 700. It fails with the token removed.
- `test_each_sampled_focus_ring_is_shown_whole_in_its_surface` passes,
the open outline's last link included.
- The sidebar track tests
(`test_a_sidebar_pages_track_stays_in_view_only_beside_the_body`,
`test_a_revision_keeps_the_readers_place_in_a_sidebar_tracks_body`,
`test_a_sidebar_pages_items_trim_their_words_at_both_edges`,
`test_browser_and_file_captures_agree_on_a_sidebar_tracks_blocks`),
`test_pr_walkthrough_navigation_starts_the_review_at_every_width`,
`test_layout_style_and_widgets_never_read_each_other`,
`test_page_fixture_renders` for command-hub, live-progress, triage-board
and pr-walkthrough, and `pnpm run test:runtime` pass on the merged tree.
- The catalog stills are recaptured, so pr-walkthrough's first screen
shows the open outline, and triage-board's track prose shows the rewrap
from #3939's ring room, which main's earlier pin predated. The pin is
the later of this branch's and #3936's `leaf-assets` revisions, which
holds both branches' stills. `wt refresh-previews` run again from this
branch merged with main, #3936 and #3939 included, reproduced every
pinned still byte for byte, so the pin did not move.
> _This was written by Claude Code on behalf of max-sixty_
---------
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A titled
lf-optioncard reads as a<strong>title and the consequence of choosing it. Authors write that consequence either as a sentence after the title, as review-a-plan and alert-review do, or as its own<p>, as ideas-to-implement, dynamic-widgets and review-a-fix do. The paragraph form set the consequence 13px lower than the sentence form, because the paragraph's top margin collapsed with the title's. In ideas-to-implement, which is all paragraph cards, each title floated apart from the text it heads, and the cards read looser than every other decision in the catalog.The fix
options.cssdrops the margins between a title and a paragraph that directly follows it, so the paragraph starts on the title's next line, where a sentence would. Other blocks after a title, such as a figure or a.factslist, keep their spacing, and so does the working-density row form, where the title runs into its consequence.Evidence
leaf-dev stills origin/main --state ideas-askshows ideas-to-implement's four cards with each description directly under its title. The sentence-form cards (alert-option-long) are unchanged by this commit.Checks
test_an_option_set_as_a_paragraph_starts_under_its_title_as_a_sentence_does: a sentence card and a paragraph card put their first line of text the same distance under the title. With only the paragraph's margin dropped, it measured 7px against 3px, and on main the gap is larger still.test_page_fixture_rendersfor ideas-to-implement, dynamic-widgets and review-a-fix; the card, title, across and facts cases oftest_render_options.py;pnpm run test:runtime; pre-commit.wt refresh-previewsrecaptured the catalog stills; ideas-to-implement's first screen changes. Other open PRs from this sweep also move theleaf-assets.jsonpin. Whichever lands later takes the laterrevisionand runswt refresh-previewsagain from the merged tree (dev/leaf_dev/leaf_assets.py).