Repository navigation
Add configurable external part links - #1641
Open
killecaptron wants to merge 1 commit into
Open
killecaptron wants to merge 1 commit into
killecaptron wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 givenname, 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
httpsURL are skipped instead of producing abroken 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