Skip to content

Rename insertionDirection front/back to top/bottom and add axis aliases - #773

Merged
seveibar merged 1 commit into
tscircuit:mainfrom
addibble:feat/insertion-direction-canonical-axes
Aug 2, 2026
Merged

Rename insertionDirection front/back to top/bottom and add axis aliases#773
seveibar merged 1 commit into
tscircuit:mainfrom
addibble:feat/insertion-direction-canonical-axes

Conversation

@addibble

@addibble addibble commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Follows the matching Circuit JSON change. The +/-Y values are renamed from "from_front"/"from_back" to "from_top"/"from_bottom" so every name is read off the footprint as drawn in the 2D PCB view, "from_below" (-Z) is added to pair with "from_above" (+Z), and each direction gains an equivalent Cartesian spelling ("from_y+", "from_x-", ...).

FootprintInsertionDirection is now an alias of Circuit JSON's InsertionDirectionInput so the two lists cannot drift apart; expectTypesMatch fails the build if the local z.enum stops agreeing with it.

Both spellings are kept in the prop type rather than normalized here, because FootprintProps is the type JSX authors write against. Core normalizes to the six named values before writing pcb_component.insertion_direction.

@addibble
addibble force-pushed the feat/insertion-direction-canonical-axes branch 2 times, most recently from 859c7e7 to d067cba Compare August 2, 2026 19:39
Follows the matching Circuit JSON change. The +/-Y values are renamed from
"from_front"/"from_back" to "from_top"/"from_bottom" so every name is read off
the footprint as drawn in the 2D PCB view, "from_below" (-Z) is added to pair
with "from_above" (+Z), and each direction gains an equivalent Cartesian
spelling ("from_y_pos", "from_x_neg", ...).

"from_front" and "from_back" remain accepted as deprecated spellings so
existing sources keep compiling.

FootprintInsertionDirection is now an alias of Circuit JSON's
InsertionDirectionInput so the two lists cannot drift apart; expectTypesMatch
fails the build if the local z.enum stops agreeing with it.

Every spelling is kept in the prop type rather than normalized here, because
FootprintProps is the type JSX authors write against; normalizing would make
the aliases impossible to write. Core normalizes to the six named values
before writing pcb_component.insertion_direction.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@addibble
addibble force-pushed the feat/insertion-direction-canonical-axes branch from d067cba to e076e67 Compare August 2, 2026 20:16
@seveibar
seveibar merged commit e2f8251 into tscircuit:main Aug 2, 2026
4 checks passed
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.

2 participants