Split View¶
Goal¶
Enable side-by-side comparison of two frameworks (initially Django and React) with synchronized args and zoom.
Guarantees¶
- Same initial story defaults in both panes.
- Changes in controls immediately affect both panes.
- Zoom behavior remains symmetric.
- Overlay/portal behavior remains contained to each pane.
State model¶
- Single source of truth:
args. - UI mode:
django | react | split. - Derived state:
effectivePreviewModebased on adapter availability.
Rendering model¶
- Resolve active component and story.
- Hydrate default args.
- Render selected mode.
- In split mode, mount each pane with shared args bridge.
Common edge cases¶
- Story present in one adapter but missing in another.
- Different default assumptions between adapters.
- Portal content leaking outside pane container.
- Focus traps conflicting across panes.
Testing checklist¶
- Switching modes preserves args.
- Updating text/boolean/select controls syncs both panes.
- Missing React story shows placeholder only in React pane.
- Zoom reset works in single and split mode.