Skip to content

No tool can position or hide a placed symbol's field text — reset_schematic_field_positions only restores the library default #490

Closed

Description

@triglav-modular

Summary

Nothing in the server can position or hide a placed symbol's field text. reset_schematic_field_positions only puts Reference and Value back where the library anchors them, which is the opposite operation. So a field that lands badly cannot be fixed from the tooling at all.

What is missing

Checked against every tool on the installed release: the only tool that touches a field's position is reset_schematic_field_positions, and it restores the library default. Nothing sets a position, and nothing sets visibility.

edit_schematic_component's fields argument sets values — {"key": "value"} string pairs (#158). It has no bearing on where the text sits or whether it is shown.

Why it matters

The case that keeps arising is a rotated symbol. A gate placed at 90° carries its Value at the library's anchor rotated with it, and on a dense sheet that lands the text across the symbol's own pin numbers. KiCad users fix this in one drag; through the tooling there is no fix.

The workarounds are all worse schematics:

  • place an empty Value on the symbol and draw the text elsewhere as free add_schematic_text — which is what one project transcribing a set of drawings ended up doing across every IC on a sheet, losing the value in the file and in the BOM view;
  • or accept overlapping text.

Neither is a rendering nicety when the deliverable is the drawing.

This is also the schematic side of a gap that has been closed on the board side: #202 (bulk_move_schematic_components leaving Reference and Value text at the old coordinates) was accepted and fixed, so field text positions are already understood as something the server is responsible for getting right — just not something a caller can ask for.

The machinery already exists

crates/konnect-core/src/tools/mod.rs defines

pub(crate) fn positioned_property(
    name: &str, value: &str, x: f64, y: f64, rotation: f64,
    hide: bool, justify: FieldJustify,
) -> Property

and placement already uses it: a power symbol's Reference is written hidden today, and #101's work carries Reference and Value through the placement transform so they follow a rotated body. Position, visibility and justification are all already expressible by the writer. What is absent is any way for a caller to reach them after placement.

Proposed

A field_placements argument on edit_schematic_component, keyed by field name, each entry setting any of x, y, rotation and hide; an omitted part left as the file has it, so moving a field cannot silently unhide it.

Two details that matter for the shape:

  • Coordinates are absolute schematic millimetres, because that is how KiCad stores them. That makes them per-placement, so a component placed as several units needs the unit named — writing one coordinate to every unit would stack a quad gate's four Values on a point. (Related: move_schematic_component cannot reposition a single unit of a multi-unit symbol #467 asks for per-unit addressing on move_schematic_component, which is the same need one level up.)
  • hide belongs as a direct child of the property on a placed symbol; the (effects (hide yes)) form is the lib_symbols one. KiCad 10.0.6's own writer round-trips the property-level token unchanged.

A separate argument rather than widening fields: moving the Value text is not changing what it says, and overloading one argument's value type would make the schema lie about what it accepts.

I have implemented this and opened it as a pull request, including a post-write comparison against the committed file — worth having, because two ways of corrupting a field survived the first round of tests and were caught only by that check.

Environment

Konnect v0.11.1 · KiCad 10.0.6 · macOS (Apple Silicon) · driven over stdio.

Activity

  1. added
    enhancementNew feature or request
    P2Wanted, not urgent
    area:schematicSchematic capture and analysis
    claimedSomeone has claimed this; check the assignee before starting
    on Sep 7, 2026
  2. mixelpixx commented on Sep 11, 2026

    @mixelpixx
    Owner

    Implemented and verified by #489.

    Acceptance accounting:

    • edit_schematic_component gains field_placements (per field: x, y, rotation, hide) and unit; an omitted member leaves that aspect as the file has it, so moving a field cannot silently unhide it.
    • Coordinates are absolute schematic millimetres; a position on a multi-unit component without unit is refused rather than stacked on every unit.
    • Readback reports each field's observed position and visibility from the committed file, reading (hide yes) in both forms KiCad writes; a mismatch refuses with stale_target.
    • A malformed existing placement aborts the whole call before commit_command (byte-identical file proven); an oversized unit is refused, not wrapped.
    • Migration entry added; no tool, argument, or field renamed or removed.

    Merged head: 35a18bc
    Merge commit: MERGE

    Post-merge verification on current main passed: fmt, clippy -D warnings, workspace --lib --tests (1758 passed), workspace --doc; fix-doc-counts --check unchanged.

    Three non-blocking edges found in review are filed as #521. The issue was correctly closed by the terminal PR.

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

Metadata

Metadata

Labels

P2Wanted, not urgentarea:schematicSchematic capture and analysisclaimedSomeone has claimed this; check the assignee before startingenhancementNew feature or requeststatus:in-progressNext actor: the assignee

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions