Skip to content

Fold a relation caption heading one row onto that row - #1387

Merged
JeroenDeDauw merged 1 commit into
masterfrom
subject-tree-fold-captions
Sep 10, 2026
Merged

Fold a relation caption heading one row onto that row#1387
JeroenDeDauw merged 1 commit into
masterfrom
subject-tree-fold-captions

Conversation

@alistair3149

@alistair3149 alistair3149 commented Sep 9, 2026

Copy link
Copy Markdown
Member

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's secondaryLabel and its secondary slot, 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

  1. Open Birth of Johann Sebastian Bach on 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.
  2. Drag the navigator divider narrow. A row whose caption and name cannot share a line should wrap rather than shorten either; Took place at Eisenach stays on one line throughout.
  3. Edit a nested Subject so its row shows the unsaved dot, then narrow again; the dot stays beside the name.
  4. Open ACME Inc, which has two targets under one property: the caption line stays above rows that carry none.
  5. Tab in and arrow through the tree: the focus ring sits on the row, which announces its caption, then its name.

AI-authored — Claude Code, Opus 5 (1M context, xhigh); opened as a design question from @alistair3149 about which of two labels to drop, settled over four rounds that redirected it three times; then a one-line ask to build it and a further round dropping the badge from the root as well; reviewed by a directed multi-pass review whose confirmed findings were applied, diff not yet human-reviewed; 1956 TS tests, lint and build green locally, browser-verified on a dev wiki, CI green.

@alistair3149
alistair3149 force-pushed the subject-tree-fold-captions branch 4 times, most recently from 4c126f0 to faffafc Compare September 9, 2026 16:27
@alistair3149

Copy link
Copy Markdown
Member Author

Only single relations:
image

Both single and multi relations:
image

Wrapping behavior:
image

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
alistair3149 force-pushed the subject-tree-fold-captions branch from faffafc to 1c7bb1e Compare September 9, 2026 16:49
@alistair3149
alistair3149 marked this pull request as ready for review September 9, 2026 16:56
@JeroenDeDauw
JeroenDeDauw merged commit 39d7f51 into master Sep 10, 2026
20 checks passed
@JeroenDeDauw
JeroenDeDauw deleted the subject-tree-fold-captions branch September 10, 2026 13:16
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