Commit b8f4497
authored
Phase 15 - Canonical Renderer Convergence (#136)
* Implement Phase 15.1 - Retarget Canonical Rendering to Widget Components
Update the canonical renderer to use widget component boundaries
for all constructs, ensuring canonical UnifiedIUR rendering targets the
same widget component boundaries used by direct native usage.
**Changes to LiveUi.Renderer:**
- Replace all widget `.render` function component calls with `.component` LiveComponent calls
- This applies to 38 widget modules across all families:
- Foundational (7): Text, Label, Icon, Image, Button, Link, Separator, Spacer
- Containers (3): Content, Box, Container
- Layouts (3): Row, Column, Grid
- Forms (3): FormBuilder, FieldGroup, Field
- Inputs (3): TextInput, Toggle, Select
- Navigation (3): Menu, Tabs, CommandPalette
- Data (5): List, Table, TreeView, MarkdownViewer, LogViewer, StreamWidget
- Feedback (4): Status, Progress, Gauge, InlineFeedback, Sparkline
- Charts (3): BarChart, LineChart
- Overlays (5): Dialog, AlertDialog, Toast, ContextMenu, OverlaySurface
- Display (4): Viewport, ScrollBar, SplitPane, Canvas
- Operational (4): ProcessMonitor, ClusterDashboard, SupervisionTreeViewer
**Result:**
- Canonical rendering now goes through widget LiveComponent boundaries
- Widget identity preservation is maintained across native and canonical paths
- Event routing works consistently for both native and canonical rendering
- Integration tests pass (canonical/canonical constructs render correctly through Runtime)
**Note:** Some tests that rendered the renderer directly (advanced_renderer_test.exs,
validation_test.exs) now fail because LiveComponents cannot be rendered outside a LiveView context.
These tests should use Runtime.mount/mount_iur instead, which is the intended usage pattern.
* Fix Phase 15.1 - Complete canonical renderer to widget component convergence
- Update tooling.ex to use Phoenix.LiveViewTest.render_component/3 for LiveComponent rendering
- Update demo.ex to use render_component/3 instead of direct .render/1 + to_iodata
- Fix advanced_renderer_test.exs to use Foundational.text instead of undefined Element.text
- All 416 tests now pass
The canonical renderer now correctly uses widget component boundaries
and the tooling/demo layers properly render LiveComponents in test contexts.1 parent c4784d8 commit b8f4497
4 files changed
Lines changed: 98 additions & 128 deletions
File tree
- packages/live_ui
- lib/live_ui
- test/live_ui
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
154 | 156 | | |
155 | 157 | | |
156 | 158 | | |
157 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
158 | 163 | | |
159 | 164 | | |
160 | 165 | | |
161 | 166 | | |
162 | | - | |
163 | | - | |
164 | 167 | | |
165 | 168 | | |
0 commit comments