feat(Timeline): support configuring variant via ConfigProvider by QDyanbing · Pull Request #59576 · ant-design/ant-design · GitHub
Skip to content

feat(Timeline): support configuring variant via ConfigProvider - #59576

Merged
zombieJ merged 7 commits into
featurefrom
feat-timeline-global-variant
Oct 22, 2026
Merged

zombieJ merged 7 commits into
featurefrom
feat-timeline-global-variant

Conversation

@QDyanbing

@QDyanbing QDyanbing commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

English Template / 英文模板

🤔 这个变动的性质是?

  • 🆕 新特性提交
  • 🐞 Bug 修复
  • 📝 站点、文档改进
  • 📽️ 演示代码改进
  • 💄 组件样式/交互改进
  • 🤖 TypeScript 定义更新
  • 📦 包体积优化
  • ⚡️ 性能优化
  • ⭐️ 功能增强
  • 🌐 国际化改进
  • 🛠 重构
  • 🎨 代码风格优化
  • ✅ 测试用例
  • 🔀 分支合并
  • ⏩ 工作流程
  • ⌨️ 无障碍改进
  • ❓ 其他改动(是关于什么的改动?)

🔗 相关 Issue

关联 #59556,按最新讨论补齐 Timeline 的顶层和组件级 variant 配置。依赖的公共 useVariant 已由 #59581 合并。

💡 需求背景和解决方案

Timeline 此前无法通过 ConfigProvider 统一配置样式变体。本 PR 支持 ConfigProvider.timeline.variant,并接入公共 useVariant,同时读取顶层 ConfigProvider.variant:

<ConfigProvider variant="filled">
  <Timeline items={items} />
  <Timeline variant="outlined" items={items} />
</ConfigProvider>

优先按实例 variant > Form variant > ConfigProvider.timeline.variant > 顶层 ConfigProvider.variant > 默认值解析,再将不支持的值回退为 outlined。语义化 classNames / styles 回调读取最终生效的值。保持现有公开 variant 类型和默认样式。

中英文 API 表格沿用组件级全局配置支持版本标注,未改动 demo。

验证:5 个相关测试套件、88 个测试及 4 个快照通过;ESLint、Biome 和 diff 检查通过。全量 TypeScript 检查仍有两处 Select allowClear 测试类型错误,输出与 feature 基线完全一致;CR 未发现新增问题。

📝 更新日志

语言 更新描述
🇺🇸 英文 🆕 Timeline supports configuring variant through top-level and component-specific ConfigProvider settings, falling back to outlined for unsupported values.
🇨🇳 中文 🆕 Timeline 支持顶层及组件级 ConfigProvider variant 配置,不支持的值回退为 outlined。

@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

👁 Visual Regression Report for PR #59576 Passed ✅

🎯 Target branch: feature (ffd1a0c)
⚠️ Baseline may be stale: no snapshot for the PR's base commit was found, so an older branch snapshot was used. Some diffs below may come from changes already merged into feature rather than this PR.
📖 View Full Report ↗︎
📖 Alternative Report ↗︎

🎊 Congrats! No visual-regression diff found.

📖 中文报告

👁 PR #59576 视觉回归报告 通过 ✅

🎯 目标分支: feature (ffd1a0c)
⚠️ 基线可能已过期: 未找到该 PR 基准提交对应的快照,因此回退使用了较旧的分支快照。下方部分差异可能来自已合并到 feature 的改动,而非本 PR。

🎊 恭喜!未发现视觉回归差异。

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Preview is ready

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 85d3db95-bc0b-47e1-8350-a0893eb803cc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
dist/antd.min.js 447.22 KB (+24 B 🔺)
dist/antd-with-locales.min.js 539.08 KB (+23 B 🔺)

@codecov

codecov Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Bundle Report

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

Detailed changes
Bundle name Size Change
antd.min-array-push 3.28MB 214 bytes (0.01%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: antd.min-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
antd-with-locales.min.js 107 bytes 1.84MB 0.01%
antd.min.js 107 bytes 1.44MB 0.01%

@pkg-pr-new

pkg-pr-new Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Deploying ant-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8ee4f0f
Status: ✅  Deploy successful!
Preview URL: https://a9adac1e.ant-design.pages.dev
Branch Preview URL: https://feat-timeline-global-variant.ant-design.pages.dev

View logs

@codecov

codecov Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

@QDyanbing
QDyanbing marked this pull request as draft October 15, 2026 07:37
@QDyanbing
QDyanbing marked this pull request as ready for review October 15, 2026 23:59
@zombieJ
zombieJ merged commit 9944381 into feature Oct 22, 2026
46 checks passed
@zombieJ
zombieJ deleted the feat-timeline-global-variant branch October 22, 2026 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants