Panes by column: a forest of panes, curves between them, close, pin and an active rule
The tree of forks becomes a forest: a pinned pane stays open when a pane it was opened from closes, as an orphan in its own column. Close takes a pane and what was opened from it, pinned panes excepted; pin and unpin; [ and ] move to the pane above or below in a column. The panes view is laid out by column: column d holds every pane at depth d and divides its own height among them, a short pane taking only what its text needs; when they do not fit, all but the focused branch's pane (and pinned ones) fold into one-line tabs. A faint curve runs from the words, row or link each pane was opened from to its title, the focused branch's in a stronger ink; curves through one gutter take lanes side by side, ordered to cross least. Every pane has the same hairline right and bottom. The active pane has a heavy rule across its top, the rest of the focused branch a hairline. Each pane has a pin and a x at its top right (the x also on its spine); q closes the active pane, whatever it shows (it used to close a whole fork from wherever the fork began, which closed the node an article was opened from); P pins it. /curves off hides the curves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014yB6q4BHMwptTX3YFtkRab
This commit is contained in:
1 parent
2f8ca98207
commit
3298cc430c
20 files changed
+1822
-783
No files matched your search
+68
-35
@@ -322,9 +322,12 @@ kbd, .help code { font-family: var(--mono); font-size: 0.86em; border: 1px solid
|
||||
/* ---- end usage ---- */
|
||||
|
||||
/* ---- panes view (src/ui/Panes.tsx) ----
|
||||
* The path to the focus as a strip of panes, side by side, after notes.andymatuschak.org. Pane i
|
||||
* sticks i spines from the left edge, so later panes slide over earlier ones and leave each a
|
||||
* narrow spine that carries its title. Each pane scrolls on its own; only the strip scrolls sideways.
|
||||
* The panes as columns, side by side, after notes.andymatuschak.org. Column i sticks i spines from
|
||||
* the left edge (a pinned pane's column, a whole pane), so later columns slide over earlier ones
|
||||
* and leave each a narrow spine that carries its title. A column holds every pane at its depth, top
|
||||
* to bottom, sharing its height (Panes.tsx sets the heights); folded panes are one-line tabs. Each
|
||||
* pane scrolls on its own; only the strip scrolls sideways. Every pane has the same hairline on its
|
||||
* right and bottom, so neighbours share one line and the outer edges meet the bars above and below.
|
||||
*/
|
||||
:root {
|
||||
--pane-text: 34rem;
|
||||
@@ -332,9 +335,17 @@ kbd, .help code { font-family: var(--mono); font-size: 0.86em; border: 1px solid
|
||||
--pane-pad: 1.8rem;
|
||||
--pane: calc(var(--spine) + var(--pane-text) + var(--pane-pad));
|
||||
--shade: rgb(0 0 0 / 0.2);
|
||||
--pane-rule: #d9d9d9;
|
||||
--curve: rgb(0 0 0 / 0.17);
|
||||
--curve-on: color-mix(in srgb, var(--link) 62%, transparent);
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root { --shade: rgb(0 0 0 / 0.6); }
|
||||
:root {
|
||||
--shade: rgb(0 0 0 / 0.6);
|
||||
--pane-rule: #3a3a3a;
|
||||
--curve: rgb(255 255 255 / 0.16);
|
||||
--curve-on: color-mix(in srgb, var(--link) 62%, transparent);
|
||||
}
|
||||
}
|
||||
.view-panes .page {
|
||||
position: fixed; top: 0; left: 0; right: 0; bottom: 1.75rem;
|
||||
@@ -342,22 +353,30 @@ kbd, .help code { font-family: var(--mono); font-size: 0.86em; border: 1px solid
|
||||
}
|
||||
.view-panes.with-panel .page { right: min(440px, 92vw); }
|
||||
.view-panes .banner { flex: none; width: auto; margin: 0; }
|
||||
.panes { flex: 1; min-height: 0; display: flex; position: relative; }
|
||||
.strip {
|
||||
flex: 1; min-height: 0; display: flex; overflow-x: auto; overflow-y: hidden;
|
||||
flex: 1; min-width: 0; display: flex; overflow-x: auto; overflow-y: hidden;
|
||||
overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--rule) transparent;
|
||||
}
|
||||
.pane { position: sticky; flex: none; width: var(--pane); width: round(down, var(--pane), 1px); height: 100%; background: var(--bg); border-left: 1px solid var(--hair); }
|
||||
.strip > .pane:first-child { border-left-color: transparent; }
|
||||
.pane[data-over] { border-left-color: var(--rule); box-shadow: -14px 0 20px -12px var(--shade); }
|
||||
.col { position: sticky; flex: none; width: var(--pane); width: round(down, var(--pane), 1px); height: 100%; display: flex; flex-direction: column; background: var(--bg); }
|
||||
.col.split { overflow-y: auto; scrollbar-width: none; }
|
||||
.pane { position: relative; flex: none; width: 100%; height: 100%; overflow: hidden; color: var(--fg); background: var(--bg); border-right: 1px solid var(--pane-rule); border-bottom: 1px solid var(--pane-rule); }
|
||||
.col.split > .pane { height: auto; flex: 1 1 0; min-height: 0; }
|
||||
.strip[data-flush] .pane:last-child { border-bottom-color: transparent; }
|
||||
.col[data-over] { box-shadow: -14px 0 20px -12px var(--shade); }
|
||||
.col[data-over]::before { content: ""; position: absolute; z-index: 4; top: 0; bottom: 0; left: 0; width: 1px; background: var(--rule); }
|
||||
.pane-scroll {
|
||||
height: 100%; overflow-x: hidden; overflow-y: auto; padding: 1.9rem var(--pane-pad) 30vh var(--spine);
|
||||
scrollbar-width: thin; scrollbar-color: var(--hair) transparent;
|
||||
}
|
||||
/* In a shared column a pane is only as tall as its text needs, so it scrolls no further than its end. */
|
||||
.col.split .pane-scroll { padding-bottom: 1.4rem; }
|
||||
|
||||
/* The spine: a covered pane's title, set vertically in the left gutter. */
|
||||
.spine { position: absolute; top: 0; bottom: 0; left: 0; width: var(--spine); z-index: 2; background: var(--bg); opacity: 0; pointer-events: none; cursor: pointer; transition: opacity 0.12s; }
|
||||
.pane[data-covered] .spine { opacity: 1; pointer-events: auto; }
|
||||
.spine span {
|
||||
.spine { position: absolute; top: 0; bottom: 0; left: 0; width: var(--spine); z-index: 2; background: inherit; opacity: 0; pointer-events: none; cursor: pointer; transition: opacity 0.12s; }
|
||||
.col[data-covered] .spine { opacity: 1; pointer-events: auto; }
|
||||
.spine .pane-btn { position: absolute; top: 0.3rem; left: 50%; margin-left: -0.65rem; }
|
||||
.spine-title {
|
||||
display: block; max-height: 100%; padding: 1.95rem 0 1.2rem; writing-mode: vertical-rl; line-height: var(--spine);
|
||||
font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.03em; color: var(--dim);
|
||||
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
||||
@@ -367,6 +386,41 @@ kbd, .help code { font-family: var(--mono); font-size: 0.86em; border: 1px solid
|
||||
.spine { transition: none; }
|
||||
}
|
||||
|
||||
/* A folded pane: one line, its title (and W for an article), its pin and ×; a click opens it. */
|
||||
.tabline {
|
||||
display: none; align-items: center; gap: 0.4em; height: 100%; padding: 0 3.4rem 0 var(--spine); cursor: pointer;
|
||||
font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.02em; color: var(--dim); white-space: nowrap;
|
||||
}
|
||||
.tabline .tabtitle { overflow: hidden; text-overflow: ellipsis; }
|
||||
.tabline:hover { color: var(--fg); }
|
||||
.pane[data-tab] > .tabline { display: flex; }
|
||||
.pane[data-tab] > .pane-scroll, .pane[data-tab] > .spine { display: none; }
|
||||
|
||||
/* A pane's pin and ×, top right, in the margin above its title: quiet until pointed at. A pinned pane's pin is filled. */
|
||||
.pane-ctl { position: absolute; z-index: 3; top: 0.25rem; right: 0.3rem; display: flex; gap: 0.05rem; }
|
||||
.pane[data-tab] > .pane-ctl { top: 2px; }
|
||||
.pane-btn { display: block; width: 1.3rem; height: 1.3rem; padding: 0.3rem; border-radius: 2px; cursor: pointer; color: var(--rule); }
|
||||
.pane-btn svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
|
||||
.pane:hover .pane-btn { color: var(--faint); }
|
||||
.pane .pane-btn:hover { color: var(--fg); background: var(--sel); }
|
||||
.pane-btn.pin.on { color: var(--fg); }
|
||||
.pane-btn.pin.on svg { fill: currentColor; }
|
||||
|
||||
/*
|
||||
* The active pane, where the keys act: a heavy rule across its top, as gwern sets a heading's;
|
||||
* the other panes on the focused branch, a hairline in the text's colour. The status line's mode
|
||||
* badge is set in the same ink.
|
||||
*/
|
||||
.pane::after { content: ""; position: absolute; z-index: 3; top: 0; left: 0; right: 0; height: 0; background: var(--fg); pointer-events: none; }
|
||||
.pane.active::after { height: 3px; }
|
||||
.pane.on-branch:not(.active)::after { height: 1px; background: var(--faint); }
|
||||
|
||||
/* The curves: from what each pane was opened from to its title, behind nothing but in the gaps between lines. */
|
||||
.curves { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; overflow: hidden; }
|
||||
.curves path { fill: none; stroke: var(--curve); stroke-width: 1; }
|
||||
.curves path.on { stroke: var(--curve-on); }
|
||||
.curves path.lost { stroke-dasharray: 1 3; }
|
||||
|
||||
/* A pane's head: a section heading, smaller than the page title the first pane keeps. */
|
||||
.pane-head { display: flex; align-items: baseline; gap: 0.6em; margin: 0 0 0.85rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--faint); cursor: pointer; }
|
||||
.pane-head.focused { border-bottom-color: var(--fg); }
|
||||
@@ -381,25 +435,6 @@ kbd, .help code { font-family: var(--mono); font-size: 0.86em; border: 1px solid
|
||||
.node.showing > .row .mark { color: var(--fg); }
|
||||
.node.showing > .row::after { content: "→"; flex: none; margin-left: auto; padding-left: 0.8em; font-family: var(--sans); font-size: 0.72em; color: var(--dim); }
|
||||
|
||||
/*
|
||||
* Forks (src/ui/forks.ts): right of a pane with several children, one row per fork, top to bottom
|
||||
* in the order they were opened, divided by a line; a row holds its fork's panes and perhaps a
|
||||
* stack of rows of its own. Rows share the strip's height down to --row-min each (a stack needs a
|
||||
* row's worth per fork at its far right, --leaves); past that the strip scrolls down, and a pane
|
||||
* with forks stays at the top while its rows go by. Sideways the strip scrolls as one, so a fork's
|
||||
* pane is always in the column next to the pane it came from.
|
||||
*/
|
||||
.strip.forked { overflow-y: auto; overscroll-behavior-y: contain; }
|
||||
.forks { flex: none; display: flex; flex-direction: column; min-height: calc(var(--row-min) * var(--leaves)); }
|
||||
.fork { flex: 1 1 0; display: flex; min-height: calc(var(--row-min) * var(--leaves)); }
|
||||
.fork + .fork { border-top: 1px solid var(--rule); }
|
||||
/* The line is drawn on the row's panes too: a pane slid sideways over the row's edge would cover it. */
|
||||
.fork + .fork .pane { border-top: 1px solid var(--rule); }
|
||||
/* The focused fork: its first pane's left edge in the text's colour. */
|
||||
.fork.on > .pane:first-child { border-left-color: var(--fg); }
|
||||
.strip.forked .pane { height: auto; max-height: var(--strip-h); top: 0; }
|
||||
/* A row's height is only known after the rows are laid out, so a pane's own scroller is fitted to the pane rather than sized by percent. */
|
||||
.strip.forked .pane-scroll { position: absolute; inset: 0; height: auto; padding-bottom: min(30vh, calc(var(--row-min) / 2)); }
|
||||
/* What each fork was opened from, in the pane it came from: the focused fork's row, words or link marked as before, the others lightly. */
|
||||
.node.forked > .row::after, .wrow.forked > .row::after { content: "→"; flex: none; margin-left: auto; padding-left: 0.8em; font-family: var(--sans); font-size: 0.72em; color: var(--faint); }
|
||||
.wrow.forked > .row:has(.wnum)::after { margin-left: 0.5em; }
|
||||
@@ -408,9 +443,8 @@ kbd, .help code { font-family: var(--mono); font-size: 0.86em; border: 1px solid
|
||||
:is(.lnk, .anchor, .wiki-text a).forked.picked { background-color: color-mix(in srgb, var(--link) 30%, transparent); }
|
||||
:is(.backlinks, .related-list) li.forked { box-shadow: inset 2px 0 0 var(--rule); }
|
||||
:is(.backlinks, .related-list) li.forked.picked { box-shadow: inset 2px 0 0 var(--fg); }
|
||||
/* Where there is no room for rows only the focused branch is drawn; a pane that starts a fork says so. */
|
||||
.fork-note { margin: -1.1rem 0 0.9rem; font-family: var(--sans); font-size: 0.62rem; letter-spacing: 0.03em; color: var(--dim); }
|
||||
.fork-note kbd { font-size: 0.95em; }
|
||||
/* An orphan: a pinned pane whose source has closed. */
|
||||
.orphan-note { text-transform: none; letter-spacing: 0.02em; font-style: italic; }
|
||||
|
||||
/* The first pane keeps the page title, set from the left so it stays readable when the pane is partly covered. */
|
||||
.pane.root .top h1, .pane.root .byline, .pane.doc .top h1, .pane.doc .byline { text-align: left; }
|
||||
@@ -512,8 +546,7 @@ kbd, .help code { font-family: var(--mono); font-size: 0.86em; border: 1px solid
|
||||
* Its own ground, its own face (the bundled sans), a W at its head, its licence at its foot.
|
||||
*/
|
||||
.wiki { font-family: var(--sans); color: var(--soft); }
|
||||
.wiki-pane .pane-scroll, .wiki-pane .spine { background: var(--wiki-bg); }
|
||||
.wiki-pane { border-left-color: var(--wiki-rule); }
|
||||
.pane.wiki-pane { background: var(--wiki-bg); }
|
||||
.wiki-pane .spine span { color: var(--dim); }
|
||||
.wiki-pane .spine .wmark { font-weight: 600; }
|
||||
.wiki-head { margin: 0 0 0.8rem; padding-bottom: 0.35rem; border-bottom: 1px solid var(--wiki-rule); cursor: pointer; }
|
||||
|
||||
Reference in new issue
Block a user