aboutsummaryrefslogtreecommitdiffstats
path: root/docs/scripting.md
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-14 16:03:17 +0200
committeruser <user@clank>2026-08-14 16:03:17 +0200
commitf655fe0958378986d5476b1e3e130f756a9f976b (patch)
tree981b514b4d9d0c0d93e77f2cf89a22d7c921d0bc /docs/scripting.md
parentsl0ppty: the test cycle was 80s, it is now 5.5s (diff)
downloadslosh-f655fe0958378986d5476b1e3e130f756a9f976b.tar.gz
slosh-f655fe0958378986d5476b1e3e130f756a9f976b.tar.xz
slosh-f655fe0958378986d5476b1e3e130f756a9f976b.zip
sl0ppty: collapsing flattens the tree instead of nesting headers
Collapse was a local decision that stayed local all the way down, so a tab whose root did not fit could show one pane as a header and then, inside the child that did fit, three more panes side by side. That is a degraded mode still spending rows on an arrangement it has no room to express, next to a pane it has reduced to a single line. Now a subtree that does not fit flattens: every pane under it becomes one row, in one list, with the focused one opened below them. Nesting is precisely what there is no space for, and a reader in that state is asking which pane, not which arrangement. The better reason is that the old shape made panes unreachable. mark_collapsed gave every leaf under a collapsed subtree the *same* rect, and draw_collapsed registered one hit for first_leaf_of(). Three stacked panes therefore became one header whose only action was focus on the first of them: the other two could not be clicked at all, and directional focus could not separate them either, because their rects were identical. One row per pane fixes that by construction rather than by adding a case. Headers sit together with the body below rather than the open pane keeping its position in the list. Switching then moves only the content while the list you are picking from holds still, and the tree order that an accordion would have preserved is the thing being flattened away. The stack's guard counts panes rather than children now, since that is what it spends a row on each of, and layout_solo flattens the same way so there is one mental model rather than two. subtree_has() went with them. One regression, caught by the test that exists for it: collapse_leaf set `content` to the header rect, and a hidden pane's content is the size the program inside still believes it has. It is not resized on the way in and must not appear to have been. Nothing draws a collapsed pane's content, so writing a header rect there would only have made the lie more convincing.
Diffstat (limited to 'docs/scripting.md')
0 files changed, 0 insertions, 0 deletions