diff --git a/frontend/src/components/ComponentInfoPanel.css b/frontend/src/components/ComponentInfoPanel.css index d8327eff..13ba73a9 100644 --- a/frontend/src/components/ComponentInfoPanel.css +++ b/frontend/src/components/ComponentInfoPanel.css @@ -333,3 +333,10 @@ flex-shrink: 0; } + +/* No authored doc and no metadata description — most of the catalogue. Say it + plainly instead of leaving the panel looking broken. */ +.cip-desc--empty { + color: #7a7a7a; + font-style: italic; +} diff --git a/frontend/src/components/ComponentInfoPanel.tsx b/frontend/src/components/ComponentInfoPanel.tsx index f58a370b..7f2a35b7 100644 --- a/frontend/src/components/ComponentInfoPanel.tsx +++ b/frontend/src/components/ComponentInfoPanel.tsx @@ -123,13 +123,20 @@ export const ComponentInfoBody: React.FC<{ return ( <> - {/* Authored datasheet supersedes the thin auto-generated description. */} + {/* Authored datasheet supersedes the thin auto-generated description. + 91 of the 156 catalogue parts have NEITHER, so say so rather than + leaving the reader looking at an empty panel wondering if it broke. */} {doc?.body ? (
{data.description}
) : ( - data.description &&{data.description}
++ No datasheet written for this part yet. + {data.pinCount > 0 && ' Its pins are listed on the left.'} +
)} {showProps && shownProps.length > 0 && (