From 0ceb862eebde9b643e8e5eb1d7ff8682af72d524 Mon Sep 17 00:00:00 2001 From: gator Date: Sun, 16 Aug 2026 14:46:13 +0000 Subject: [PATCH] part: the asset checklist must reflect the data, not assert it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every part rendered "✓ 3D model ✓ Schematic ✓ Footprint ✓ SPICE" as literal markup, regardless of what it actually had. footprint_pads is absent from all 80 parts, so the Footprint tab says "no footprint data" while the checklist two inches away claims a tick — which is how a missing footprint reads as a rendering bug rather than missing data. Each item now derives from the field the corresponding tab actually reads. --- assets/part.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/assets/part.js b/assets/part.js index 0b185c9..da51a4a 100644 --- a/assets/part.js +++ b/assets/part.js @@ -85,7 +85,13 @@ window.ppcbReady(async () => { Datasheet ↗ -
✓ 3D model✓ Schematic✓ Footprint✓ SPICE✓ ${(p.pins || []).length} pins
+
${[ + ['3D model', !!p.model_3d], + ['Schematic', !!(p.pins || []).length], // schematicSVG() draws from pins + ['Footprint', !!(p.footprint_pads || []).length], // footprintSVG() draws from footprint_pads + ['SPICE', !!p.spice], + [`${(p.pins || []).length} pins`, !!(p.pins || []).length], + ].map(([label, have]) => `${have ? '✓' : '—'} ${label}`).join('')}
${p.when_to_use ? `

When to use

${esc(p.when_to_use)}

` : ''} ${ucs ? `

What it's used for

${ucs}
` : ''} ${params ? `

Specifications

${params}
` : ''}