diff --git a/README.md b/README.md index 45a9569..cc20116 100644 --- a/README.md +++ b/README.md @@ -156,9 +156,9 @@ it; in the document pane it is that document. In the browse pane: | `m` / `p` | pick nodes up — `m` again puts one back, `M` takes the whole folder — then drop them all into the folder you walk to | | `za` | fold a document's own files open under it in the list, or away again | | `Ctrl`/`Shift`-click | pick a row up / every row from the cursor to it; drag picked-up rows onto a folder, a crumb or a space | -| `S` | the plan screen — the board, the agenda and the calendar, in place of the documents and the list — or back to the documents as they were left | -| `b` | the board of this space, on the plan screen; a digit there shows another space's | -| `t` | the agenda: what is late, due this week, or in hand, on every board, on the plan screen | +| `S` | the plan screen with every view on it — the board, the agenda and the calendar, in place of the documents and the list — or back to the documents as they were left | +| `b` | the board of this space, alone on the plan screen or beside what is on it; a digit there shows another space's | +| `t` | the agenda: what is late, due this week, or in hand, on every board, alone on the plan screen or beside what is on it | | `T` | today's diary entry, started if there is none | | `C` | the diary by month (`:cal`) — see [The diary](#the-diary) | | `[d` / `]d` | the diary entry before / after the one open, by date | @@ -291,8 +291,9 @@ start as `sftp_host_key` in the data directory. ## Boards `b`, the board door on the rail, or `:board` shows the board of the space -being browsed on the plan screen, beside the agenda and the calendar, and `q` -or `Esc` goes back to the documents. Every space has one except the +being browsed on the plan screen — alone, or beside the views already there — +and `q` or `Esc` closes it again; closing the last view goes back to the +documents. Every space has one except the diary — a journal has no backlog — and `:set board` / `:set noboard` changes that for the space you are in (the dimmed board door on the rail does the same). A new board starts with `backlog`, `doing` and `done`, and the columns mean diff --git a/docs/wiki/Boards-and-Agenda.md b/docs/wiki/Boards-and-Agenda.md index f2140de..90c67af 100644 --- a/docs/wiki/Boards-and-Agenda.md +++ b/docs/wiki/Boards-and-Agenda.md @@ -4,22 +4,25 @@ The board, the agenda, the [calendar](Diary.md#the-calendar) and the back of a card are views, and they have a screen of their own: the plan. `S` (or -`:plan`) goes there — the board on the left, the agenda over the calendar on -the right, and no list — and back to the documents, which wait behind it as -they were left. The views are tiles like the documents', walked the same way. +`:plan`) goes there with all three on it — the board on the left, the agenda +over the calendar on the right, and no list — and back to the documents, which +wait behind it as they were left. `b`, `t` and `C` go there with their own view +alone, and on the plan they add it beside what is there. The views are tiles +like the documents', walked the same way, and `q` closes one as it closes a +document; closing the last goes back to the documents. ![The board, the agenda and the calendar](../images/board.png) | key | what it does | | --- | --- | -| `S` | to the plan screen, or back to the documents | -| `b`, `t`, `C` | to the board, the agenda or the calendar, on the plan screen | +| `S` | to the plan screen with every view on it, or back to the documents | +| `b`, `t`, `C` | the board, the agenda or the calendar: alone on the plan screen, or beside what is on it | | `gt` / `gT` | the next / previous tile | | `Ctrl-h` / `Ctrl-j` / `Ctrl-k` / `Ctrl-l` | the tile that way | | `l` past the last list, `h` in the agenda, `j` past its end | on into the tile beside | | `f` | the focused tile fills the screen; again or `Esc` to leave | | `1` … `9` | switch space; the plan stays, and the board shows that space's | -| `q`, `Esc` | from a card's back to the board; from the board, the agenda or the calendar back to the documents | +| `q`, `Esc` | close the focused view — a card's back goes back to the board; the last view back to the documents | The keys go to the tile with focus, which wears the light border and its key lit in its head; the other views keep their cursors, dimmed. What is opened @@ -28,14 +31,14 @@ is a document, so it opens on the documents' screen, beside what is there, and `S` comes back to the plan. Each view is read again whenever it is gone to. The plan is the same in every space, the way the desktop's special workspace -stays up: a digit on the board shows that space's board, with the agenda still -beside it. Each space keeps its own documents behind it, and they are there +stays up: a digit on the board shows that space's board, with whatever was +beside it still there. Each space keeps its own documents behind it, and they are there again on going back. ## The board Every space except the diary has a board. `b`, the board button on the rail, or -`:board` shows it on the plan screen, and `q` or `Esc` goes back to the documents. +`:board` shows it on the plan screen, and `q` or `Esc` closes it again. It is the board of the space being browsed, or, in a space without one such as the diary, the last board shown. The head of the board names every space that has one, with the digit that goes there. diff --git a/docs/wiki/Commands.md b/docs/wiki/Commands.md index 0ac34b7..6d09d4f 100644 --- a/docs/wiki/Commands.md +++ b/docs/wiki/Commands.md @@ -43,13 +43,13 @@ arguments and `↑` / `↓` recall earlier lines. | `za` | a document's own files, folded open under it in the list — again folds them away; p drops marked files in there | | `M` | pick up the whole folder — again puts it all back | | `Ctrl / Shift-click` | pick a row up · every row up to it — drag them onto a folder | -| `S` | the plan screen: the board, the agenda and the calendar, in place of the documents and the list — S again goes back to the documents as they were | -| `t` | agenda — late, due this week, in hand, on every board — on the plan screen | +| `S` | the plan screen with every view on it: the board, the agenda and the calendar, in place of the documents and the list — S again goes back to the documents as they were | +| `t` | agenda — late, due this week, in hand, on every board — on the plan screen, alone or beside what is there | | `T` | today's diary entry, started if there is none — from templates/day when the diary has one | -| `C` | the diary by month, on the plan screen: h/l a day, j/k a week, H/L a month, . today, Enter opens or starts the day among the documents | +| `C` | the diary by month, on the plan screen, alone or beside what is there: h/l a day, j/k a week, H/L a month, . today, Enter opens or starts the day among the documents | | `[d / ]d` | the diary entry before / after the one open, by date | | `Ctrl-P` | go to anything by its name, in every space — words before the last narrow the path, as in proj/ingest; Tab or Ctrl-N/P walk, Enter goes | -| `b` | the board, on the plan screen: this space's, or the last one shown — 1 … 9 there shows another's | +| `b` | the board, on the plan screen, alone or beside what is there: this space's, or the last one shown — 1 … 9 there shows another's | | `c` | capture a card into this space's inbox, without leaving here — reading a document, a card about it; Tab on the line makes it a note, or a line in today's entry | | `Esc · q` | close the document, and its tile when there are several — Esc first puts down what m picked up, and in the list lets go of a search | | `/` | full-text search, inside the current space and its text files — Tab takes it to every space, Ctrl-N/P walk the results, Enter opens one, Esc gives up | @@ -63,7 +63,7 @@ arguments and `↑` / `↓` recall earlier lines. | `Ctrl-S` | save, from anywhere | | `?` | this screen — the keys to start with, then on a second ? every key and command; h/l a column, / filters it down | | `,` | the settings sheet: vim and the clipboard, the vault, the backup, signed-in browsers, ssh keys, capture tokens | -| `q · Esc` | on the plan screen: from a card's back to the board, from the board, the agenda or the calendar back to the documents | +| `q · Esc` | on the plan screen: the view goes, and the plan stays while anything is left on it — a card's back goes back to the board, the last view back to the documents | ### On a board @@ -154,8 +154,8 @@ whole workspace. A command that does a second thing takes a word for it: | command | what it does | | --- | --- | -| `:board` | this space's board, on the plan screen — the last one shown when this space has none | -| `:plan, :special` | the plan screen: the board, the agenda and the calendar, in place of the documents — S goes there and back again; 1 … 9 on the board picks the board | +| `:board` | this space's board, on the plan screen, alone or beside what is there — the last one shown when this space has none | +| `:plan, :special` | the plan screen with every view on it: the board, the agenda and the calendar, in place of the documents — S goes there and back again; 1 … 9 on the board picks the board | | `:card, :c [title]` | add a card — reading a document, one about it, titled after it unless named, and gf on it comes back; on the board to the list under the cursor, elsewhere to this space's inbox | | `:due ` | due date of the card in focus — on the board, its back, in the agenda, or the open document's: today, tm, fri, +3d, +2w, 10-31, 2026-10-31 — - clears | | `:repeat ` | once the card is done, a copy comes back in the inbox: daily, weekly, monthly, yearly, +3d, +2w, +6m — - stops it | @@ -196,7 +196,7 @@ whole workspace. A command that does a second thing takes a word for it: | command | what it does | | --- | --- | -| `:close, :clo` | close the focused tile — q while reading; on the plan screen, back to the documents; asks when its draft could not be written | +| `:close, :clo` | close the focused tile — q while reading; on the plan screen the view, and the last one back to the documents; asks when its draft could not be written | | `:only, :on` | close every tile but the focused one | | `:ls, :buffers, :files` | list the open tiles, % on the focused one | | `:buffer, :b ` | focus a tile by its number in :ls, or by the start of its name | diff --git a/docs/wiki/Getting-Started.md b/docs/wiki/Getting-Started.md index 8fd223f..8c1f323 100644 --- a/docs/wiki/Getting-Started.md +++ b/docs/wiki/Getting-Started.md @@ -72,7 +72,7 @@ The rail of buttons on the right does the same as the keys, for a mouse. `h` comes back up. 6. Press `c`, type `try the board`, and press `Enter`. That is a card in the inbox of this space's board. Press `b` to see the board on the plan screen, - beside the agenda and the calendar, and `Esc` to go back to the documents. + `t` to put the agenda beside it, and `Esc` twice to go back to the documents. `S` goes to the plan and back; `Ctrl-h`/`j`/`k`/`l` walk between the tiles. 7. Press `T`. That is today's diary entry, started for you. 8. Press `?` for the list of every key and command. `h` / `l` walk its columns, `/` narrows it down, and `Esc` closes it. diff --git a/docs/wiki/Guide.md b/docs/wiki/Guide.md index 6573a72..73d46b9 100644 --- a/docs/wiki/Guide.md +++ b/docs/wiki/Guide.md @@ -25,7 +25,9 @@ beside the documents, or belongs to the one document it was put into. They are shown on two screens. The **documents** screen has the list on the left and the documents open in tiles beside it. The **plan** screen has the board, the agenda and the calendar, and a card turned over. `S` goes from one to -the other, and each keeps what was on it. The scratchpad comes down over either. +the other, with every view on the plan, and the documents keep what was on them. +`b`, `t` and `C` open the plan on their own view alone, or add it beside what is +there; `q` closes one view at a time. The scratchpad comes down over either. ## Morning: what needs you diff --git a/web/src/lib/actions.ts b/web/src/lib/actions.ts index a8541fd..f0668ce 100644 --- a/web/src/lib/actions.ts +++ b/web/src/lib/actions.ts @@ -565,7 +565,7 @@ export const actions: { [C in Context]: Record, Run> } = { calendar: () => void runCommand('cal'), // `S`, as the desktop's special workspace is bound: the plan screen — // the board, the agenda and the calendar — and back to the documents. - // `b`, `t` and `C` go there too, to their own view. + // `b`, `t` and `C` go there with their own view alone, or add it beside. plan: () => void runCommand('plan'), line: () => line(':'), help: () => void runCommand('help'), diff --git a/web/src/lib/commands.ts b/web/src/lib/commands.ts index 6eb7441..110e661 100644 --- a/web/src/lib/commands.ts +++ b/web/src/lib/commands.ts @@ -605,14 +605,14 @@ export const commands: CommandSpec[] = [ { name: 'board', group: 'board', - help: "this space's board, on the plan screen — the last one shown when this space has none", + help: "this space's board, on the plan screen, alone or beside what is there — the last one shown when this space has none", run: () => workspace.guard(() => workspace.tiles.show('board')), }, { name: 'plan', aliases: ['special'], group: 'board', - help: 'the plan screen: the board, the agenda and the calendar, in place of the documents — S goes there and back again; 1 … 9 on the board picks the board', + help: 'the plan screen with every view on it: the board, the agenda and the calendar, in place of the documents — S goes there and back again; 1 … 9 on the board picks the board', run: () => workspace.guard(() => workspace.tiles.togglePlan()), }, { @@ -888,7 +888,7 @@ export const commands: CommandSpec[] = [ name: 'close', aliases: ['clo'], group: 'tiles', - help: 'close the focused tile — q while reading; on the plan screen, back to the documents; asks when its draft could not be written', + help: 'close the focused tile — q while reading; on the plan screen the view, and the last one back to the documents; asks when its draft could not be written', run: () => workspace.guard(async () => { await workspace.drafts.flushTile() diff --git a/web/src/lib/keymap.ts b/web/src/lib/keymap.ts index cb0d29d..7aaa11c 100644 --- a/web/src/lib/keymap.ts +++ b/web/src/lib/keymap.ts @@ -108,14 +108,14 @@ export const bindings = [ { context: 'tree', keys: ['za'], action: 'files', help: "a document's own files, folded open under it in the list — again folds them away; p drops marked files in there" }, { context: 'tree', keys: ['M'], action: 'markAll', help: 'pick up the whole folder — again puts it all back' }, { context: 'tree', label: 'Ctrl / Shift-click', help: 'pick a row up · every row up to it — drag them onto a folder' }, - { context: 'global', keys: ['S'], action: 'plan', help: 'the plan screen: the board, the agenda and the calendar, in place of the documents and the list — S again goes back to the documents as they were', essential: true }, - { context: 'global', keys: ['t'], action: 'agenda', help: 'agenda — late, due this week, in hand, on every board — on the plan screen', essential: true }, + { context: 'global', keys: ['S'], action: 'plan', help: 'the plan screen with every view on it: the board, the agenda and the calendar, in place of the documents and the list — S again goes back to the documents as they were', essential: true }, + { context: 'global', keys: ['t'], action: 'agenda', help: 'agenda — late, due this week, in hand, on every board — on the plan screen, alone or beside what is there', essential: true }, { context: 'global', keys: ['T'], action: 'today', help: "today's diary entry, started if there is none — from templates/day when the diary has one", essential: true }, - { context: 'global', keys: ['C'], action: 'calendar', help: 'the diary by month, on the plan screen: h/l a day, j/k a week, H/L a month, . today, Enter opens or starts the day among the documents' }, + { context: 'global', keys: ['C'], action: 'calendar', help: 'the diary by month, on the plan screen, alone or beside what is there: h/l a day, j/k a week, H/L a month, . today, Enter opens or starts the day among the documents' }, { context: 'tree', keys: ['[d'], action: 'previousEntry', label: '[d / ]d', help: 'the diary entry before / after the one open, by date' }, { context: 'tree', keys: [']d'], action: 'nextEntry' }, { context: 'global', keys: ['Ctrl-p'], action: 'find', label: 'Ctrl-P', help: 'go to anything by its name, in every space — words before the last narrow the path, as in proj/ingest; Tab or Ctrl-N/P walk, Enter goes', essential: true }, - { context: 'global', keys: ['b'], action: 'board', help: "the board, on the plan screen: this space's, or the last one shown — 1 … 9 there shows another's" }, + { context: 'global', keys: ['b'], action: 'board', help: "the board, on the plan screen, alone or beside what is there: this space's, or the last one shown — 1 … 9 there shows another's" }, { context: 'tree', keys: ['c'], action: 'capture', help: "capture a card into this space's inbox, without leaving here — reading a document, a card about it; Tab on the line makes it a note, or a line in today's entry", essential: true }, { context: 'tree', keys: ['q'], action: 'close', label: 'Esc · q', help: 'close the document, and its tile when there are several — Esc first puts down what m picked up, and in the list lets go of a search', essential: true }, { context: 'tree', keys: ['Escape'], action: 'escape' }, @@ -141,7 +141,7 @@ export const bindings = [ { context: 'writing', keys: ['*'], action: 'refocus' }, // --- what the views share: the board, the agenda, the calendar, a card's back - { context: 'views', keys: ['q', 'Escape'], action: 'close', label: 'q · Esc', caps: ['q'], hint: 'close', help: "on the plan screen: from a card's back to the board, from the board, the agenda or the calendar back to the documents" }, + { context: 'views', keys: ['q', 'Escape'], action: 'close', label: 'q · Esc', caps: ['q'], hint: 'close', help: "on the plan screen: the view goes, and the plan stays while anything is left on it — a card's back goes back to the board, the last view back to the documents" }, // --- on a board --------------------------------------------------------------- { context: 'board', keys: ['h', 'ArrowLeft'], action: 'left', label: 'h / l', caps: ['h', 'j', 'k', 'l'], hint: 'move', help: 'to the list left / right — right of the last, to the tile beside' }, diff --git a/web/src/lib/state/tiles.svelte.ts b/web/src/lib/state/tiles.svelte.ts index 69f8c4b..5e3e602 100644 --- a/web/src/lib/state/tiles.svelte.ts +++ b/web/src/lib/state/tiles.svelte.ts @@ -171,11 +171,11 @@ export class Tiles { /** * `:close`: the focused tile goes, or with only one, what it shows. On the - * plan only a card's back goes; closing the board, the agenda or the - * calendar goes back to the documents. + * plan a view goes as a document's tile does, and the plan stays while + * anything is left on it; closing the last goes back to the documents. */ close() { - if (this.planning && this.current.kind !== 'card') return this.leavePlan() + if (this.planning && this.all.length === 1) return this.leavePlan() this.ws.drafts.leaveCard() this.current.clear() this.prune() @@ -219,11 +219,13 @@ export class Tiles { /* * The views — the board, the agenda, the calendar, a card's back — are - * the tiles of the plan screen. Each is read again whenever it is gone to: - * it is looked at in passing, and what it says should be what is true now. + * the tiles of the plan screen. The plan opens on the one asked for, and + * the others come beside it when they are asked for in turn. Each is read + * again whenever it is gone to: it is looked at in passing, and what it + * says should be what is true now. */ - /** The views the plan screen holds, in the order they are tiled. */ + /** The views `S` puts on the plan screen, in the order they are tiled. */ static readonly PLAN: View[] = ['board', 'agenda', 'calendar'] /** The other screen on show, and this one put away as it is. */ @@ -237,14 +239,12 @@ export class Tiles { this.planning = !this.planning } - /** To the plan screen, with every view on it, from wherever the documents were. */ - enterPlan() { + /** To the plan screen, with `kinds` on it and nothing else, from wherever the documents were. */ + enterPlan(kinds: View[]) { if (this.planning) return this.ws.drafts.leaveCard() this.swap() - const cards = this.all.filter((tile) => tile.kind === 'card') - this.all = [...Tiles.PLAN.map((kind) => this.view(kind) ?? new Tile(kind)), ...cards] - this.focused = Math.min(this.focused, this.all.length - 1) + this.replace(kinds.map((kind) => new Tile(kind))) this.ws.pane = 'document' } @@ -258,21 +258,25 @@ export class Tiles { if (!this.current.empty) this.focusOn(this.focused) } - /** `b`, `t`, `C`, Enter on a card: to the plan screen, and that view on it focused. */ - async show(kind: View) { - // Coming to the plan, every view on it is read again, not only this one. - const kinds = this.planning ? [kind] : Tiles.PLAN + /** + * `b`, `t`, `C`, Enter on a card: that view focused on the plan screen — + * alone on it when coming from the documents, beside what is there when + * already on it. + */ + async show(kind: View, all = false) { + // Coming to the plan, every view put on it is read again, not only this one. + const kinds = all ? Tiles.PLAN : [kind] await Promise.all(kinds.map((each) => this.loadView(each))) - this.enterPlan() - if (!this.view(kind)) this.all.push(new Tile(kind)) + this.enterPlan(kinds) + if (!this.view(kind)) this.add(new Tile(kind)) this.focusOn(this.all.indexOf(this.view(kind)!)) if (kind === 'board' && this.ws.cards.boardSpaceId === null) this.ws.say('no space has a board — :set board turns one on', 'error') } - /** `S`: the plan screen with the board focused, or back to the documents. */ + /** `S`: the plan screen with every view on it and the board focused, or back to the documents. */ async togglePlan() { if (this.planning) return this.leavePlan() - await this.show('board') + await this.show('board', true) } /** Read again what a view shows. */