Skip to content

Add support for orientation for symbols with _horz/_vert similar to the _(right|left|up|down)#2138

Merged
imrishabh18 merged 1 commit intomainfrom
codex/fix-test-for-multiple-gunn-diode-rendering
Apr 15, 2026
Merged

Add support for orientation for symbols with _horz/_vert similar to the _(right|left|up|down)#2138
imrishabh18 merged 1 commit intomainfrom
codex/fix-test-for-multiple-gunn-diode-rendering

Conversation

@imrishabh18
Copy link
Copy Markdown
Member

Motivation

  • Ensure schematic symbols that include an orientation suffix (_horz/_vert) keep the correct visual orientation after group placement rotations.

Description

  • Added logic in lib/components/primitive-components/Group/Group_doInitialSchematicLayoutMatchPack.ts to detect a symbol name suffix matching _(horz|vert).
  • Compute a normalized rotation from placement.ccwRotationDegrees and, for 90° or 270° rotations, replace the suffix to swap _horz_vert.
  • Also kept the existing behavior that rotates text positions and direction suffixes like _(right|left|up|down).
  • Updated the generated snapshot tests/repros/__snapshots__/repro108-multiple-gunn-diode-fails-to-render-schematic.snap.svg to reflect the adjusted layout/rotation output.

Testing

  • Ran the automated test suite with snapshot tests and updated the failing snapshot at tests/repros/__snapshots__/repro108-multiple-gunn-diode-fails-to-render-schematic.snap.svg; the test run succeeded.

Codex Task

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 14, 2026

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

Project Deployment Actions Updated (UTC)
tscircuit-core-benchmarks Ready Ready Preview, Comment Apr 14, 2026 0:19am

Request Review

@imrishabh18 imrishabh18 changed the title Swap symbol _horz/_vert suffix when rotating schematic components Add support for orientation for symbols with _horz/_vert similar to the _(right|left|up|down) Apr 14, 2026
@imrishabh18 imrishabh18 requested review from seveibar and removed request for seveibar April 14, 2026 12:21
@imrishabh18 imrishabh18 merged commit 524f9f9 into main Apr 15, 2026
10 checks passed
@imrishabh18 imrishabh18 deleted the codex/fix-test-for-multiple-gunn-diode-rendering branch April 15, 2026 06:20
@tscircuitbot
Copy link
Copy Markdown
Contributor


Thank you for your contribution! 🎉

PR Rating: ⭐⭐
Impact: Minor

Track your contributions and see the leaderboard at: tscircuit Contribution Tracker


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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants