Repository navigation
Velle UI
daveclay edited this page Sep 29, 2026
·
2 revisions
- We're missing an abstract declarative way to describe a view that can be rendered in different places with different concrete options. For example, a list view might have different columns when rendered in different contexts.
- UI is difficult to build using re-usable agnostic components. Why?
- UI is tedious: little differences in viewing the same underlying records are important, so there end up being lots of conditionals and toggle properties that complicate things.
- Complex UI components tend to be tightly coupled to their hierarchy/surroundings: a detail view requires several properties from its list view. Redux pattern helps, if it's used correctly.
- I want a declarative UI language. Much of the UI should be built from a few base declarations.
- Split between conceptual UX and rendered UI: declare the UX: list views, detail views, how they relate, the data they reference and contain. Rendered UI moves those fields around, colors them, etc.
- "this is a list view for these kinds of models, these are the fields that may be shown"
- "a user with sufficient permissions can edit or archive a model from this view."
- "the list should be built from a search and filter component"
- "render the sort controls here, render a filter above instead of below."
- "sorting should be buttons available on each column header on the list view"
Splitting up UX from UI allows UX to be re-used, but also de-clutters UI concerns from UX concerns. It allows UI changes to be made without breaking UX rules.
- React provides a way to build separate UI components
- But they easily tend to get tightly coupled to where they're used
- Because they're UI components, not UX components (they describe visual rules rather than agnostic interactive rules)
- Re-usable UX components - describe a component as the data it shows and how it can be interacted with
- apply visual rules to UX components to build UI.
- "assemble" step that builds a frontend by applying UI declarations to various UX components
Reference
- §1 Principles
- §2 Philosophy
- §3 shape
- §4 State and commits
- §5 Scalars
- §6 Relationships (one, many)
- §7 Derived properties
- §8 Refinements (where)
- §9 Composing refinements (and, or)
- §10 Predicate expressions
- §11 rule ... when ... on ...
- §12 Assignment (mutation in place)
- §13 Exit triggers (when leaving)
- §14 for
- §15 then
- §16 Sweeps: rules fire per record
- [[§17 Schedule triggers (on )|Reference-17-Schedule-triggers]]
- §18 Run-once guards
- §19 Self-referential folds and tolerates
- §20 State-change patterns
- §21 never
- §22 Open / unresolved
Normative documents
Guides
Notes