Skip to content

chore: Changelog of 2.7.0#1891

Merged
kimteayon merged 11 commits intomainfrom
changelog
Apr 30, 2026
Merged

chore: Changelog of 2.7.0#1891
kimteayon merged 11 commits intomainfrom
changelog

Conversation

@kimteayon
Copy link
Copy Markdown
Collaborator

@kimteayon kimteayon commented Apr 29, 2026

中文版模板 / Chinese template

🤔 This is a ...

  • 🆕 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?)

🔗 Related Issues

  • Describe the source of related requirements, such as links to relevant issue discussions.
  • For example: close #xxxx, fix #xxxx

💡 Background and Solution

  • The specific problem to be addressed.
  • List the final API implementation and usage if needed.
  • If there are UI/interaction changes, consider providing screenshots or GIFs.

📝 Change Log

Language Changelog
🇺🇸 English
🇨🇳 Chinese

Summary by CodeRabbit

版本 2.7.0 发布说明

  • 新功能

    • XProvider 增加 Zero Runtime CSS-in-JS 支持
    • x-card 增加行动上下文路径引用自动解析(支持 v0.8 / v0.9 格式)
  • Bug 修复

    • 修正路径解析优先级,确保运行时值不会被配置值覆盖
  • 文档

    • 更新 x-card 与技能示例(含修正的 React 用法与路径解析说明)
    • 补充路径引用解析示例文档
  • 测试

    • 新增覆盖测试,验证行动上下文合并与优先级行为

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 29, 2026

Deploying ant-design-x with  Cloudflare Pages  Cloudflare Pages

Latest commit: c05d088
Status: ✅  Deploy successful!
Preview URL: https://fdd968ba.ant-design-x.pages.dev
Branch Preview URL: https://changelog.ant-design-x.pages.dev

View logs

@dosubot dosubot Bot added the documentation Improvements or additions to documentation label Apr 29, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 29, 2026

Preview is ready

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 29, 2026

📝 Walkthrough

Walkthrough

更新为 2.7.0 发布:版本号和 changelog 更新;为 x-card 引入/完善 v0.8 与 v0.9 的操作上下文类型与解析(路径引用解析与合并行为调整)、增强测试覆盖,并同步更新若干技能文档示例与站点说明。

Changes

Cohort / File(s) Summary
版本号与元数据
package.json, packages/x-card/package.json, packages/x-markdown/package.json, packages/x-sdk/package.json, packages/x-skill/package.json, packages/x/package.json, packages/x-skill/.claude-plugin/marketplace.json, packages/x-card/src/version.ts
将各包/元数据版本从 2.6.0 升级为 2.7.0
变更日志
CHANGELOG.en-US.md, CHANGELOG.zh-CN.md
新增 2.7.0 发布节,记录 XProvider.zeroRuntime、resolveActionContextPathRefs、x-card 文档修正与站点搜索栏更新。
x-card:类型与解析调整
packages/x-card/src/A2UI/Card.tsx, packages/x-card/src/A2UI/Card.v0.8.ts, packages/x-card/src/A2UI/Card.v0.9.ts
添加/导出 v0.8/v0.9 的 Action 类型(ActionConfigV08/V09 等);将若干函数参数从 any 收紧为具体类型;加强 isLiteralStringObject 类型守卫;在 v0.9 路径解析中调整合并顺序,确保从 dataModel 计算出的 value 不被 rest.value 覆盖。
测试
packages/x-card/src/A2UI/__tests__/Card.coverage.test.tsx
新增 v0.9 上下文合并/覆盖相关覆盖测试;更新 v0.8/v0.9 断言以反映配置字面量与运行时值合并规则;加强开发模式下的警告断言。
技能文档与示例
packages/x-skill/skills*/*/SKILL.md (多处), packages/x-skill/skills*/x-card/reference/ACTIONS.md (2 files)
将技能文档 frontmatter 版本统一改为 2.7.0;更新 x-card ACTIONS 示例,说明 { path } 解析为 { value, ...rest },示例代码改为通过 payload.context.<key>?.value 读取值并调整 Agent 调用示例。

