Skip to content

tree: don't nest redundant containers on repeated split - #1138

Open
michaeladler wants to merge 1 commit into
mahkoh:masterfrom
michaeladler:fix/nested-containers
Open

tree: don't nest redundant containers on repeated split#1138
michaeladler wants to merge 1 commit into
mahkoh:masterfrom
michaeladler:fix/nested-containers

Conversation

@michaeladler

Copy link
Copy Markdown

Splitting a top-level container that is the sole child of its parent previously wrapped it in yet another single-child container. Repeating this action created a chain of redundant nesting levels, which is especially noticeable (and somewhat irritating) when borders are enabled.

Instead of creating redundant wrapper containers, this change updates the split direction of the existing parent container.

@mahkoh

mahkoh commented Jul 29, 2026

Copy link
Copy Markdown
Owner

I have not looked at the code, but this needs to be a configuration so as to not break existing workflows.

@michaeladler
michaeladler force-pushed the fix/nested-containers branch from 64862f5 to 229ec70 Compare July 30, 2026 07:36
@michaeladler

Copy link
Copy Markdown
Author

I considered it a bug so I didn't make it configurable initially :) I've made it configurable now.

Comment thread jay-config/src/lib.rs Outdated
Comment thread src/control_center/cc_look_and_feel.rs Outdated
Comment thread src/control_center/cc_look_and_feel.rs Outdated
Comment thread src/tree/toplevel.rs Outdated
Comment thread toml-spec/spec/spec.yaml Outdated
@mahkoh

mahkoh commented Jul 30, 2026

Copy link
Copy Markdown
Owner

LGTM otherwise.

Splitting a toplevel that is the only child of its parent container
wrapped it in yet another single-child container. Repeating the action
produced a chain of redundant nesting levels. Change the split direction
of the existing container instead.
@michaeladler
michaeladler force-pushed the fix/nested-containers branch from f6d2f32 to e2275ae Compare July 31, 2026 09:07
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