I figured out a partial solution via userchrome.css for the ancestry trail portion of my RFE. This is just an example, I would nuance the styling, of course. This will wrap a yellow border around each ancestor notebook in a tree of notebooks.
The CSS to a depth of 6 (this is very … brute force because the DOM hierarchy is flat):
/* Depth 1 */
.list-item-container.list-item-depth-1 {
&:has(~ .selected:not(.list-item-depth-1)):not(:has(~ .list-item-depth-1 ~ .selected)) {
border: 1px solid yellow;
}
}
/* Depth 2 */
.list-item-container.list-item-depth-2 {
&:has(~ .selected:not(:is(.list-item-depth-1, .list-item-depth-2))):not(:has(~ :is(.list-item-depth-1, .list-item-depth-2) ~ .selected)) {
border: 1px solid yellow;
}
}
/* Depth 3 */
.list-item-container.list-item-depth-3 {
&:has(~ .selected:not(:is(.list-item-depth-1, .list-item-depth-2, .list-item-depth-3))):not(:has(~ :is(.list-item-depth-1, .list-item-depth-2, .list-item-depth-3) ~ .selected)) {
border: 1px solid yellow;
}
}
/* Depth 4 */
.list-item-container.list-item-depth-4 {
&:has(~ .selected:not(:is(.list-item-depth-1, .list-item-depth-2, .list-item-depth-3, .list-item-depth-4))):not(:has(~ :is(.list-item-depth-1, .list-item-depth-2, .list-item-depth-3, .list-item-depth-4) ~ .selected)) {
border: 1px solid yellow;
}
}
/* Depth 5 */
.list-item-container.list-item-depth-5 {
&:has(~ .selected:not(:is(.list-item-depth-1, .list-item-depth-2, .list-item-depth-3, .list-item-depth-4, .list-item-depth-5))):not(:has(~ :is(.list-item-depth-1, .list-item-depth-2, .list-item-depth-3, .list-item-depth-4, .list-item-depth-5) ~ .selected)) {
border: 1px solid yellow;
}
}
/* Depth 6 */
.list-item-container.list-item-depth-6 {
&:has(~ .selected:not(:is(.list-item-depth-1, .list-item-depth-2, .list-item-depth-3, .list-item-depth-4, .list-item-depth-5, .list-item-depth-6))):not(:has(~ :is(.list-item-depth-1, .list-item-depth-2, .list-item-depth-3, .list-item-depth-4, .list-item-depth-5, .list-item-depth-6) ~ .selected)) {
border: 1px solid yellow;
}
}
Here's a screenshot.
Yay! That's super helpful!
… BUT …
If I roll up part of the tree, suddenly we lose all positional context of where we are in the tree of notebooks. Because no notebook is "selected" any more. This is very frustrating. All of they yellow bordered notebooks in the previous image should be still with borders in this image, but they are not. All context is lost because we collapsed the "2 Act" notebook:
Laurent and friends. Is there a way we could style the notebooks so that we always have a spacial understanding where we are in the tree?