docs(plans): json-render as an iframe view provider (plan of record) - #181
Closed
antfubot wants to merge 1 commit into
Closed
docs(plans): json-render as an iframe view provider (plan of record)#181antfubot wants to merge 1 commit into
antfubot wants to merge 1 commit into
Conversation
Capture-only design doc from a design interview. json-render becomes a
swappable, framework-agnostic iframe-hosted 'view provider' (default
@devframes/json-render-ui), registered node-side via initHub({ viewProviders })
and discovered by the client through a read-only devframe:view-providers
shared-state map. The hub UI renders a provider-backed dock as a pooled iframe
(?view=<stateKey>), materializes inline specs into an ephemeral key, and shows a
built-in empty state when a view type has no provider. Collapses the current
triple json-render implementation to one SPA reused by every UI; keeps the
in-process renderer seam for niche types. No implementation yet.
✅ Deploy Preview for devfra ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Capture-only design doc (
plans/json-render-ui-packaging.md) from a design interview — no implementation.The model
json-render becomes a swappable, framework-agnostic view provider rendered in an iframe, rather than an in-process, Vue-coupled renderer baked into the hub UI.
json-render, and any future type) → a provider SPA, registered node-side viainitHub({ viewProviders })(which mounts it through the existingmountDevframepath). Headless core keeps no json-render-ui dependency; the app wires the official provider; community swaps it.devframe:view-providersshared-state key (avoids the__index.jsonmanual-path gap). No entry for a type → the hub UI shows a built-in empty state ("nojson-renderprovider registered").frameId = provider+stateKey,?view=<stateKey>); the provider SPA reads that view off the shared socket. Inline specs are materialized by the client resolver into an ephemeral shared-state key so the iframe always gets a uniformstateKey.branding.json).Why it matters (the crux)
json-render is implemented once (
@devframes/json-render-ui's SPA) and reused by every hub UI — Vue, React, vanilla — via an iframe. The current triple implementation collapses to one; the Next example's React json-render port is deleted, not duplicated. The in-processDockRendererseam stays for niche in-process/custom types; json-render's in-process bridge is deprecated.Contents
Decision log (3 interview rounds), target package topology + composition model, and a staged PR stack (A: catalog growth → B: json-render-ui provider SPA → C: hub view-provider mechanism → D: hub-ui iframe rendering → E: examples/React-port deletion → F: later-cycle deprecation removal), including interactions with the open branding PRs #176/#177.
Supersedes the first draft in the same file (which had hub-ui reuse json-render-ui in-process). Follows the
plans/"plan of record" convention. Implementation is deliberately deferred pending sign-off.Created with the help of an agent.