Use Case
Support mounting vui components inline within an existing buffer (at point), rather than taking over a dedicated buffer. The primary use case is ephemeral, disposable forms for interactive documents.
Example Workflow
From a discussion on HN:
Say the devops document says "". That button is simple enough. You can evaluate this and get a buffer, or like org-babel, insert the output into a block inline. Now we want to extend the functionality: we want parameterization, but without breaking flow. So here I'm thinking of injecting a disposable form at cursor.
The flow would be:
- User activates a button/link in a document
- Small form expands inline at point (e.g., server selector, filters)
- User fills in parameters, submits
- Form vanishes, action executes, result appears (inline or in separate buffer)
Why This Matters
"Structured, validated input for in-document interaction" — combining the power of org-mode/Jupyter-style interactive documents with proper form validation, without breaking text flow or switching to modals.
Current State
vui.el currently mounts to a dedicated buffer via vui-mount. This feature would add something like:
(vui-insert-at-point component
:on-submit (lambda (data)
(vui-unmount-inline)
(do-something-with data)))
Considerations
- Interaction with host buffer's text properties
- Undo handling
- Widget protection (the gist's
widget-before-change advice complexity)
- Cleanup when form is dismissed
For ephemeral forms that clean up after themselves, this should be simpler than persistent multi-form scenarios.
Related
Use Case
Support mounting vui components inline within an existing buffer (at point), rather than taking over a dedicated buffer. The primary use case is ephemeral, disposable forms for interactive documents.
Example Workflow
From a discussion on HN:
The flow would be:
Why This Matters
"Structured, validated input for in-document interaction" — combining the power of org-mode/Jupyter-style interactive documents with proper form validation, without breaking text flow or switching to modals.
Current State
vui.el currently mounts to a dedicated buffer via
vui-mount. This feature would add something like:Considerations
widget-before-changeadvice complexity)For ephemeral forms that clean up after themselves, this should be simpler than persistent multi-form scenarios.
Related