Skip to content

feat(Port): pass highlightColor from pinAttributes to pcb_port - #1838

Closed
bimakw wants to merge 1 commit into
tscircuit:mainfrom
bimakw:feat/pinout-highlight-color
Closed

feat(Port): pass highlightColor from pinAttributes to pcb_port#1838
bimakw wants to merge 1 commit into
tscircuit:mainfrom
bimakw:feat/pinout-highlight-color

Conversation

@bimakw

@bimakw bimakw commented Jan 17, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR enables the highlightColor feature for pinout diagrams by passing the color value from pinAttributes to pcb_port:

  • Add _getPinoutHighlightColor() method: Reads highlightColor from pinAttributes configuration
  • Include highlight_color in pcb_port: Pass the color value during both initial and update renders

Test Plan

  • chip-board-pinout.test.ts passes
  • Tested with circuit-to-svg to verify color rendering

Related

Usage Example

<chip
  name="U1"
  footprint="soic8"
  pinLabels={{ pin1: "VCC", pin2: "GND" }}
  pinAttributes={{
    VCC: { includeInBoardPinout: true, highlightColor: "#ff0000" },
    GND: { includeInBoardPinout: true, highlightColor: "#00ff00" },
  }}
/>

- Add _getPinoutHighlightColor() method to read highlightColor from pinAttributes
- Include highlight_color in pcb_port data during initial and update renders
- Enables colored labels in pinout diagrams via pinAttributes configuration
@vercel

vercel Bot commented Jan 17, 2026

Copy link
Copy Markdown

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

Project Deployment Review Updated (UTC)
tscircuit-core-benchmarks Ready Ready Preview, Comment Jan 17, 2026 3:58pm

Request Review

@bimakw

bimakw commented Jan 17, 2026

Copy link
Copy Markdown
Contributor Author

@seveibar @imrishabh18 - This PR is ready for review. CI is passing. This implements the highlightColor support in Port.ts for pinout diagrams (issue #895). Companion PR: tscircuit/circuit-to-svg#482

@rushabhcodes rushabhcodes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@bimakw

bimakw commented Jan 19, 2026

Copy link
Copy Markdown
Contributor Author

Hey @seveibar, this PR has been approved by @rushabhcodes and all CI checks are passing. Ready for merge when you have a moment! 🙏

@github-actions

Copy link
Copy Markdown

This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs.

@github-actions

Copy link
Copy Markdown

This PR was closed because it has been inactive for 1 day since being marked as stale.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants