[LLV] Kanban demo server sync#641
Draft
mat-hek wants to merge 9 commits into
Draft
Conversation
Pull the per-view fake-root-view wiring out of the startup scan's inline loop into a reusable setupFakeView(el, initialRendered), guarded on viewsById so a repeat call for the same element is a no-op. Add a viewSpec helper (which reads the serialized data-pop-assigns) and have the scan build its payload from it. Groundwork for spawning and tearing down views after startup. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Give local views a stable, deterministic mount-point id and a phx-hook, then drive their lifecycle from it so views the host LiveView adds, re-renders, or removes after startup are handled: - updated(): forward changed data-pop-assigns to the runtime via a new llv_update_assigns dispatcher event and an update_assigns server handler (guarded with function_exported?, so plain views are unaffected) - mounted(): start views added after the initial scan (gated on Popcorn readiness; the idempotent setupFakeView keeps any overlap a no-op) - destroyed(): stop the view's runtime process via a new llv_destroy event and drop its fake view Pages without a host LiveView never fire hooks and keep using the startup scan only. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Introduce the LocalComponent abstraction: a local view with LiveComponent-style mount/1 and update/2 callbacks that takes assigns from the hosting server LiveView. It is seeded on mount, and update/2 re-runs whenever the server re-renders with changed assigns — wired through the __llv_update__ entrypoint the server calls and a phx-hook on the component's mount point. Convert the kanban example to a server LiveView that re-seeds the board this way, and document the flow. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
4e48cf2 to
db13eed
Compare
db13eed to
b0e9cd7
Compare
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.
No description provided.