Sequence Diagram(s)

sequenceDiagram
  participant UI as UI Component
  participant Card as x-card (resolver)
  participant Data as DataModel
  participant Handler as onAction handler

  UI->>Card: 触发 action (可能含 path 或 literal)
  Card->>Data: 读取 dataModel[path](若存在)
  Data-->>Card: 返回值
  Card->>Card: 合并为 { value, ...rest }(确保 value 不被 rest 覆盖)
  Card->>Handler: 调用 onAction({ context: { key: { value, ... } } })
  Handler-->>UI: 处理结果/副作用
Loading

Estimated code review effort

🎯 3 (中等) | ⏱️ ~25 分钟

建议标签

lgtm

建议审阅者

  • hylin

诗句

🐰 版本跃升二点七,
类型更严路更明,
路径化身 value 与余,
测试护航文档行,
我跳乐,更新庆! 🥕✨

🚥 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 标题"chore: Changelog of 2.7.0"准确反映了PR的主要变更内容,即为2.7.0版本更新变更日志、所有package.json版本号以及相关文档。
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch changelog

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
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

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

@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Performance benchmark report not found.


This comment is automatically generated by the x-markdown performance CI.

Copy link
Copy Markdown
Contributor

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

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 bumps the version to 2.7.0 and introduces automatic action context path resolution (resolveActionContextPathRefs) for the @ant-design/x-card component, supporting both v0.8 and v0.9 formats. The implementation includes refined TypeScript interfaces for action configurations and updated documentation. Feedback points out a critical discrepancy where test assertions conflict with the code's behavior regarding literal value preservation in the merged context. Additionally, there is a redundant type cast in Card.tsx and a need for more precise documentation regarding which context keys are transformed versus those preserved as-is.

Comment thread packages/x-card/src/A2UI/__tests__/Card.coverage.test.tsx Outdated
Comment thread packages/x-card/src/A2UI/Card.tsx
Comment thread packages/x-skill/skills-zh/x-card/reference/ACTIONS.md Outdated
Comment thread packages/x-skill/skills/x-card/reference/ACTIONS.md Outdated
@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Performance benchmark report not found.


This comment is automatically generated by the x-markdown performance CI.

@socket-security
Copy link
Copy Markdown

socket-security Bot commented Apr 29, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedjest-fetch-mock@​3.0.36510010075100
Addedclassnames@​2.5.110010010082100
Addedrc-util@​5.44.49910010086100

View full report

@socket-security
Copy link
Copy Markdown

socket-security Bot commented Apr 29, 2026

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

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 `@package.json`:
- Line 3: The package.json bump to "2.7.0" lacks corresponding changelog
entries; update CHANGELOG.en-US.md and CHANGELOG.zh-CN.md with a 2.7.0 section
containing concise bullet points summarizing features, fixes and affected areas
(at least one-line summary per item) and include scope/impact notes; ensure the
new changelog headings match the version string in package.json and follow the
repository's existing formatting convention so the release tooling and users can
trace the changes.

In `@packages/x-card/src/A2UI/__tests__/Card.coverage.test.tsx`:
- Around line 768-807: The test asserts that configuration-side literal fields
like label are excluded from reported action context, but the current
implementation (resolveActionContextPathRefs in Card.tsx) preserves non-{path}
literals and merges them into the runtime context; update the failing assertions
in the test to expect the literal (e.g., label: 'static-label') to be present in
the reported context instead of absent, and make the same change for the other
similar assertions in the same test file that currently assert absence of
configuration literals so the tests match the existing
resolveActionContextPathRefs behavior.
🪄 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: c199d625-3ff3-4aa8-acf6-ab9a11878fc0

📥 Commits

Reviewing files that changed from the base of the PR and between 93f2a16 and f53f160.

