Skip to content

Add per-parameter "visible in symbol" flag for KiCad EDA export#1444

Open
Dant-hw wants to merge 1 commit into
Part-DB:masterfrom
Dant-hw:feature/kicad-parameter-symbol-visibility
Open

Add per-parameter "visible in symbol" flag for KiCad EDA export#1444
Dant-hw wants to merge 1 commit into
Part-DB:masterfrom
Dant-hw:feature/kicad-parameter-symbol-visibility

Conversation

@Dant-hw

@Dant-hw Dant-hw commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a per-part-parameter flag that controls whether an exported parameter is
shown on the schematic symbol in KiCad, i.e. the KiCad field's "visible"
attribute in the EDA HTTP-library API response.

Previously Part-DB always emitted parameter fields with "visible": "False",
so a parameter exported to KiCad was never displayed on the symbol without the
user manually toggling it in KiCad. This adds first-class control over that.

Two independent "visibilities"

The existing eda_visibility and the new eda_symbol_visibility do different
things and are deliberately independent:

Flag Controls
eda_visibility (existing) Whether the parameter is exported as a field at all
eda_symbol_visibility (new) Whether that field is visible on the schematic symbol ("visible": "True"/"False")

The new flag only has an effect once the parameter is actually exported.

Behavior

  • eda_symbol_visibility is a nullable tri-state on part parameters,
    mirroring the existing eda_visibility.
  • When it is null, the new system default
    KiCadEDASettings::defaultParameterSymbolVisibility applies.
  • Both default to false, so existing installations keep the previous
    behavior
    — exported parameter fields stay "visible": "False" until the
    flag (or the setting) is turned on. Fully backward compatible.

Changes

  • Entity – new nullable eda_symbol_visibility column on AbstractParameter
    with accessors and matching serialization groups; multi-platform migration
    (MySQL / SQLite / PostgreSQL).
  • Form – a second TriStateCheckboxType, shown for part parameters only.
  • KiCadHelper – resolves the flag (explicit value, else the system default)
    and passes it to createField().
  • SettingsdefaultParameterSymbolVisibility (default false).
  • Templates – new eye-icon column in the part edit Specifications table,
    next to the existing EDA-export column.
  • Translations – English strings for the new tooltip and settings entries.
  • Tests – assert "visible": "True" when the flag is set, and that the
    default stays "False".

Screenshot

partdb-EDA-visibility

Testing

  • KiCadHelperTest passes (24 tests, 45 assertions), including the two new cases.
  • Migration applies cleanly on SQLite; the eda_symbol_visibility column is
    created as expected.
  • Smoke-tested in the Docker image: container boots, migration runs on startup,
    the new column is present, and the edit form renders the new column.

Notes

  • Scope is part parameters only — orderdetails/supplier fields are not
    touched (could follow the same pattern later if wanted).
  • Only messages.en.xlf is updated; other locales fall back to English until
    Crowdin syncs.

🤖 Generated with Claude Code

Introduce a nullable tri-state eda_symbol_visibility on part parameters
that drives the KiCad field's "visible" flag in the EDA HTTP-library API
response. This is independent of the existing eda_visibility, which only
controls whether the parameter is exported as a field at all.

When the per-parameter flag is null, the new system default
KiCadEDASettings::defaultParameterSymbolVisibility applies. Both default
such that exported parameter fields keep their previous behavior
("visible": "False"), so the change is backward compatible.

- Entity: eda_symbol_visibility column + accessors, with matching
  serialization groups and a multi-platform migration
- Form: second TriStateCheckboxType, shown for part parameters only
- KiCadHelper: resolve the flag (explicit, else system default) and pass
  it to createField()
- Settings: defaultParameterSymbolVisibility (default false)
- Templates: new eye-icon column in the specifications table
- Translations (en) + tests

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.47%. Comparing base (a356b94) to head (5a785ab).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1444      +/-   ##
============================================
- Coverage     58.48%   58.47%   -0.01%     
- Complexity     8707     8709       +2     
============================================
  Files           639      639              
  Lines         28146    28156      +10     
============================================
+ Hits          16461    16465       +4     
- Misses        11685    11691       +6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Dant-hw
Dant-hw marked this pull request as ready for review July 14, 2026 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant