The mouse and touch: a bar on a clicked sentence, ⋯ and right-click menus, a top bar

- One <Menu>: a popover by the pointer or its button, a sheet from the foot on
  touch; arrows, Home, End, Enter and Esc, closes on a press outside, and gives
  the focus back. Its items come from actions.ts and press their keys.
- A single click on a sentence selects it (as before) and shows a bar over it:
  expand e · define d · why y · example x · challenge c · ask : | link w · ⋯,
  each with its key. A drag or a double click shows it for those words. In an
  article's text too, without link. On a phone it docks at the foot, with ×.
- ⋯ on section rows, a pane's pin and ×, the page's byline and note boxes,
  shown when pointed at or focused, never moving the text. A stale flag,
  clicked, opens the node's menu, its remedies first.
- Right-click on words, a row, a link, a note or a pane: its menu, Copy
  first; the copy key copies the app's selection too. Shift+right-click and
  text boxes keep the browser's menu.
- The top bar: undo, redo when there is something to redo, and menu (documents,
  jump, history, links, layout, settings, command line, help), sticky in the
  column too.
- Key hints in the status line, the history and documents panels and a
  suggestion's card are buttons.
- A first visit is told, once, in the status line, that a click on a sentence
  offers actions and ? lists the keys.

Browser tests: the bar on a click and on a drag, each ⋯ menu, right-click with
Copy, Shift+right-click untouched, the menu's keys, the sticky bar, Lock naming,
the phone's dock and sheet, and links, Shift-clicks, drags and peeks beside it.

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 02:20:42 -05:00
1 parent 9b73cdb15e
commit 32efa17294
9 files changed
+1269 -55

No files matched your search

+4 -1
View File
@@ -11,6 +11,7 @@ import { describeTarget, hostOf, parseTarget, validateRef, wikiTitle, type Ref }
import { clip, plain } from "../core/text";
import { kidClass, sameAux, store, type Aux } from "./store";
import type { Sugg } from "./linker";
import { Hints } from "./Mouse";
import { suggest, summary, wikiConfig, type Attribution as Attr, type Suggestion } from "./wiki";
const MARK: Record<Ref["kind"], string> = { wiki: "W", node: "§", url: "↗" };
@@ -193,7 +194,9 @@ export function Backlinks({ ids, title, focusedAt }: { ids: NodeId[]; title: str
export function SuggestionCard({ sg }: { sg: Sugg }) {
return (
<span class={`inset lpreview suggestion l-${sg.target.kind}`} data-suggestion={sg.id}>
<span class="meta">suggested link{sg.tier === "auto" ? " (sure)" : ""} · y links · n declines{store.review ? " · s skips" : " · S reviews them all"}</span>
<span class="meta">
<Hints hint={[`suggested link${sg.tier === "auto" ? " (sure)" : ""}`, ["y", "links"], ["n", "declines"], store.review ? ["s", "skips"] : ["S", "reviews them all"]]} />
</span>
<LinkCard r={sg.target} compact />
<span class="meta why">{sg.why}</span>
</span>