feat: map knockout props in SilkscreenText component#1886
feat: map knockout props in SilkscreenText component#1886bimakw wants to merge 6 commits intotscircuit:mainfrom
Conversation
a200ed0 to
91951db
Compare
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs. |
|
Still active. All CI passing, no conflicts. This maps the knockout props (is_knockout + knockout_padding) to pcb_silkscreen_text in circuit-json. Companion PR will be resubmitted on circuit-to-svg. @seveibar would appreciate a review when you get a chance. |
seveibar
left a comment
There was a problem hiding this comment.
knockout text does not appear as knockout text
|
Companion PR resubmitted: tscircuit/circuit-to-svg#506 (rebased on latest main, #495 was stale-closed). |
|
Sorry @bimakw, i see that you have a companion PR, that needs to be merged first |
|
Got it! Yeah the knockout rendering lives in circuit-to-svg#506 — once that's merged and published, the core snapshot will show the actual knockout effect. Could you review #506 first? |
7b1984a to
43c2a14
Compare
|
Updated — circuit-to-svg bumped to 0.0.327 (includes the merged #506) and regenerated the knockout snapshot. The silkscreen text now renders with the actual SVG mask knockout effect. Rebased on latest main too, all CI should be green. |
|
CI has 2 snapshot mismatches (repro32, repro54) — these are from circuit-to-svg 0.0.326's schematic text positioning change (#497). Snapshots render identically on macOS but slightly different on Ubuntu/CI due to font metrics. All other tests pass (780 total). Could you re-run CI with snapshot updates, or I can try regenerating in a Linux container if needed. |
|
All CI green now — regenerated the 2 schematic snapshots on Ubuntu/bun-1.3.5 via Docker to match CI font rendering. Ready for review. |
Add support for knockout silkscreen text by mapping isKnockout and knockoutPadding props to circuit-json is_knockout and knockout_padding fields. - Map isKnockout prop to is_knockout in pcb_silkscreen_text - Map knockoutPaddingLeft/Right/Top/Bottom to knockout_padding object - Add test for knockout silkscreen text Part of tscircuit/tscircuit#770
Updated dependency to include merged knockout silkscreen rendering. Snapshot now shows actual knockout effect with SVG mask.
Schematic SVG output changed slightly with the new circuit-to-svg version. All 780 tests pass with updated snapshots.
Generated via Docker (ubuntu:24.04 + bun 1.3.5) to match CI font rendering for schematic text positioning.
The knockoutPadding (uniform) prop was not being used as fallback for individual padding sides. Now knockoutPadding applies to all four sides unless overridden by individual knockoutPaddingLeft/Right/ Top/Bottom props.
7ac1e6f to
09e2680
Compare
|
Hey, rebased on latest main (v0.0.1017) and addressed the review:
Ready for re-review. |
Summary
Add support for knockout silkscreen text by mapping component props to circuit-json fields.
isKnockoutprop tois_knockoutinpcb_silkscreen_textknockoutPaddingLeft/Right/Top/Bottomprops toknockout_paddingobjectChanges
lib/components/primitive-components/SilkscreenText.ts:
knockout_paddingobject from individual padding propsis_knockoutandknockout_paddingtodb.pcb_silkscreen_text.insert()Test Plan
silkscreen-text-knockout.test.tsxverifiesis_knockout: truein databaseRelated
/claim #770
Part of tscircuit/tscircuit#770 (Pinout Diagram Improvements)
Companion PR: tscircuit/circuit-to-svg#495