feat(pcb): single-view Schematic/Board toggle for electronics#232
Merged
Conversation
The electronics workspace showed the 2D schematic as a cramped, floating 400px overlay layered on top of an always-on 3D board — ambiguous about which you were looking at. And a three-way layout enum (split/schematic-only/pcb-only) had toolbar buttons that never gated rendering. Replace both with a single-view model: one view at a time, schematic or board, flipped by a prominent top-center segmented control (and Tab). - electronics store: ElectronicsLayout is now "schematic" | "board" (default schematic); add toggleLayout; focusedPane tracks the view; drop the dead schematicDocked + splitRatio + split state - Viewport: render a full-canvas, opaque SchematicView (z-20, covering the still-mounted 3D Canvas) in schematic layout; show the board in board layout. The board HUD / length-tune (z-auto) hide behind the schematic and reappear on the board; the place palette + view toggle (z-30) stay on top of either - usePcbAutoFit: frame the board the first time the board view is shown (not on enter, since we open in schematic) so switching to Board isn't an empty camera - retire the floating SchematicOverlayPanel and the 3 split buttons Verified live: opens in schematic (full-canvas, no 3D bleed-through), toggle to Board frames the board + shows the HUD, round-trips cleanly; app build + tsc clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jun 4, 2026
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.
Why
Building a circuit in the app surfaced a real UX problem: the 2D schematic rendered as a cramped, floating 400px overlay layered on top of an always-on 3D board — you couldn't tell which you were looking at (the 2D grid and the 3D floor grid blended together). Worse, a three-way
ElectronicsLayout = split | schematic-only | pcb-onlyenum had toolbar toggle buttons that never gated rendering — dead controls.What
One view at a time: Schematic or Board, flipped by a prominent top-center segmented control (and Tab). Default is Schematic — you design the circuit, then switch to Board to place + route.
ElectronicsLayoutis now"schematic" | "board"(default schematic); addedtoggleLayout;focusedPane(which drives tool shortcuts) now tracks the visible view; dropped the deadschematicDocked+splitRatio+ split state.SchematicView(z-20) that covers the still-mounted 3D<Canvas>; in board layout it's hidden and the board shows. The board HUD / length-tune panel (z-auto) hide behind the schematic and reappear on the board for free; the place palette + view toggle (z-30) stay above either.usePcbAutoFit— frame the board the first time the board view is shown (not on enter, since we now open in schematic), so toggling to Board isn't an empty camera.SchematicOverlayPaneland the three split buttons. Net −82 lines.Verification (live in preview)
Schematic ⇄ Boardsegmented controllayout: board,focusedPane: pcb, 3D board framed (green slab + routed trace), HUD top-righttsc --noEmit+ production buildThis came directly out of dogfooding the circuit-build flow. Follow-up candidates noted while here: the onboarding "Start blank" doesn't clear an autosaved doc, and clicking a schematic pin selects the component instead of starting a wire.
🤖 Generated with Claude Code