mirror of
https://tangled.org/evan.jarrett.net/at-container-registry
synced 2026-09-28 05:04:15 +00:00
digest.html rendered a Deprecated chip, but the shared helm-metadata partial never read .Deprecated, so the repo page carried no deprecation signal at all. The data was already on the struct; this was a display omission. The notice leads the metadata card, above the description: deprecation decides whether you use the chart at all, so it has to be read before the prose that sells it. It uses the alert/alert-warning callout the codebase already uses for this kind of thing, including in the adjacent helm-digest-content partial, rather than a bare badge. A lone small badge reads as a stray tag once it is outside the digest page's row of status chips, and leaves no room to say why it matters. The digest page now shows deprecation twice, deliberately: its header chip is the scannable signal above the fold, and this carries the explanation further down. Removing the chip would push the only signal below the install command, which is the burial this fix is meant to undo. Note the repo page's Overview tab, which is where most people land, still shows nothing: it renders the README and never touches chart metadata. Only the Chart tab gains the notice here. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PDqoCE1j3njokkZ9b1C5n9
130 lines
6.2 KiB
HTML
130 lines
6.2 KiB
HTML
{{ define "helm-metadata" }}
|
|
{{/*
|
|
Renders parsed Chart.yaml metadata as a description list. Expects a
|
|
HelmChartMeta value. Rows are skipped silently when fields are empty so
|
|
sparse charts don't render with a wall of "—" cells.
|
|
*/}}
|
|
<div class="card bg-base-200 shadow-sm border border-base-300 p-6 space-y-4 min-w-0">
|
|
{{/* Deprecation leads the card: it changes whether you should use the
|
|
chart at all, so it has to be readable before the description.
|
|
The digest page also renders a small chip in its header; that one
|
|
is a scannable status label, this one carries the explanation. */}}
|
|
{{ if .Deprecated }}
|
|
<div class="alert alert-warning" role="status">
|
|
{{ icon "alert-triangle" "size-5 shrink-0" }}
|
|
<div>
|
|
<p class="font-medium">This chart is deprecated</p>
|
|
<p class="text-sm">The maintainers marked it deprecated in Chart.yaml. It may not get further updates or fixes.</p>
|
|
</div>
|
|
</div>
|
|
{{ end }}
|
|
|
|
{{ if .Description }}
|
|
<div>
|
|
<h2 class="text-sm font-semibold uppercase tracking-wider text-base-content/70 mb-2">Description</h2>
|
|
<p class="text-sm leading-relaxed">{{ .Description }}</p>
|
|
</div>
|
|
{{ end }}
|
|
|
|
<dl class="grid grid-cols-[max-content_1fr] gap-x-6 gap-y-2 text-sm">
|
|
{{ if .Type }}
|
|
<dt class="font-medium text-base-content/70">Type</dt>
|
|
<dd>{{ .Type }}</dd>
|
|
{{ end }}
|
|
{{ if .AppVersion }}
|
|
<dt class="font-medium text-base-content/70">App version</dt>
|
|
<dd class="font-mono text-xs">{{ .AppVersion }}</dd>
|
|
{{ end }}
|
|
{{ if .KubeVersion }}
|
|
<dt class="font-medium text-base-content/70">Kube version</dt>
|
|
<dd class="font-mono text-xs">{{ .KubeVersion }}</dd>
|
|
{{ end }}
|
|
{{ if .Home }}
|
|
<dt class="font-medium text-base-content/70">Home</dt>
|
|
<dd class="min-w-0 truncate">
|
|
{{ if or (hasPrefix .Home "http://") (hasPrefix .Home "https://") }}
|
|
<a href="{{ .Home }}" class="link link-primary" rel="noopener noreferrer" title="{{ .Home }}">{{ .Home }}</a>
|
|
{{ else }}
|
|
{{/* Non-http schemes (oci://, etc.) get sanitized to #ZgotmplZ
|
|
in href context. Render as plain text so the user can
|
|
still see and copy the value. */}}
|
|
<code class="font-mono text-xs break-all" title="{{ .Home }}">{{ .Home }}</code>
|
|
{{ end }}
|
|
</dd>
|
|
{{ end }}
|
|
{{ if .Sources }}
|
|
<dt class="font-medium text-base-content/70">Sources</dt>
|
|
<dd class="space-y-1 min-w-0">
|
|
{{ range .Sources }}
|
|
<div class="truncate">
|
|
{{ if or (hasPrefix . "http://") (hasPrefix . "https://") }}
|
|
<a href="{{ . }}" class="link link-primary" rel="noopener noreferrer" title="{{ . }}">{{ . }}</a>
|
|
{{ else }}
|
|
<code class="font-mono text-xs break-all" title="{{ . }}">{{ . }}</code>
|
|
{{ end }}
|
|
</div>
|
|
{{ end }}
|
|
</dd>
|
|
{{ end }}
|
|
{{ if .Keywords }}
|
|
<dt class="font-medium text-base-content/70">Keywords</dt>
|
|
<dd class="flex flex-wrap gap-1">
|
|
{{ range .Keywords }}<span class="badge badge-ghost badge-sm">{{ . }}</span>{{ end }}
|
|
</dd>
|
|
{{ end }}
|
|
{{ if .Maintainers }}
|
|
<dt class="font-medium text-base-content/70">Maintainers</dt>
|
|
<dd class="space-y-1">
|
|
{{ range .Maintainers }}
|
|
<div class="text-sm">
|
|
{{ if and .URL (or (hasPrefix .URL "http://") (hasPrefix .URL "https://")) }}
|
|
<a href="{{ .URL }}" class="link link-primary" rel="noopener noreferrer">{{ if .Name }}{{ .Name }}{{ else }}{{ .URL }}{{ end }}</a>
|
|
{{ else if .Name }}
|
|
{{ .Name }}
|
|
{{ else if .URL }}
|
|
<code class="font-mono text-xs">{{ .URL }}</code>
|
|
{{ end }}
|
|
{{ if .Email }}<span class="text-base-content/60"><{{ .Email }}></span>{{ end }}
|
|
</div>
|
|
{{ end }}
|
|
</dd>
|
|
{{ end }}
|
|
</dl>
|
|
|
|
{{ if .Dependencies }}
|
|
<div class="pt-2 border-t border-base-300">
|
|
<h2 class="text-sm font-semibold uppercase tracking-wider text-base-content/70 mb-2">Dependencies</h2>
|
|
<div class="overflow-x-auto">
|
|
<table class="table table-xs">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Version</th>
|
|
<th>Repository</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{ range .Dependencies }}
|
|
<tr>
|
|
<td class="font-medium">{{ .Name }}{{ if .Alias }} <span class="text-base-content/60">({{ .Alias }})</span>{{ end }}</td>
|
|
<td class="font-mono text-xs">{{ .Version }}</td>
|
|
<td class="text-xs">
|
|
{{ if .Repository }}
|
|
{{ if or (hasPrefix .Repository "http://") (hasPrefix .Repository "https://") }}
|
|
<a href="{{ .Repository }}" class="link link-primary" rel="noopener noreferrer">{{ .Repository }}</a>
|
|
{{ else }}
|
|
{{/* oci://, file://, etc. — render as code so it's copyable. */}}
|
|
<code class="font-mono break-all">{{ .Repository }}</code>
|
|
{{ end }}
|
|
{{ end }}
|
|
</td>
|
|
</tr>
|
|
{{ end }}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{{ end }}
|
|
</div>
|
|
{{ end }}
|