fix: preserve source pin labels in custom symbols - #557
Open
techmannih wants to merge 5 commits into
Open
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
imrishabh18
requested changes
Sep 11, 2026
| aliases: string[] | ||
| } | ||
|
|
||
| const hasOverlappingDefaultPinLabels = ( |
Member
There was a problem hiding this comment.
No need of this method, you just need to import the symbol and label as it is. No judgement of overlap is needed on import
| <port name="pin1" pinNumber={1} aliases={["B"]} direction="left" schX={-0.2} schY={0} schStemLength={0.2} /> | ||
| <port name="pin2" pinNumber={2} aliases={["E"]} direction="down" schX={0.2} schY={-0.4} schStemLength={0.2} /> | ||
| <port name="pin3" pinNumber={3} aliases={["C"]} direction="up" schX={0.2} schY={0.4} schStemLength={0} /> | ||
| <schematicpath svgPath="M 0.2 0.4 L 0.2 0.2" strokeColor="#880000" /> |
Member
There was a problem hiding this comment.
Why these new <schematicpath /> being added?
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.
Custom symbols were using automatically positioned pin names instead of EasyEDA's source label metadata. For C20526, that introduced overlapping B/C/E labels even though those names are hidden in the source.
Import pin-name text, visibility, position, rotation, alignment, color, and font size without overlap detection, symbol-size limits, or mixed-direction conditions. Omitted pin-label font sizes use EasyEDA's documented 7pt default. Preserve normalized electrical aliases separately, and retain automatic stems for older inputs without usable label metadata.
The explicit
<schematicpath>elements preserve the original EasyEDA pin lines and their source colors, including shorthand values such as#800. A nonzeroschStemLengthalso generates an automatic label in circuit-to-svg, so the electrical port usesschStemLength={0}while its source path supplies the visible line. Any existing requested port alignment also moves the source path and label together.Updates affected TSX and schematic snapshots. Regression coverage includes hidden and visible source labels, uncapped sizes, source colors and text, numeric names, large symbols with horizontal pins, missing or malformed metadata, electrical pin positions, and aligned capacitor-array stems.
Validation: