Skip to content

Feature: unified semantic-dom title in the docs#1877

Open
Rain120 wants to merge 18 commits into
ant-design:mainfrom
Rain120:feature/docs-unified_semantic
Open

Feature: unified semantic-dom title in the docs#1877
Rain120 wants to merge 18 commits into
ant-design:mainfrom
Rain120:feature/docs-unified_semantic

Conversation

@Rain120

@Rain120 Rain120 commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

🤔 Unified semantic-dom title in the Chinese docs

  • 🆕 New feature
  • 🐞 Bug fix
  • 📝 Site / documentation improvement
  • 📽️ Demo improvement
  • 💄 Component style improvement
  • 🤖 TypeScript definition improvement
  • 📦 Bundle size optimization
  • ⚡️ Performance optimization
  • ⭐️ Feature enhancement
  • 🌐 Internationalization
  • 🛠 Refactoring
  • 🎨 Code style optimization
  • ✅ Test Case
  • 🔀 Branch merge
  • ⏩ Workflow
  • ⌨️ Accessibility improvement
  • ❓ Other (about what?)

💡 Background and Solution

Background

All of the Chinese docs are named 'Semantic DOM', but file-card and folder are special

image

Solution

Make them unified to be 'Semantic DOM'.

Summary by CodeRabbit

文档

  • Documentation(文档)
    • 更新了多个组件文档中的"语义化 DOM"章节标题,统一调整为英文表述,确保文档风格和表述的一致性。

@github-actions

github-actions Bot commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Preview is ready

@dosubot dosubot Bot added the documentation Improvements or additions to documentation label Apr 23, 2026
@coderabbitai

coderabbitai Bot commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: be6a5197-f54f-4208-b0bf-d2ccd2094cb3

📥 Commits

Reviewing files that changed from the base of the PR and between 2b841cd and 8b2be94.

📒 Files selected for processing (1)
  • packages/x/components/folder/index.zh-CN.md

📝 Walkthrough

Walkthrough

在三个文档文件(packages/x/components/folder/index.zh-CN.mdpackages/x/components/file-card/index.zh-CN.mdpackages/x-skill/skills-zh/x-components/reference/API.md)中,将章节标题 语义化 DOM 替换为 Semantic DOM,周边内容及示例均未改动。

Changes

文档标题统一更新

Layer / File(s) Summary
语义化 DOM 标题替换为 Semantic DOM
packages/x/components/folder/index.zh-CN.md, packages/x/components/file-card/index.zh-CN.md, packages/x-skill/skills-zh/x-components/reference/API.md
三个文档文件中的章节标题由中文"语义化 DOM"统一改为英文"Semantic DOM",各文件均为单行变更,其余内容保持不变。

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 小兔子跳进文档林,
轻轻一笔换标题名,
语义化 DOM 成英文身,
Semantic DOM 闪闪新,
三处改动齐整整,
代码花园更清明! 🌸

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题清晰准确地总结了主要变更:统一文档中的语义化DOM标题,与变更集完全相关。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request translates "语义化 DOM" to "Semantic DOM" in documentation and updates versions and tags in skill-meta.json. Feedback suggests that the changes to skill-meta.json are out of scope and reduce metadata granularity. Additionally, renaming multiple headers to "Semantic DOM" in API.md creates duplicate anchors that may break documentation navigation.

Comment thread packages/x-skill/src/skill-meta.json
Comment thread packages/x-skill/skills-zh/x-components/reference/API.md

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/x-skill/skills-zh/x-components/reference/API.md`:
- Line 811: 当前文件中存在重复的同级标题 "## Semantic DOM"(触发
MD024/no-duplicate-heading);请在重复的标题处将其中一个改为唯一化(例如改为 "## Semantic DOM — <组件名>" 或
"### Semantic DOM"
以改变层级),并同步更新任何引用该标题的锚点或链接(检查文档内的跳转/目录引用);确保保留语义并在标题文本中加入组件前缀或其它区分信息以避免再次重复。

In `@packages/x-skill/src/skill-meta.json`:
- Line 20: 当前问题是 skill 元数据里的领域标签被覆盖为仅 ["sdk"],导致检索召回精度下降;在生成元信息的逻辑(参见
generate-meta.ts)应保留并合并输入 metadata 中的 tags 而不是只按名称生成通用标签。请修改 generate-meta.ts
中构建 tags 的处所(例如处理 skill-meta.json 的生成函数)以:1) 读取原始 input.metadata.tags(若存在),2) 与按
name 生成的默认标签合并,3) 去重并保证顺序稳定,最后写回 skill-meta.json;并把相同处理应用到其他受影响的生成逻辑以修复
x-card/x-components/x-markdown 等。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: d1aff391-5a40-45c9-a420-5d8ca6ebe462

📥 Commits

Reviewing files that changed from the base of the PR and between c5d7f37 and dd5eda3.

📒 Files selected for processing (4)
  • packages/x-skill/skills-zh/x-components/reference/API.md
  • packages/x-skill/src/skill-meta.json
  • packages/x/components/file-card/index.zh-CN.md
  • packages/x/components/folder/index.zh-CN.md

Comment thread packages/x-skill/skills-zh/x-components/reference/API.md Outdated
Comment thread packages/x-skill/src/skill-meta.json
@codecov

codecov Bot commented Apr 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.09%. Comparing base (6ed809e) to head (8b2be94).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1877   +/-   ##
=======================================
  Coverage   97.09%   97.09%           
=======================================
  Files         158      158           
  Lines        5711     5711           
  Branches     1696     1680   -16     
=======================================
  Hits         5545     5545           
  Misses        164      164           
  Partials        2        2           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codecov

codecov Bot commented Apr 23, 2026

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 8 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
antdx-array-push 2.11MB 8 bytes (0.0%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: antdx-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
antdx.min.js 8 bytes 2.11MB 0.0%

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Apr 27, 2026
@Rain120

Rain120 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

@afc163 抱歉,想问下,这个PR是被遗忘了吗?review很久了,好像并没有合入诶

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/x/components/folder/index.zh-CN.md`:
- Around line 58-68: Fix the broken internal anchor links in the FolderTreeData
documentation section. In the contextMenu property description, change the
anchor reference from `#foldertreenode` to `#foldertreedata`. Similarly, in the
children property description where it references the array type
[FolderTreeData](`#foldertreenode`)[], change the anchor from `#foldertreenode` to
`#foldertreedata` to match the actual heading "### FolderTreeData" on this page.
Both anchor links must be corrected to ensure the internal page navigation works
properly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: be6a5197-f54f-4208-b0bf-d2ccd2094cb3

