Summary
Design and implement support for callbacks that modify other primitives (e.g. a List item selection that updates a Table and a TextView). This requires shared references or imperative update hooks, which clash with YAML's declarative nature.
Background
Discovered while planning a tview presentation demo implementation via tviewyaml. The Table slide has a List whose items call functions that change the Table's borders, separator, selectable mode, and the code TextView's content.
Demo Usage
Table slide list items modify table and code TextView; requires shared refs; YAML is declarative.
Proposed Approach
- Option A: Add
ref or name to primitives; provide template functions like updateTable(ref, ...) or setTextViewText(ref, text) that the builder registers
- Option B: Allow
onSelected to receive a multi-step action that updates state consumed by other primitives (reactive)
- Option C: Document as a known limitation; complex demos may need custom Go code
Relevant Files
config/types.go – name/ref for primitives
builder/builder.go – register named primitives in context
template/builtins.go – imperative update functions
docs/tview-coverage.md – document approach or limitation
Summary
Design and implement support for callbacks that modify other primitives (e.g. a List item selection that updates a Table and a TextView). This requires shared references or imperative update hooks, which clash with YAML's declarative nature.
Background
Discovered while planning a tview presentation demo implementation via tviewyaml. The Table slide has a List whose items call functions that change the Table's borders, separator, selectable mode, and the code TextView's content.
Demo Usage
Table slide list items modify table and code TextView; requires shared refs; YAML is declarative.
Proposed Approach
refornameto primitives; provide template functions likeupdateTable(ref, ...)orsetTextViewText(ref, text)that the builder registersonSelectedto receive a multi-step action that updates state consumed by other primitives (reactive)Relevant Files
config/types.go–name/reffor primitivesbuilder/builder.go– register named primitives in contexttemplate/builtins.go– imperative update functionsdocs/tview-coverage.md– document approach or limitation