Skip to content

Respect pcbPositionMode board anchor#2449

Open
tongzhen1 wants to merge 2 commits into
tscircuit:mainfrom
tongzhen1:codex/pcb-position-mode-board-anchor
Open

Respect pcbPositionMode board anchor#2449
tongzhen1 wants to merge 2 commits into
tscircuit:mainfrom
tongzhen1:codex/pcb-position-mode-board-anchor

Conversation

@tongzhen1

Copy link
Copy Markdown

Summary

  • use explicit pcbPositionMode when writing PCB component positioning metadata
  • treat explicit non-auto pcbPositionMode values as relatively positioned so packing does not overwrite them
  • add a regression test for pcbPositionMode="relative_to_board_anchor"

Fixes #2242

Testing

  • bun test tests/components/normal-components/pcb-position-mode.test.tsx tests/components/normal-components/pcb-component-relative-positioning1.test.tsx tests/components/normal-components/pcb-component-relative-positioning2.test.tsx
  • bun x biome check lib/components/base-components/NormalComponent/NormalComponent.ts tests/components/normal-components/pcb-position-mode.test.tsx
  • npx --yes --package typescript@5.9.3 tsc --noEmit --pretty false

Use explicit pcbPositionMode when writing PCB component positioning metadata and keep those components static during packing.
Covers pcbPositionMode="relative_to_board_anchor" surviving render and packing metadata.
@vercel

vercel Bot commented Jun 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tscircuit-core-benchmarks Ready Ready Preview, Comment Jun 14, 2026 7:35pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pcbPositionMode prop typechecks but has no runtime effect — position_mode stays 'packed'

1 participant