📥 Commits

Reviewing files that changed from the base of the PR and between 2b841cd and 8b2be94.

📒 Files selected for processing (1)
  • packages/x/components/folder/index.zh-CN.md

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/x/components/folder/index.zh-CN.md`:
- Around line 58-68: Fix the broken internal anchor links in the FolderTreeData
documentation section. In the contextMenu property description, change the
anchor reference from `#foldertreenode` to `#foldertreedata`. Similarly, in the
children property description where it references the array type
[FolderTreeData](`#foldertreenode`)[], change the anchor from `#foldertreenode` to
`#foldertreedata` to match the actual heading "### FolderTreeData" on this page.
Both anchor links must be corrected to ensure the internal page navigation works
properly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: be6a5197-f54f-4208-b0bf-d2ccd2094cb3

📥 Commits

Reviewing files that changed from the base of the PR and between 2b841cd and 8b2be94.

📒 Files selected for processing (1)
  • packages/x/components/folder/index.zh-CN.md
🛑 Comments failed to post (1)
packages/x/components/folder/index.zh-CN.md (1)

58-68: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

修正 FolderTreeData 的锚点。

这里把 FolderTreeData 链到了不存在的 #foldertreenode,但本页实际标题是 ### FolderTreeData,生成的锚点应是 #foldertreedata。否则这两处页内跳转都会失效。

示例修正
-| contextMenu | 右键菜单配置,支持全局配置和函数形式(根据节点动态返回菜单项)。函数形式接收节点数据和完整路径 key。可被 `FolderTreeData` 中的 `contextMenu` 覆盖 | MenuProps['items'] \| ((node: [FolderTreeData](`#foldertreenode`), key: string) => MenuProps['items']) | - | - |
+| contextMenu | 右键菜单配置,支持全局配置和函数形式(根据节点动态返回菜单项)。函数形式接收节点数据和完整路径 key。可被 `FolderTreeData` 中的 `contextMenu` 覆盖 | MenuProps['items'] \| ((node: [FolderTreeData](`#foldertreedata`), key: string) => MenuProps['items']) | - | - |
...
-| children | 子项(仅文件夹类型有效) | [FolderTreeData](`#foldertreenode`)[] | - | - |
+| children | 子项(仅文件夹类型有效) | [FolderTreeData](`#foldertreedata`)[] | - | - |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

| contextMenu | 右键菜单配置,支持全局配置和函数形式(根据节点动态返回菜单项)。函数形式接收节点数据和完整路径 key。可被 `FolderTreeData` 中的 `contextMenu` 覆盖 | MenuProps['items'] \| ((node: [FolderTreeData](`#foldertreedata`), key: string) => MenuProps['items']) | - | - |
| onRightClick | 右键点击节点时的回调 | function({event, node}) | - | - |

### FolderTreeData

| 属性 | 说明 | 类型 | 默认值 | 版本 |
| --- | --- | --- | --- | --- |
| title | 显示名称 | string | - | - |
| path | 文件路径 | string | - | - |
| content | 文件内容(可选) | string | - | - |
| children | 子项(仅文件夹类型有效) | [FolderTreeData](`#foldertreedata`)[] | - | - |
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 58-58: Link fragments should be valid

(MD051, link-fragments)


[warning] 68-68: Link fragments should be valid

(MD051, link-fragments)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/x/components/folder/index.zh-CN.md` around lines 58 - 68, Fix the
broken internal anchor links in the FolderTreeData documentation section. In the
contextMenu property description, change the anchor reference from
`#foldertreenode` to `#foldertreedata`. Similarly, in the children property
description where it references the array type
[FolderTreeData](`#foldertreenode`)[], change the anchor from `#foldertreenode` to
`#foldertreedata` to match the actual heading "### FolderTreeData" on this page.
Both anchor links must be corrected to ensure the internal page navigation works
properly.

Source: Linters/SAST tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation lgtm This PR has been approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants