Add inline prop to netlabel - #814
Conversation
| /** | ||
| * Render the net name along its schematic trace instead of as an anchored | ||
| * label. Inline placement is automatic, so schematic anchor positioning | ||
| * props are ignored. | ||
| */ |
There was a problem hiding this comment.
JSDoc comment is misplaced. The comment describes the inline property but is positioned between the interface closing brace (line 3233) and the netLabelProps zod schema declaration (line 3239). This will cause documentation tools to incorrectly associate this comment with the entire netLabelProps object instead of the inline property within it.
The comment should either be:
- Placed inside the interface before line 3228 (
inline?: boolean), or - Placed inside the zod schema before line 3243 (
inline: z.boolean().optional())
This suggests the generation script generate-component-types.ts may have a bug in how it positions JSDoc comments for new properties.
Spotted by Graphite
Is this helpful? React 👍 or 👎 to let us know.
|
Thank you for your contribution! 🎉 PR Rating: ⭐⭐ Track your contributions and see the leaderboard at: tscircuit Contribution Tracker |
Summary
inlineprop toNetLabelPropsinlinethrough the canonical netlabel Zod schemaBehavior
inlineis optional and has no schema default, so omitted orfalsepreserves the existing anchored netlabel behavior. Core can usetrueto render the net name along its schematic trace.Validation
bun scripts/generate-component-types.tsbun scripts/generate-manual-edits-docs.tsbun scripts/generate-readme-docs.tsbun scripts/generate-props-overview.tsbun run typecheckbun run buildbunx biome format lib/components/netlabel.tsgit diff --check