This ticket covers a significant refactoring of Neo.code.LivePreview and Neo.component.Markdown to support robust, recursive multi-window capabilities.
Key Changes:
Resolved Relative URLs: Implemented beforeSetWindowUrl in LivePreview to resolve ./ paths against the application root. This ensures child app URLs remain valid even when the component is popped out to a new window location.
Architectural Refactor of Markdown Renderer:
- Removed legacy technical debt where Markdown.mjs modified its parent container's HTML. It now correctly manages its own html state.
- Removed the explicit context object passing. Components now rely on their own instance state (appName, windowId) for correct context resolution.
- Added windowUrl config to propagate the correct child app environment to nested LivePreview instances.
Recursive Window Support:
- Implemented afterSetWindowId in Markdown.mjs to propagate window changes to all active child components (e.g., interactive examples nested within the markdown).
- This allows for "recursive popping," where a LivePreview can be popped out, and a LivePreview inside that window can be popped out again, maintaining full functionality.
Component Lifecycle & Re-mounting:
- Updated Container.Base to force mounted = false when moving a component to a different window. This ensures wrappers (like Monaco Editor) correctly re-initialize their main-thread counterparts in the new window context.
- Hardened MonacoEditor main thread addon to gracefully handle instance lookups during window transitions.
These changes collectively ensure that complex, nested documentation views remain fully interactive and stable when moved between browser windows.
This ticket covers a significant refactoring of Neo.code.LivePreview and Neo.component.Markdown to support robust, recursive multi-window capabilities.
Key Changes:
Resolved Relative URLs: Implemented beforeSetWindowUrl in LivePreview to resolve ./ paths against the application root. This ensures child app URLs remain valid even when the component is popped out to a new window location.
Architectural Refactor of Markdown Renderer:
Recursive Window Support:
Component Lifecycle & Re-mounting:
These changes collectively ensure that complex, nested documentation views remain fully interactive and stable when moved between browser windows.