Skip to content

Add ccw rotation to pcb note text#531

Open
rushabhcodes wants to merge 4 commits into
tscircuit:mainfrom
rushabhcodes:add-pcb-note-text-ccw-rotation
Open

Add ccw rotation to pcb note text#531
rushabhcodes wants to merge 4 commits into
tscircuit:mainfrom
rushabhcodes:add-pcb-note-text-ccw-rotation

Conversation

@rushabhcodes
Copy link
Copy Markdown
Contributor

What changed

  • added optional ccw_rotation support to PcbNoteText in the zod schema and exported TypeScript interface
  • added a focused test covering note text rotation parsing
  • updated generated docs to include the new field

Why

PcbNoteText was missing the optional rotation field that related PCB text shapes already support, which made note text inconsistent with the rest of the PCB text surface.

Impact

Users can now provide ccw_rotation on pcb_note_text elements without type or schema mismatches.

Validation

  • bun test tests/pcb_note_components.test.ts
  • npm run build

@rushabhcodes rushabhcodes changed the title [codex] Add ccw rotation to pcb note text Add ccw rotation to pcb note text Apr 11, 2026
@rushabhcodes rushabhcodes marked this pull request as ready for review April 11, 2026 20:46
Copilot AI review requested due to automatic review settings April 11, 2026 20:46
Comment thread tests/pcb_note_components.test.ts
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds optional counter-clockwise rotation support to PcbNoteText so PCB note text can be rotated consistently with other PCB text/shape elements.

Changes:

  • Extend PcbNoteText Zod schema + exported TypeScript interface with optional ccw_rotation.
  • Add a focused parsing test for ccw_rotation on pcb_note_text.
  • Update generated docs (README.md, docs/PCB_COMPONENT_OVERVIEW.md) to include the new field.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
tests/pcb_note_components.test.ts Adds test coverage to ensure ccw_rotation is accepted and parsed for note text.
src/pcb/pcb_note_text.ts Introduces the optional ccw_rotation field to the schema and interface.
README.md Updates published interface docs to include ccw_rotation.
docs/PCB_COMPONENT_OVERVIEW.md Updates generated component overview docs to include ccw_rotation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/pcb/pcb_note_text.ts
@rushabhcodes rushabhcodes requested review from a team and MustafaMulla29 April 11, 2026 20:56
Comment thread README.md Outdated
Copy link
Copy Markdown
Contributor

@seveibar seveibar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the motivation for this feature? It's not a bad idea for a feature, but it's not very important unless it's connected to an actual user issue

@rushabhcodes
Copy link
Copy Markdown
Contributor Author

PcbNoteText was missing the optional rotation field that related PCB text shapes already support, which made note text inconsistent with the rest of the PCB text surface.

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.

3 participants