Disambiguate disconnected same-name nets with schematic superscripts - #3660
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| @@ -0,0 +1,48 @@ | |||
| import type { SourceNet } from "circuit-json" | |||
Contributor
There was a problem hiding this comment.
The folder name schematic-net-superscripts is inconsistent with the naming used throughout the rest of the project. The utility file is named assign-schematic-net-label-superscripts.ts, the render phase is called SchematicNetLabelSuperscripts, and the base-components test file is named schematic-net-label-superscripts-phase.test.ts. The folder should be renamed to schematic-net-label-superscripts to match the established naming convention (kebab-case, consistent with other file/export names in the project).
Spotted by Graphite (based on custom rule: Custom rule)
Is this helpful? React 👍 or 👎 to let us know.
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.
Populates
display_superscriptwhen a name is displayed on more than one source electrical network. Unused source-net declarations do not create display conflicts. For example, disconnected GND nets in sibling subcircuits render as GND¹ and GND². Connected copies share one suffix; unambiguous names have none.Applies to both
schematic_net_labeland trace-associatedschematic_text, including inline display labels that have nosource_net. Connectivity follows source traces, shared ports, and both forms of internal component pin connections across subcircuits. Scoped connectivity keys and matching names alone do not join networks.Runs in the dedicated
SchematicLabelNetsWithConflictingNamesrender phase after schematic label/symbol rendering and before PCB phases. The top-level group assigns suffixes for the whole circuit, with initial and dirty-update handlers and declared async dependencies. Clears stale suffixes when networks join and uses source member IDs for deterministic numbering even when Circuit JSON is reordered. Source names, connectivity, and unrelated schematic text remain unchanged. Updates circuit-json to 0.0.484 and circuit-to-svg to 0.0.413, which contain the schema and rendering support.Validation:
bunx tsc --noEmitandbun run buildpass.Related schema/rendering changes: tscircuit/circuit-json#750, tscircuit/circuit-json#754, tscircuit/circuit-to-svg#712.