📒 Files selected for processing (28)
  • CHANGELOG.en-US.md
  • CHANGELOG.zh-CN.md
  • package.json
  • packages/x-card/package.json
  • packages/x-card/src/A2UI/Card.tsx
  • packages/x-card/src/A2UI/Card.v0.8.ts
  • packages/x-card/src/A2UI/Card.v0.9.ts
  • packages/x-card/src/A2UI/__tests__/Card.coverage.test.tsx
  • packages/x-card/src/version.ts
  • packages/x-markdown/package.json
  • packages/x-sdk/package.json
  • packages/x-skill/.claude-plugin/marketplace.json
  • packages/x-skill/package.json
  • packages/x-skill/skills-zh/use-x-chat/SKILL.md
  • packages/x-skill/skills-zh/x-card/SKILL.md
  • packages/x-skill/skills-zh/x-card/reference/ACTIONS.md
  • packages/x-skill/skills-zh/x-chat-provider/SKILL.md
  • packages/x-skill/skills-zh/x-components/SKILL.md
  • packages/x-skill/skills-zh/x-markdown/SKILL.md
  • packages/x-skill/skills-zh/x-request/SKILL.md
  • packages/x-skill/skills/use-x-chat/SKILL.md
  • packages/x-skill/skills/x-card/SKILL.md
  • packages/x-skill/skills/x-card/reference/ACTIONS.md
  • packages/x-skill/skills/x-chat-provider/SKILL.md
  • packages/x-skill/skills/x-components/SKILL.md
  • packages/x-skill/skills/x-markdown/SKILL.md
  • packages/x-skill/skills/x-request/SKILL.md
  • packages/x/package.json

Comment thread package.json
Comment thread packages/x-card/src/A2UI/__tests__/Card.coverage.test.tsx Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 29, 2026

size-limit report 📦

Path Size
packages/x/dist/antdx.min.js 463.44 KB (+183 B 🔺)
packages/x-sdk/dist/x-sdk.min.js 7.68 KB
packages/x-markdown/dist/x-markdown.min.js 32.62 KB (+67 B 🔺)
packages/x-markdown/dist/plugins/latex.min.js 61.45 KB

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Bundle Report

Bundle size has no change ✅

@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Performance benchmark report not found.


This comment is automatically generated by the x-markdown performance CI.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

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 the current code and only fix it if needed.

Inline comments:
In `@packages/x-skill/skills/x-card/reference/ACTIONS.md`:
- Around line 151-154: The examples show only using payload.context.xxx?.value
which breaks literal/ runtime-original-value cases; update the examples (the
lines using payload.context.email?.value and payload.context.name?.value and the
similar blocks at the other occurrences) to either (A) add a fallback read that
prefers the .value when present and otherwise uses the raw context field, or (B)
change the comment to explicitly state “.value is only for path-bound fields”
and keep the examples as-is; implement option A by adjusting the example reads
to first check for a .value and fall back to the literal runtime value so both
binding styles work.
🪄 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: 0b913473-2a2b-4ae7-8070-612b319fa273

📥 Commits

Reviewing files that changed from the base of the PR and between f53f160 and c05d088.

📒 Files selected for processing (3)
  • packages/x-card/src/A2UI/__tests__/Card.coverage.test.tsx
  • packages/x-skill/skills-zh/x-card/reference/ACTIONS.md
  • packages/x-skill/skills/x-card/reference/ACTIONS.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/x-skill/skills-zh/x-card/reference/ACTIONS.md

Comment thread packages/x-skill/skills/x-card/reference/ACTIONS.md
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.61%. Comparing base (7f53d95) to head (c05d088).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1891   +/-   ##
=======================================
  Coverage   97.61%   97.61%           
=======================================
  Files         158      158           
  Lines        5533     5537    +4     
  Branches     1628     1620    -8     
=======================================
+ Hits         5401     5405    +4     
  Misses        130      130           
  Partials        2        2           

☔ View full report in Codecov by Sentry.
📢 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.

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Apr 30, 2026
@kimteayon kimteayon merged commit 9108580 into main Apr 30, 2026
17 checks passed
@kimteayon kimteayon deleted the changelog branch April 30, 2026 02:20
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