githubnext/chopinPublic

Let's compose rich plans together

Take the reader to the prose a decision points at

Clicking a sidecar card did nothing. Everything needed to go somewhere was
already resolved — a thread's places, a question's relations, both as Lexical
keys — and the only consumer was the hover wash. A question even rendered a
real "Show in plan" button, with a pointer cursor and a count of how many
places it would reach, calling an `onRelationSelect` that no caller supplied.

The quote is the affordance, in both halves: a button when the card has
somewhere to send one, a blockquote when it has not. It matters most for an
accepted comment, where a `<Decision>` draws nothing in the prose and the pane
is the whole of where the decision can be seen. Not the whole card — a card
holds a reply box, an Accept and a Dismiss, and making it a link would mean
deciding on every click which the reader meant.

A click also pins the wash for five seconds, because arriving somewhere is not
the same as being told which block was meant and the hover is over by the time
the click has landed. There is one pin, in `marks.ts`, since a reader has one
pointer; a hover borrows it and gives it back. Clicking again walks to the next
place a decision produced, and the step belongs to the pin: a lapsed pin starts
the walk over rather than jumping to the third block with nothing to say why.

The tabs called `onRelationSelect` too, which was harmless while it was
undefined and would have become the plan scrolling out from under somebody
stepping through them to read. A tab switches tabs now.
KCKrzysztof Cieslak authored committed by Krzysztof Cieślak
9441f4fPatch
Parent6b147f5
12 files changed+655-54
StackedSplit
agents.md+35 −0
packages/editor/src/comments.tsx+52 −6
packages/editor/src/decisions.tsx+19 −8
packages/editor/src/marks.test.ts+89 −2
packages/editor/src/marks.ts+127 −16
packages/editor/src/places.test.ts+135 −1
packages/editor/src/questionnaires.ts+68 −8
packages/editor/src/scroll.ts+57 −0
packages/editor/src/threads.ts+48 −4
packages/editor/src/widgets/questionnaire.tsx+13 −3
packages/question/src/react/question-view.tsx+8 −6
readme.md+4 −0