Skip to content

Commit b0f24cd

Browse files
ericyangpanclaude
andcommitted
refactor(collections): restructure schema and UI components
Restructure collections to use a more flexible schema with sections instead of cards. Extract CollectionSection component for better reusability and maintainability. Update collections data and UI to follow the new structure. Changes: - Rename "cards" to "sections" in collections schema - Add new "features" collection category - Extract CollectionSection component from page - Update CollectionScrollbar to accept dynamic section IDs - Simplify curated-collections page logic 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
1 parent 66d6423 commit b0f24cd

File tree

6 files changed

+228
-213
lines changed

6 files changed

+228
-213
lines changed

manifests/$schemas/collections.schema.json

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,17 @@
1313
},
1414
"tools": {
1515
"$ref": "#/$defs/collectionSection"
16+
},
17+
"features": {
18+
"$ref": "#/$defs/collectionSection"
1619
}
1720
},
18-
"required": ["specifications", "articles", "tools"],
21+
"required": ["specifications", "articles", "tools", "features"],
1922
"additionalProperties": false,
2023
"$defs": {
2124
"collectionSection": {
2225
"type": "object",
23-
"description": "A collection section containing title, description, translations, and cards",
26+
"description": "A collection section containing title, description, translations, and sections",
2427
"properties": {
2528
"title": {
2629
"type": "string",
@@ -34,33 +37,33 @@
3437
"$ref": "./ref/translations.schema.json",
3538
"description": "Internationalization translations for section fields"
3639
},
37-
"cards": {
40+
"sections": {
3841
"type": "array",
39-
"description": "Array of cards within this section",
42+
"description": "Array of sections within this collection",
4043
"items": {
41-
"$ref": "#/$defs/collectionCard"
44+
"$ref": "#/$defs/collectionSubSection"
4245
},
4346
"minItems": 1
4447
}
4548
},
46-
"required": ["title", "description", "translations", "cards"],
49+
"required": ["title", "description", "translations", "sections"],
4750
"additionalProperties": false
4851
},
49-
"collectionCard": {
52+
"collectionSubSection": {
5053
"type": "object",
51-
"description": "A card containing a title, translations, and items",
54+
"description": "A subsection containing a title, translations, and items",
5255
"properties": {
5356
"title": {
5457
"type": "string",
55-
"description": "Card title"
58+
"description": "Subsection title"
5659
},
5760
"translations": {
5861
"$ref": "./ref/translations.schema.json",
59-
"description": "Internationalization translations for card fields"
62+
"description": "Internationalization translations for subsection fields"
6063
},
6164
"items": {
6265
"type": "array",
63-
"description": "Array of items within this card",
66+
"description": "Array of items within this subsection",
6467
"items": {
6568
"$ref": "#/$defs/collectionItem"
6669
},
@@ -72,7 +75,7 @@
7275
},
7376
"collectionItem": {
7477
"type": "object",
75-
"description": "An individual item within a collection card",
78+
"description": "An individual item within a collection subsection",
7679
"properties": {
7780
"name": {
7881
"type": "string",

manifests/collections.json

Lines changed: 111 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"description": "现代软件开发的基本标准和协议"
1010
}
1111
},
12-
"cards": [
12+
"sections": [
1313
{
1414
"title": "Development Standards",
1515
"translations": {
@@ -18,17 +18,6 @@
1818
}
1919
},
2020
"items": [
21-
{
22-
"translations": {
23-
"zh-Hans": {
24-
"name": "语义化版本",
25-
"description": "使用 MAJOR.MINOR.PATCH 格式的版本控制方案,传达兼容性和更新影响"
26-
}
27-
},
28-
"name": "Semantic Versioning",
29-
"url": "https://semver.org",
30-
"description": "Versioning scheme using MAJOR.MINOR.PATCH format to communicate compatibility and impact of updates"
31-
},
3221
{
3322
"translations": {
3423
"zh-Hans": {
@@ -43,13 +32,13 @@
4332
{
4433
"translations": {
4534
"zh-Hans": {
46-
"name": "AGENTS.md",
47-
"description": "为编码 Agent 提供项目特定指令和上下文的开放格式 Markdown 文件"
35+
"name": "语义化版本",
36+
"description": "使用 MAJOR.MINOR.PATCH 格式的版本控制方案,传达兼容性和更新影响"
4837
}
4938
},
50-
"name": "AGENTS.md",
51-
"url": "https://agents.md",
52-
"description": "Open-format markdown file providing coding agents with project-specific instructions and context"
39+
"name": "Semantic Versioning",
40+
"url": "https://semver.org",
41+
"description": "Versioning scheme using MAJOR.MINOR.PATCH format to communicate compatibility and impact of updates"
5342
}
5443
]
5544
},
@@ -61,17 +50,6 @@
6150
}
6251
},
6352
"items": [
64-
{
65-
"translations": {
66-
"zh-Hans": {
67-
"name": "模型上下文协议 (MCP)",
68-
"description": "将 AI 应用连接到外部系统(如数据源、工具和工作流)的开放标准"
69-
}
70-
},
71-
"name": "Model Context Protocol (MCP)",
72-
"url": "https://modelcontextprotocol.io",
73-
"description": "Open standard connecting AI applications to external systems like data sources, tools, and workflows"
74-
},
7553
{
7654
"translations": {
7755
"zh-Hans": {
@@ -86,13 +64,13 @@
8664
{
8765
"translations": {
8866
"zh-Hans": {
89-
"name": "Agent 支付协议 (AP2)",
90-
"description": "使用可验证数字凭证和授权委托的安全 Agent 支付开放协议"
67+
"name": "Agent 客户端协议 (ACP)",
68+
"description": "标准化代码编辑器与 Agent 之间通信的开放协议,用于自主代码修改"
9169
}
9270
},
93-
"name": "Agent Payments Protocol (AP2)",
94-
"url": "https://ap2-protocol.org",
95-
"description": "Open protocol for secure agent-led payments using verifiable digital credentials and authorization mandates"
71+
"name": "Agent Client Protocol (ACP)",
72+
"url": "https://agentclientprotocol.com",
73+
"description": "Open protocol standardizing communication between code editors and coding agents for autonomous code modification"
9674
},
9775
{
9876
"translations": {
@@ -108,13 +86,13 @@
10886
{
10987
"translations": {
11088
"zh-Hans": {
111-
"name": "Agent 客户端协议 (ACP)",
112-
"description": "标准化代码编辑器与 Agent 之间通信的开放协议,用于自主代码修改"
89+
"name": "Agent 支付协议 (AP2)",
90+
"description": "使用可验证数字凭证和授权委托的安全 Agent 支付开放协议"
11391
}
11492
},
115-
"name": "Agent Client Protocol (ACP)",
116-
"url": "https://agentclientprotocol.com",
117-
"description": "Open protocol standardizing communication between code editors and coding agents for autonomous code modification"
93+
"name": "Agent Payments Protocol (AP2)",
94+
"url": "https://ap2-protocol.org",
95+
"description": "Open protocol for secure agent-led payments using verifiable digital credentials and authorization mandates"
11896
}
11997
]
12098
}
@@ -129,7 +107,7 @@
129107
"description": "来自行业领袖的 AI 编码必读文章"
130108
}
131109
},
132-
"cards": [
110+
"sections": [
133111
{
134112
"title": "OpenAI on Coding",
135113
"translations": {
@@ -269,7 +247,7 @@
269247
"description": "AI 编码工作流的精选工具和实用程序"
270248
}
271249
},
272-
"cards": [
250+
"sections": [
273251
{
274252
"title": "Development Tools",
275253
"translations": {
@@ -300,6 +278,27 @@
300278
"url": "https://github.com/github/spec-kit",
301279
"description": "Toolkit for Spec-Driven Development that generates working implementations from executable specifications"
302280
},
281+
{
282+
"translations": {
283+
"zh-Hans": {
284+
"name": "BMAD-METHOD",
285+
"description": "敏捷 AI 驱动开发的突破性方法,配备专门的 AI Agent 用于规划、架构和实现"
286+
}
287+
},
288+
"name": "BMAD-METHOD",
289+
"url": "https://github.com/bmad-code-org/BMAD-METHOD",
290+
"description": "Breakthrough Method for Agile AI-Driven Development with specialized AI agents for planning, architecture, and implementation"
291+
}
292+
]
293+
},
294+
{
295+
"title": "Productivity Utilities",
296+
"translations": {
297+
"zh-Hans": {
298+
"title": "生产力工具"
299+
}
300+
},
301+
"items": [
303302
{
304303
"translations": {
305304
"zh-Hans": {
@@ -310,39 +309,95 @@
310309
"name": "ccusage",
311310
"url": "https://github.com/ryoppippi/ccusage",
312311
"description": "Claude Code usage tracking and analytics tool"
313-
},
312+
}
313+
]
314+
}
315+
]
316+
},
317+
"features": {
318+
"title": "Coding Features",
319+
"description": "Must-try features for AI coding workflows",
320+
"translations": {
321+
"zh-Hans": {
322+
"title": "编码功能",
323+
"description": "AI 编码工作流的必备功能"
324+
}
325+
},
326+
"sections": [
327+
{
328+
"title": "Open Standards",
329+
"translations": {
330+
"zh-Hans": {
331+
"title": "开放标准"
332+
}
333+
},
334+
"items": [
314335
{
336+
"name": "MCP",
337+
"url": "https://modelcontextprotocol.io",
338+
"description": "Open standard connecting AI applications to external systems like data sources, tools, and workflows",
315339
"translations": {
316340
"zh-Hans": {
317-
"name": "BMAD-METHOD",
318-
"description": "敏捷 AI 驱动开发的突破性方法,配备专门的 AI Agent 用于规划、架构和实现"
341+
"name": "模型上下文协议 (MCP)",
342+
"description": " AI 应用连接到外部系统(如数据源、工具和工作流)的开放标准"
319343
}
320-
},
321-
"name": "BMAD-METHOD",
322-
"url": "https://github.com/bmad-code-org/BMAD-METHOD",
323-
"description": "Breakthrough Method for Agile AI-Driven Development with specialized AI agents for planning, architecture, and implementation"
344+
}
324345
},
325346
{
347+
"name": "AGENTS.md",
348+
"url": "https://agents.md",
349+
"description": "Open-format markdown file providing coding agents with project-specific instructions and context",
326350
"translations": {
327351
"zh-Hans": {
328-
"name": "Anthropic Skills",
329-
"description": "示例技能集合,教授 Claude 如何完成专门任务,包括创意应用、技术任务和企业工作流"
352+
"name": "AGENTS.md",
353+
"description": "为编码 Agent 提供项目特定指令和上下文的开放格式 Markdown 文件"
330354
}
331-
},
332-
"name": "Anthropic Skills",
333-
"url": "https://github.com/anthropics/skills",
334-
"description": "Collection of example skills that teach Claude how to complete specialized tasks, including creative applications, technical tasks, and enterprise workflows"
355+
}
335356
}
336357
]
337358
},
338359
{
339-
"title": "Productivity Utilities",
360+
"title": "Vendor Standards",
340361
"translations": {
341362
"zh-Hans": {
342-
"title": "生产力工具"
363+
"title": "厂商标准"
343364
}
344365
},
345-
"items": []
366+
"items": [
367+
{
368+
"name": "Agent Skills",
369+
"url": "https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview",
370+
"description": "Modular capabilities that extend Agent's functionality through filesystem-based resources containing instructions, metadata, and optional scripts, enabling domain-specific expertise and workflows",
371+
"translations": {
372+
"zh-Hans": {
373+
"name": "Agent 技能",
374+
"description": "模块化能力,通过基于文件系统的资源(包含指令、元数据和可选脚本)扩展 Agent 的功能,实现领域专业知识和工作流"
375+
}
376+
}
377+
},
378+
{
379+
"name": "Commands",
380+
"url": "https://cursor.com/docs/agent/chat/commands",
381+
"description": "Custom commands that create reusable workflows triggered with a `/` prefix in the chat input, stored as Markdown files in project, global, or team locations",
382+
"translations": {
383+
"zh-Hans": {
384+
"name": "命令",
385+
"description": "自定义命令,可通过聊天输入框中的 `/` 前缀触发可重用工作流,以 Markdown 文件形式存储在项目、全局或团队位置"
386+
}
387+
}
388+
},
389+
{
390+
"name": "Rules",
391+
"url": "https://cursor.com/docs/context/rules",
392+
"description": "System-level instructions for Agent that provide persistent, reusable context through Project Rules, User Rules, Team Rules, and AGENTS.md files",
393+
"translations": {
394+
"zh-Hans": {
395+
"name": "规则",
396+
"description": "为 Agent 提供系统级指令,通过项目规则、用户规则、团队规则和 AGENTS.md 文件提供持久、可重用的上下文"
397+
}
398+
}
399+
}
400+
]
346401
}
347402
]
348403
}

0 commit comments

Comments
 (0)