-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
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
refornameto primitives; provide template functions likeupdateTable(ref, ...)orsetTextViewText(ref, text)that the builder registers - Option B: Allow
onSelectedto 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/reffor primitivesbuilder/builder.go– register named primitives in contexttemplate/builtins.go– imperative update functionsdocs/tview-coverage.md– document approach or limitation
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels