mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-07-28 20:21:41 +00:00
Add per-parameter "visible in symbol" flag for KiCad EDA export (#1444)
* Add per-parameter "visible in symbol" flag for KiCad EDA export
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>
* Fixed message ids
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
This commit is contained in:
parent
f3c2f4b913
commit
0169c2d1fa
9 changed files with 137 additions and 1 deletions
46
migrations/Version20260713120000.php
Normal file
46
migrations/Version20260713120000.php
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use App\Migration\AbstractMultiPlatformMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
|
||||
final class Version20260713120000 extends AbstractMultiPlatformMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'Add eda_symbol_visibility nullable boolean column to parameters table (controls the "visible" flag of the exported KiCad field)';
|
||||
}
|
||||
|
||||
public function mySQLUp(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE parameters ADD eda_symbol_visibility TINYINT(1) DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function mySQLDown(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE parameters DROP COLUMN eda_symbol_visibility');
|
||||
}
|
||||
|
||||
public function sqLiteUp(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE parameters ADD COLUMN eda_symbol_visibility BOOLEAN DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function sqLiteDown(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE parameters DROP COLUMN eda_symbol_visibility');
|
||||
}
|
||||
|
||||
public function postgreSQLUp(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE parameters ADD eda_symbol_visibility BOOLEAN DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function postgreSQLDown(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE parameters DROP COLUMN eda_symbol_visibility');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue