Fold a relation caption heading one row onto that row - #1387
Merged
Conversation
alistair3149
force-pushed
the
subject-tree-fold-captions
branch
4 times, most recently
from
September 9, 2026 16:27
4c126f0 to
faffafc
Compare
Member
Author
The subject tree printed a caption line above every group of relation targets. Across the demo wiki 126 of 135 of those groups hold a single child, so nine in ten caption lines were a line of chrome introducing a line of content, and captions were 37% of everything the tree printed. A caption over several rows is doing a caption's job and keeps its line. A caption over one row is the first half of that row's label, so it moves onto the row -- at the same inline edge and in the same register, since the caption's padding was already matched to a row's. It names the treeitem there instead of only naming a group, which is the more reliable carrier: group names are announced inconsistently across assistive technology. The schema badge leaves the tree with it, and the label channel it used goes too: NeoTree's `secondaryLabel` and its `secondary` slot were added for this one consumer and have no other. A navigator is scanned to reach a Subject, and every row is now named by the relation that reaches it or, for the root, by its page; the pane a row opens carries the Schema, in a column with room for it. Where a caption and a name cannot share a line the row wraps rather than shortening either. The name's flex basis is its own max-content width, so the line breaks exactly when the two do not fit, and the name keeps the row's full width on a second line. The name and the trailing slot are one flex item, or a wrap would leave the unsaved dot on a line of its own; it is `display: contents` until a row folds, so an unfolded row keeps the box tree it had. A caption wraps rather than shortening, as it did on its own line: property names are authored on-wiki and this is the one string here that was never abbreviated. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KuVzjwpVkn7nHpAjNVwkaq
alistair3149
force-pushed
the
subject-tree-fold-captions
branch
from
September 9, 2026 16:49
faffafc to
1c7bb1e
Compare
alistair3149
marked this pull request as ready for review
September 9, 2026 16:56
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.



This narrows the tree half of #1328, which #1345 unified two days ago. The schema badge leaves the Subject editor's tree navigator entirely, taking
NeoTree'ssecondaryLabeland itssecondaryslot, which have no other consumer. Every other surface keeps it, including the pane a row opens.The tree also printed a caption line above every group of relation targets. In the demo wiki 126 of 135 such groups hold one child, and captions were 37% of all printed lines. A caption heading one row now prints on that row; two or more targets keep the caption line. Where caption and name cannot share a line the row wraps rather than shortening either.
Accepted rather than solved: under ADR 31 a label-less target reads
(unnamed City)while a labelled sibling under the same relation shows no Schema at all. A row also changes shape as its data changes, since a second target lifts the caption onto a line above and removing one puts it back.Manual Browser Check
Birth of Johann Sebastian Bachon the demo wiki and click Edit on its infobox. The navigator should print one row per Subject, no caption lines, no schema badges: nine lines become five. The pane on the right still shows the Schema badge.Took place at Eisenachstays on one line throughout.ACME Inc, which has two targets under one property: the caption line stays above rows that carry none.