Phase 15 - Canonical Renderer Convergence - #136
Merged
Conversation
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.
…ergence - 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements Phase 15 of the LiveUi implementation plan: Canonical Renderer Convergence.
This phase ensures that the canonical
UnifiedIURrendering targets the same widget component boundaries used by direct native usage for all supported constructs.Changes
Phase 15.1 - Retarget Canonical Rendering to Widget Components
LiveUi.Rendererto use.component/1(LiveComponent) instead of.render/1(function component) for all 38 widget modulestooling.exto usePhoenix.LiveViewTest.render_component/3for proper LiveComponent rendering in test contextsdemo.exto userender_component/3instead of direct.render/1+to_iodataadvanced_renderer_test.exsto useFoundational.text/2instead of undefinedElement.text/2Phase 15.2 - Canonical Event Transport Alignment
Phase 15.3 - Integration Tests for Convergence
Test Results
All 416 tests pass, including:
Breaking Changes
None. The canonical renderer now uses widget LiveComponents, but the external API remains unchanged.
Related
.spec/planning/live_ui/phase-15-canonical-renderer-convergence.md