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:
1 parent
9b73cdb15e
commit
32efa17294
9 files changed
+1269
-55
No files matched your search
+9
-1
@@ -182,6 +182,7 @@ export function NoteView({ v, inNote }: { v: VNote; inNote: boolean }) {
|
||||
const kids = v.id ? sections(snap, v.id) : [];
|
||||
return (
|
||||
<span class={`${v.form === "passage" || inNote ? "inset" : "sidenote"}${cls}`} data-node={v.id}>
|
||||
{v.id && <button type="button" class="more" data-more="note" tabIndex={-1} aria-haspopup="menu" title="More for this note (right-click works too)">⋯</button>}
|
||||
{meta}
|
||||
{content}
|
||||
{kids.length > 0 && <Outline ids={kids} />}
|
||||
@@ -357,7 +358,12 @@ export function Flags({ id }: { id: NodeId }) {
|
||||
n.pinned && n.parent && "locked",
|
||||
].filter(Boolean) as string[];
|
||||
if (!flags.length) return null;
|
||||
return <span class={`flags${st.up || st.down || conflict ? " attn" : ""}`}>{flags.join(" · ")}</span>;
|
||||
// A stale flag says what to do about it when clicked: the node's menu, its remedies first.
|
||||
return (
|
||||
<span class={`flags${st.up || st.down || conflict ? " attn" : ""}`} data-more={st.up || st.down ? "flag" : undefined} title={st.up || st.down ? "What to do about it" : undefined}>
|
||||
{flags.join(" · ")}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
/** Redraws a section only when something in its subtree changed. */
|
||||
@@ -378,6 +384,7 @@ export function Row({ id, open, leaf, editing }: { id: NodeId; open: boolean; le
|
||||
<span class="mark">{open ? "▾" : leaf ? "·" : "▸"}</span>
|
||||
{editing ? <TitleEditor id={id} /> : <span class="title">{n.title || <i class="untitled">untitled</i>}</span>}
|
||||
<Flags id={id} />
|
||||
<button type="button" class="more" data-more="row" tabIndex={-1} aria-haspopup="menu" title="More for this section (right-click works too)">⋯</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -456,6 +463,7 @@ export function TopMatter({ id }: { id: NodeId }) {
|
||||
: `${library ? `${kids.length} document${kids.length === 1 ? "" : "s"}` : `${kids.length} section${kids.length === 1 ? "" : "s"}`} · ${count} nodes`}{" "}
|
||||
· branch {store.repo.current}
|
||||
<Flags id={id} />
|
||||
<button type="button" class="more" data-more="page" tabIndex={-1} aria-haspopup="menu" title="More for this page (right-click works too)">⋯</button>
|
||||
</div>
|
||||
</header>
|
||||
<div class={`abstract${prompt ? " seed" : ""}${folded ? " folded" : ""}`} onClick={folded ? () => store.toggleFold(id) : undefined}>
|
||||
|
||||
Reference in new issue
Block a user