Skip to content

refactor(theme-generator): 提取共享主题预设和行高规则 - #979

Open
RSS1102 wants to merge 7 commits into
Tencent:mainfrom
RSS1102:rss1102/fix/theme-generator-neutral-color-init
Open

RSS1102 wants to merge 7 commits into
Tencent:mainfrom
RSS1102:rss1102/fix/theme-generator-neutral-color-init

Conversation

@RSS1102

@RSS1102 RSS1102 commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

🤔 这个 PR 的性质是?

  • 日常 bug 修复
  • 新特性提交
  • 文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • CI/CD 改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他

🔗 相关 Issue

相关 #933 主题配置恢复与首次改色修复。

💡 需求背景和解决方案

将字号、圆角、阴影预设和行高规则提取到共享主题模块,供面板和配置恢复共用。

圆角和阴影预设按 Token 名关联。面板切换档位时按 Token 名取值,配置恢复时按同一份预设写回,避免调整列表顺序时把值写到错误的 Token。

预设数值、Token 名称和行高计算沿用现有实现。

📝 更新日志

  • 本条 PR 不需要纳入 Changelog

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项。⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

@tencent-adm

Copy link
Copy Markdown
Member

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@pkg-pr-new

pkg-pr-new Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@tdesign/site-components@979
npm i https://pkg.pr.new/@tdesign/theme-generator@979

commit: 1ce09a7

@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

TDesign Component Site Preview CI Open

Sites (9)
Component Preview
tdesign-site 完成
tdesign-vue 完成
tdesign-react 完成
tdesign-vue-next 完成
@tdesign-vue-next/chat 完成
tdesign-mobile-vue 完成
tdesign-mobile-react 完成
tdesign-miniprogram 完成
tdesign-uniapp 完成

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@72ef4b3). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #979   +/-   ##
=======================================
  Coverage        ?   13.34%           
=======================================
  Files           ?       46           
  Lines           ?     2008           
  Branches        ?      640           
=======================================
  Hits            ?      268           
  Misses          ?     1340           
  Partials        ?      400           

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@RSS1102 RSS1102 closed this Nov 30, 2026
@RSS1102
RSS1102 deleted the rss1102/fix/theme-generator-neutral-color-init branch November 30, 2026 02:26
@RSS1102
RSS1102 restored the rss1102/fix/theme-generator-neutral-color-init branch November 30, 2026 02:27
@RSS1102 RSS1102 reopened this Nov 30, 2026
@RSS1102 RSS1102 changed the title fix(theme-generator): 修复首次修改品牌色触发的空 HEX 异常 fix(theme-generator): 修复首次修改品牌色时的空 HEX 异常 Nov 30, 2026
Keep this PR focused on the shared preset and line-height rules. The neutral HEX fix is handled with the theme initialization changes in Tencent#933.
RSS1102 added a commit to RSS1102/tdesign that referenced this pull request Nov 30, 2026
Use Tencent#979 as the shared preset baseline while retaining the verified restoration and neutral HEX implementation in Tencent#933.
@RSS1102 RSS1102 changed the title fix(theme-generator): 修复首次修改品牌色时的空 HEX 异常 refactor(theme-generator): 提取共享主题预设和行高规则 Nov 30, 2026
RSS1102 added a commit to RSS1102/tdesign that referenced this pull request Nov 30, 2026
RSS1102 added a commit to RSS1102/tdesign that referenced this pull request Nov 30, 2026
@RSS1102
RSS1102 marked this pull request as ready for review November 30, 2026 08:36

This branch has not been deployed

No deployments
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.

3 participants