githubnext/chopinPublic

Let's compose rich plans together

Add <Decision> and <Note> to the plan dialect

An accepted comment thread is projected into the plan so the source carries
the decision when read alone. Atomic like a questionnaire: the record beside
the plan owns the thread, and an accepted one is frozen, so there is nothing
inside for two people to edit.

A note's text is an attribute rather than children, following <Answer>. A flow
component's children parse as blocks, so prose written between the tags comes
back wrapped in a paragraph and flattens on the way out — which the plan's
round-trip check rejects the whole document for. Attributes round-trip
newlines, quotes and angle brackets exactly, and the quote delimiter is
escaped, so a note cannot break out into a second component.

Renders as nothing inline: the card belongs in the sidecar.
KCKrzysztof Cieslak authored committed by Krzysztof Cieślak
e4a4bdcPatch
Parent21baf72
11 files changed+422-2
StackedSplit
packages/dialect/src/dialect.test.ts+28 −0
packages/dialect/src/dialect.ts+39 −0
packages/dialect/src/index.ts+3 −0
packages/dialect/src/limits.ts+12 −0
packages/dialect/src/nodes/decision.test.ts+100 −0
packages/dialect/src/nodes/decision.ts+199 −0
packages/dialect/src/registry.test.ts+4 −0
packages/dialect/src/registry.ts+18 −0
packages/editor/src/styles.css+2 −1
packages/editor/src/widgets/decision.tsx+14 −0
packages/editor/src/widgets/index.ts+3 −1