Skip to content

Commit 67a73a7

Browse files
committed
feat(catalog): link product pages to manifests
1 parent 695f610 commit 67a73a7

25 files changed

Lines changed: 139 additions & 29 deletions

File tree

data/data-health.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -73,59 +73,59 @@
7373
},
7474
"translationsByLocale": {
7575
"de": {
76-
"totalStrings": 483,
76+
"totalStrings": 484,
7777
"matchingEnglish": 39,
7878
"matchingEnglishPercent": 8.1
7979
},
8080
"es": {
81-
"totalStrings": 483,
81+
"totalStrings": 484,
8282
"matchingEnglish": 25,
8383
"matchingEnglishPercent": 5.2
8484
},
8585
"fr": {
86-
"totalStrings": 483,
86+
"totalStrings": 484,
8787
"matchingEnglish": 36,
88-
"matchingEnglishPercent": 7.5
88+
"matchingEnglishPercent": 7.4
8989
},
9090
"id": {
91-
"totalStrings": 483,
91+
"totalStrings": 484,
9292
"matchingEnglish": 30,
9393
"matchingEnglishPercent": 6.2
9494
},
9595
"ja": {
96-
"totalStrings": 483,
96+
"totalStrings": 484,
9797
"matchingEnglish": 23,
9898
"matchingEnglishPercent": 4.8
9999
},
100100
"ko": {
101-
"totalStrings": 483,
101+
"totalStrings": 484,
102102
"matchingEnglish": 23,
103103
"matchingEnglishPercent": 4.8
104104
},
105105
"pt": {
106-
"totalStrings": 483,
106+
"totalStrings": 484,
107107
"matchingEnglish": 31,
108108
"matchingEnglishPercent": 6.4
109109
},
110110
"ru": {
111-
"totalStrings": 483,
111+
"totalStrings": 484,
112112
"matchingEnglish": 23,
113113
"matchingEnglishPercent": 4.8
114114
},
115115
"tr": {
116-
"totalStrings": 483,
116+
"totalStrings": 484,
117117
"matchingEnglish": 26,
118118
"matchingEnglishPercent": 5.4
119119
},
120120
"zh-Hans": {
121-
"totalStrings": 483,
121+
"totalStrings": 484,
122122
"matchingEnglish": 22,
123-
"matchingEnglishPercent": 4.6
123+
"matchingEnglishPercent": 4.5
124124
},
125125
"zh-Hant": {
126-
"totalStrings": 483,
126+
"totalStrings": 484,
127127
"matchingEnglish": 22,
128-
"matchingEnglishPercent": 4.6
128+
"matchingEnglishPercent": 4.5
129129
}
130130
},
131131
"issues": [

docs/DATA-HEALTH.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,17 @@ Exact English matches are a triage signal; product names and technical terms can
3737

3838
| Locale | Comparable strings | Exact English matches | Match rate |
3939
| --- | ---: | ---: | ---: |
40-
| de | 483 | 39 | 8.1% |
41-
| es | 483 | 25 | 5.2% |
42-
| fr | 483 | 36 | 7.5% |
43-
| id | 483 | 30 | 6.2% |
44-
| ja | 483 | 23 | 4.8% |
45-
| ko | 483 | 23 | 4.8% |
46-
| pt | 483 | 31 | 6.4% |
47-
| ru | 483 | 23 | 4.8% |
48-
| tr | 483 | 26 | 5.4% |
49-
| zh-Hans | 483 | 22 | 4.6% |
50-
| zh-Hant | 483 | 22 | 4.6% |
40+
| de | 484 | 39 | 8.1% |
41+
| es | 484 | 25 | 5.2% |
42+
| fr | 484 | 36 | 7.4% |
43+
| id | 484 | 30 | 6.2% |
44+
| ja | 484 | 23 | 4.8% |
45+
| ko | 484 | 23 | 4.8% |
46+
| pt | 484 | 31 | 6.4% |
47+
| ru | 484 | 23 | 4.8% |
48+
| tr | 484 | 26 | 5.4% |
49+
| zh-Hans | 484 | 22 | 4.5% |
50+
| zh-Hant | 484 | 22 | 4.5% |
5151

5252
## Backlog by Issue Type
5353

src/app/[locale]/desktops/[slug]/page.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ export default async function DesktopPage({
9090
<main className="max-w-8xl mx-auto px-[var(--spacing-md)]">
9191
<ProductHero
9292
name={desktop.name}
93+
manifestId={desktop.id}
9394
description={desktop.description}
9495
vendor={desktop.vendor}
9596
category="DESKTOP"

src/app/[locale]/extensions/[slug]/page.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ export default async function ExtensionPage({
130130
<main className="max-w-8xl mx-auto px-[var(--spacing-md)]">
131131
<ProductHero
132132
name={extension.name}
133+
manifestId={extension.id}
133134
description={extension.description}
134135
vendor={extension.vendor}
135136
category="EXTENSION"

src/app/[locale]/ides/[slug]/page.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ export default async function IDEPage({
110110
<main className="max-w-8xl mx-auto px-[var(--spacing-md)]">
111111
<ProductHero
112112
name={ide.name}
113+
manifestId={ide.id}
113114
description={ide.description}
114115
vendor={ide.vendor}
115116
category="IDE"

src/app/[locale]/model-providers/[slug]/page.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ export default async function ProviderPage({
8383
<main className="max-w-8xl mx-auto px-[var(--spacing-md)]">
8484
<ProductHero
8585
name={provider.name}
86+
manifestId={provider.id}
8687
description={provider.description}
8788
category="PROVIDER"
8889
categoryLabel={tShared('categories.singular.modelProvider')}

src/app/[locale]/models/[slug]/page.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ export default async function ModelPage({
119119
<main className="max-w-8xl mx-auto px-[var(--spacing-md)]">
120120
<ProductHero
121121
name={model.name}
122+
manifestId={model.id}
122123
description={
123124
<>
124125
{tShared('terms.by')}{' '}

src/app/[locale]/vendors/[slug]/page.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ export default async function VendorPage({
144144
<main className="max-w-8xl mx-auto px-[var(--spacing-md)]">
145145
<ProductHero
146146
name={vendor.name}
147+
manifestId={vendor.id}
147148
description={vendor.description}
148149
category="VENDOR"
149150
categoryLabel={tShared('categories.singular.vendor')}

src/components/product/CLILandingPage.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import type { ReactNode } from 'react'
1212
import { DeprecatedBadge } from '@/components/controls/DeprecatedBadge'
1313
import { VerifiedBadge } from '@/components/controls/VerifiedBadge'
1414
import { CLICommandPanel } from '@/components/product/CLICommandPanel'
15+
import { ManifestEditLink } from '@/components/product/ManifestEditLink'
1516
import { ProductPricing } from '@/components/product/ProductPricing'
1617
import { RelatedProducts, type RelatedProductsProps } from '@/components/product/RelatedProducts'
1718
import { Link } from '@/i18n/navigation'
@@ -120,9 +121,12 @@ export function CLILandingPage({
120121
{cli.deprecated && <DeprecatedBadge size="sm" />}
121122
</div>
122123

123-
<h1 className="text-5xl md:text-6xl font-semibold tracking-[-0.05em] detail-page-h1 mb-[var(--spacing-md)]">
124-
{cli.name}
125-
</h1>
124+
<div className="flex items-center gap-[var(--spacing-xs)] mb-[var(--spacing-md)]">
125+
<h1 className="text-5xl md:text-6xl font-semibold tracking-[-0.05em] detail-page-h1">
126+
{cli.name}
127+
</h1>
128+
<ManifestEditLink category="CLI" manifestId={cli.id} />
129+
</div>
126130
<p className="text-xl leading-relaxed font-medium max-w-2xl mb-[var(--spacing-sm)]">
127131
{content.answer}
128132
</p>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { Github } from 'lucide-react'
2+
import { useTranslations } from 'next-intl'
3+
import { getManifestEditUrl, type ManifestCategory } from '@/lib/manifest-source'
4+
5+
export interface ManifestEditLinkProps {
6+
category: ManifestCategory
7+
manifestId: string
8+
}
9+
10+
export function ManifestEditLink({ category, manifestId }: ManifestEditLinkProps) {
11+
const tComponent = useTranslations('components.product')
12+
const label = tComponent('productHero.editManifest')
13+
14+
return (
15+
<a
16+
href={getManifestEditUrl(category, manifestId)}
17+
target="_blank"
18+
rel="noopener noreferrer"
19+
aria-label={label}
20+
title={label}
21+
className="inline-flex size-8 shrink-0 items-center justify-center text-[var(--color-text-muted)] hover:text-[var(--color-text)] transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--color-text)]"
22+
>
23+
<Github size={19} strokeWidth={1.6} aria-hidden="true" />
24+
</a>
25+
)
26+
}

0 commit comments

Comments
 (0)