Skip to content

Add configurable external part links - #1641

Open
killecaptron wants to merge 1 commit into
Part-DB:masterfrom
killecaptron:external-part-links
Open

killecaptron wants to merge 1 commit into
Part-DB:masterfrom
killecaptron:external-part-links

Conversation

@killecaptron

Copy link
Copy Markdown
Contributor

Every organization has its own systems a part should link to - a supplier portal, an internal wiki, a
compliance database - but Part-DB only ever linked to the manufacturer and the suppliers of a part, so those
links had to be pasted into a comment or a parameter by hand.

An administrator can now define a list of links under System settings → External part links. A link either
builds its URL from a template with placeholders taken from the part ({mpn}, {manufacturer}, {ipn},
{name}, {category}, {footprint} and {id}), or reads a complete URL from a part parameter with a given
name, and is shown with a chosen icon in the sidebar of every part it resolves for.

A link is only rendered if it actually resolves: a template whose placeholders have no value on that part, an
ambiguous or missing parameter, and everything which is not an https URL are skipped instead of producing a
broken or unsafe link. The template validation lives in one place, so the settings form rejects exactly what
the resolver would refuse to render later.

Documented in docs/usage/external_part_links.md.

🤖 Generated with Claude Code

Every organization has its own systems a part should link to - a
supplier portal, an internal wiki, a compliance database - but Part-DB
only ever linked to the manufacturer and the suppliers of a part, so
those links had to be pasted into a comment or a parameter by hand.

An administrator can now define a list of links in the system settings.
A link either builds its URL from a template with placeholders taken
from the part ({mpn}, {manufacturer}, {ipn}, {name}, {category},
{footprint} and {id}), or reads a complete URL from a part parameter
with a given name, and is shown with a chosen icon in the sidebar of
every part it resolves for.

A link is only rendered if it actually resolves: a template whose
placeholders have no value on that part, an ambiguous or missing
parameter, and everything which is not an https URL are skipped instead
of producing a broken or unsafe link. The template validation lives in
one place, so the settings form rejects exactly what the resolver would
refuse to render later.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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