Repository navigation
Reproduce arbitrary silkscreen rectangle rotation - #4274
Merged
seveibar merged 4 commits intoOct 2, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
anil08607
commented
Oct 2, 2026
| <silkscreenrect | ||
| width={6} | ||
| height={2} | ||
| // @ts-expect-error pcbRotation is missing from the current props types. |
Contributor
Author
There was a problem hiding this comment.
API/props support tscircuit/props#884
Required for conversion tscircuit/circuit-json-to-tscircuit#119
seveibar
approved these changes
Oct 2, 2026
Contributor
|
Thank you for your contribution! 🎉 PR Rating: ⭐⭐ Track your contributions and see the leaderboard at: tscircuit Contribution Tracker |
This branch was successfully deployed
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.
A 6 × 2 mm
<silkscreenrect>withpcbRotation={30}orpcbRotation={45}renders horizontally instead of following its requested rotation.Adds a passing snapshot reproduction with explicit, labelled examples for 30°, 45°, 0°, 90° and 180°. Every rectangle has its props directly on the JSX component. The snapshot records the current output: the two incorrect arbitrary rotations alongside three working controls. There are no expected-failure tests or rotation assertions; the implementation fix can update the snapshot.
The current props types omit
pcbRotation, so each requested rotation has a narrow@ts-expect-errorcomment. These comments can be removed when props support lands.Requested in the review of props #884. This PR changes only the reproduction test and its snapshot. Proposed implementation: #4265. Converter mapping: tscircuit/circuit-json-to-tscircuit#119.
Validation: the reproduction and existing rectangle/rotation tests pass (4 tests), along with the targeted TypeScript check and Biome formatting. The existing snapshot passes unchanged.