Skip to content

Commit 12dfce6

Browse files
ericyangpanclaude
andcommitted
refactor(ai-landscape): simplify AI Coding Landscape components
- Remove unused complex components: LandscapeViewTabs, ProductCategories, RelationshipGraph, StatisticsDashboard - Simplify LandscapePage.tsx to focus on vendor matrix view - Refactor VendorMatrix.tsx for better performance and maintainability - Update ai-coding-landscape/page.tsx to use simplified component structure - Remove @xyflow/react dependency (no longer needed without relationship graph) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 99ba805 commit 12dfce6

File tree

7 files changed

+92
-1258
lines changed

7 files changed

+92
-1258
lines changed

src/app/[locale]/ai-coding-landscape/components/LandscapePage.tsx

Lines changed: 9 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,11 @@
11
'use client'
22

33
import { BackToNavigation } from '@/components/controls/BackToNavigation'
4-
import type {
5-
LandscapeProduct,
6-
LandscapeStats,
7-
RelationshipEdge,
8-
RelationshipNode,
9-
VendorMatrixRow,
10-
} from '@/lib/landscape-data'
11-
import LandscapeViewTabs from './LandscapeViewTabs'
4+
import type { VendorMatrixRow } from '@/lib/landscape-data'
5+
import VendorMatrix from './VendorMatrix'
126

137
interface LandscapePageProps {
148
matrixData: VendorMatrixRow[]
15-
graphData: {
16-
nodes: RelationshipNode[]
17-
edges: RelationshipEdge[]
18-
}
19-
productsByCategory: {
20-
ides: LandscapeProduct[]
21-
clis: LandscapeProduct[]
22-
extensions: LandscapeProduct[]
23-
models: LandscapeProduct[]
24-
providers: LandscapeProduct[]
25-
}
26-
stats: LandscapeStats
279
locale: string
2810
translations: {
2911
title: string
@@ -32,63 +14,19 @@ interface LandscapePageProps {
3214
}
3315
}
3416

35-
export default function LandscapePage({
36-
matrixData,
37-
graphData,
38-
productsByCategory,
39-
stats,
40-
locale,
41-
translations,
42-
}: LandscapePageProps) {
17+
export default function LandscapePage({ matrixData, locale, translations }: LandscapePageProps) {
4318
return (
44-
<div className="max-w-[1400px] mx-auto px-[var(--spacing-md)] py-[var(--spacing-xl)]">
19+
<div className="max-w-[1400px] mx-auto px-[var(--spacing-md)] py-[var(--spacing-lg)]">
4520
{/* Page Header */}
46-
<div className="text-center mb-[var(--spacing-xl)]">
47-
<h1 className="text-[3rem] font-semibold tracking-[-0.04em] mb-[var(--spacing-sm)]">
48-
<span className="text-[var(--color-text-muted)] font-light mr-[var(--spacing-xs)]">
49-
🗺️
50-
</span>
21+
<div className="mb-[var(--spacing-lg)]">
22+
<h1 className="text-[2rem] font-semibold tracking-[-0.02em] mb-[var(--spacing-xs)]">
5123
{translations.title}
5224
</h1>
53-
<p className="text-lg text-[var(--color-text-secondary)] font-light max-w-[800px] mx-auto">
54-
{translations.description}
55-
</p>
56-
</div>
57-
58-
{/* Quick Stats Summary */}
59-
<div className="mb-[var(--spacing-xl)] p-[var(--spacing-lg)] border border-[var(--color-border)] bg-gradient-to-br from-blue-500/5 to-purple-500/5">
60-
<div className="grid grid-cols-2 md:grid-cols-5 gap-[var(--spacing-md)] text-center">
61-
<div>
62-
<div className="text-2xl font-bold tracking-tight">{stats.totalProducts}</div>
63-
<div className="text-xs text-[var(--color-text-muted)] mt-1">Products</div>
64-
</div>
65-
<div>
66-
<div className="text-2xl font-bold tracking-tight">{stats.totalVendors}</div>
67-
<div className="text-xs text-[var(--color-text-muted)] mt-1">Vendors</div>
68-
</div>
69-
<div>
70-
<div className="text-2xl font-bold tracking-tight">{stats.counts.ides}</div>
71-
<div className="text-xs text-[var(--color-text-muted)] mt-1">IDEs</div>
72-
</div>
73-
<div>
74-
<div className="text-2xl font-bold tracking-tight">{stats.counts.clis}</div>
75-
<div className="text-xs text-[var(--color-text-muted)] mt-1">CLIs</div>
76-
</div>
77-
<div>
78-
<div className="text-2xl font-bold tracking-tight">{stats.counts.extensions}</div>
79-
<div className="text-xs text-[var(--color-text-muted)] mt-1">Extensions</div>
80-
</div>
81-
</div>
25+
<p className="text-[var(--color-text-secondary)]">{translations.description}</p>
8226
</div>
8327

84-
{/* Tabs */}
85-
<LandscapeViewTabs
86-
matrixData={matrixData}
87-
graphData={graphData}
88-
productsByCategory={productsByCategory}
89-
stats={stats}
90-
locale={locale}
91-
/>
28+
{/* Vendor Matrix */}
29+
<VendorMatrix matrixData={matrixData} locale={locale} />
9230

9331
{/* Back to Overview */}
9432
<div className="mt-[var(--spacing-xl)]">

src/app/[locale]/ai-coding-landscape/components/LandscapeViewTabs.tsx

Lines changed: 0 additions & 128 deletions
This file was deleted.

0 commit comments

Comments
 (0)