Panes: clicks, selection, tabs, peek and curves that keep to their content; Alt+h j k l between panes

- A click anywhere in a pane that is not text, a row or a link makes it the active pane; a click
  anywhere else, or Esc, clears a selection.
- The page measures where each pane was opened from, so its column stands in that order.
- A crowded column stacks the panes after the one looked at at its foot, a tab each, so every pane
  shows at least its tab; the curve into a tab becomes the tab's line where it meets it (no stub).
- A pane cut off for any reason (covered, too small a share, past the foot) peeks out as tall as its
  text needs, without moving the panes around it; curves are redrawn on peek, on a pane's text
  changing size (ResizeObserver) and every frame while anything animates.
- The curve joins the active pane's title rule too (the heavy rule alone marks it); a source out
  of sight in a pane that still shows is pointed at: dotted, turned at its end toward it; a curve
  leaves from a tab's foot only when its pane is folded to the tab.
- The selection bar sits under a pane's tab, takes the room above or below the words, never covers
  them; a sticky tab's title is centred under the heavy rule; focus is kept clear of the tab.
- Alt+h / Alt+l: the pane opened from (left) / one opened from this one (right); Alt+k / Alt+j
  (Alt+↑ ↓, [ ]): above / below in the column; from a node, a selection or an article; in the pane menu.
- Browser tests (e2e/panes3.spec.ts) with a curve invariant (curveFaults) checked after peeks,
  scrolls, resizes, folds, a drag and an article arriving.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yB6q4BHMwptTX3YFtkRab
This commit is contained in:
thalladaandClaude Opus 5.5 committed 2026-11-16 22:10:24 -05:00
1 parent 24a048a9f8
commit 0df51493cd
13 files changed
+727 -61

No files matched your search

+10 -3
View File
@@ -13,6 +13,7 @@ import { PANES_MIN_WIDTH, store, type Aux, type WRow } from "./store";
import { WikiPage, WikiView } from "./Wiki";
import { Usage } from "./Usage";
import { FirstRun, Hints, Key, MenuHost, SelBar, closeMenu, hideBar, locate, locateIn, menuAt, menuShown, setPrompt, showBar, type Hint } from "./Mouse";
import { press } from "./press";
function Page() {
if (store.colWiki) return <WikiPage />;
@@ -672,9 +673,15 @@ export function App() {
const hit = at && store.sentenceAt(at.id, at.at);
if (at && hit) return store.go(at.id, "sentence", hit), showBar();
const node = target.closest<HTMLElement>("[data-node]");
if (!node) return;
// A pane's head makes that pane the active one.
if (panes && paneEl && node.matches(".pane-head, .top")) store.paneAt = paneIndex;
if (!node) {
// Anywhere else in a pane (its margins, under its text, a list's gaps): that pane becomes the active one, and any selection goes.
if (panes && paneEl) return store.land(paneIndex);
// Anywhere else on the page: the selection goes.
for (let i = 0; i < 3 && (store.focus.grain !== "node" || store.inArticleText); i++) press("Escape");
return;
}
// Anything else of a node in a pane makes that pane the active one.
if (panes && paneEl) store.paneAt = paneIndex;
store.go(node.dataset.node as NodeId);
};