Skip to content

Conversation

@irisSong
Copy link
Collaborator

@irisSong irisSong commented Sep 29, 2025

🤔 这个变动的性质是?

  • 新特性提交
  • 日常 bug 修复
  • 站点、文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • TypeScript 定义更新
  • 包体积优化
  • 性能优化
  • 功能增强
  • 国际化改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他改动(是关于什么的改动?)

🔗 相关 Issue

💡 需求背景和解决方案

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

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

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • fork仓库代码是否为最新避免文件冲突
  • Files changed 没有 package.json lock 等无关文件

Summary by CodeRabbit

  • 风格
    • 全局字体家族调整:常规由 JD 更名为 JDZH-Regular,加粗由 JD-Bold 更名为 JDZH-Bold。
    • 徽标、倒计时、价格、评分等组件的数值与符号字体更新,覆盖基础/深灰/主色等样式场景,中文排版与显示一致性提升。
    • 不影响交互与功能,仅为视觉呈现与可读性优化。

@coderabbitai
Copy link

coderabbitai bot commented Sep 29, 2025

Walkthrough

jd-font.scss 中将 @font-face 的字体族名称由 JD/JD-Bold 重命名为 JDZH-Regular/JDZH-Bold,并同步替换 badgecountdownpricerate 组件样式中的对应 font-family 引用;无其他样式或结构变更。

Changes

Cohort / File(s) Summary of Edits
Font-face 重命名
src/styles/jd-font.scss
@font-facefont-family 名称从 JDJDZH-RegularJD-BoldJDZH-Bold;其余属性(src、font-weight、font-style、font-display)未变。
组件字体引用(Regular)
src/packages/badge/badge.scss, src/packages/countdown/countdown.scss, src/packages/rate/rate.scss
将相关选择器中的 font-family: 'JD' 替换为 font-family: 'JDZH-Regular'(影响:.nut-badge &-number.nut-countdown &-number-primary/&-number/&-number-text/&-unit.nut-rate-score)。
组件字体引用(Bold)
src/packages/price/price.scss
将价格相关选择器中的 font-family: 'JD' 替换为 font-family: 'JDZH-Bold'(符号/整数/小数,包含 base、darkgray、primary 变体)。

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • oasis-cloud
  • xiaoyatong

Poem

小兔换名换字形,JD 轻轻变新声。
徽章倒数与星级亮,价签粗体也跟行。
字族更名风不动,样式安稳合并进。 🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning PR描述仅保留了模板注释和自检清单占位内容,未选择变动类型、未提供关联Issue或需求背景及解决方案,且自检清单未勾选,无法为审阅提供有效信息。 请在描述中勾选对应的变动类型,补充相关Issue链接、需求背景和解决方案,并完成自检清单以便审阅者了解PR细节。
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed 标题“fix: 更正正黑字体”简洁明了地概括了此次将字体家族从‘JD’更正为‘JDZH-Regular/Bold’的主要改动,与PR实际更改内容高度一致,能够让审阅者快速理解核心目的。
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between acaa6c2 and 7e230c9.

📒 Files selected for processing (1)
  • src/styles/jd-font.scss (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: test
  • GitHub Check: lint
  • GitHub Check: build
  • GitHub Check: test

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.

@github-actions github-actions bot added action:review This PR needs more reviews (less than 2 approvals) 3.x Target branch 3.x labels Sep 29, 2025
@codecov
Copy link

codecov bot commented Sep 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.15%. Comparing base (b5f41f9) to head (7e230c9).
⚠️ Report is 1 commits behind head on feat_v3.x.

Additional details and impacted files
@@            Coverage Diff             @@
##           feat_v3.x    #3363   +/-   ##
==========================================
  Coverage      88.15%   88.15%           
==========================================
  Files            291      291           
  Lines          19212    19212           
  Branches        2987     2988    +1     
==========================================
+ Hits           16936    16937    +1     
+ Misses          2270     2269    -1     
  Partials           6        6           

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

Copy link

@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: 0

🧹 Nitpick comments (5)
src/packages/price/price.scss (1)

12-12: 字体族改名一致性已对齐,建议去重并增加回退字体族

  • 这三处使用 JDZH-Bold 与全局命名一致,OK。
  • darkgray/primary 内重复声明同一 font-family,属冗余,可删以降低特异性叠加与样式体积。
  • 建议为自定义字体增加系统回退,避免加载失败时数字样式退化明显;同时可抽成变量/混入统一使用。

可选精简示例(删除重复声明):

 .nut-price-darkgray .nut-price {
   &-symbol,
   &-integer,
   &-decimal {
-    font-family: 'JDZH-Bold';
     color: $price-darkgray-color;
   }
 }
 .nut-price-primary .nut-price {
   &-symbol,
   &-integer,
   &-decimal {
-    font-family: 'JDZH-Bold';
     color: $price-primary-color;
   }
 }

如需回退栈,可改为:

- font-family: 'JDZH-Bold';
+ font-family: 'JDZH-Bold', 'Helvetica Neue', Arial, sans-serif;

Also applies to: 21-21, 32-32

src/packages/rate/rate.scss (1)

103-103: 改名对齐良好,建议补充系统回退并参数化

为提升稳健性与可维护性,建议:

  • 增加系统回退字体,避免自定义字体未命中时观感突变;
  • 抽取 $font-family-jd-regular 变量或 mixin,避免在多处硬编码。

示例:

- font-family: 'JDZH-Regular';
+ font-family: 'JDZH-Regular', 'Helvetica Neue', Arial, sans-serif;
src/packages/badge/badge.scss (1)

61-61: 字体族命名已统一,建议加入回退与变量化

与全局改名一致;为稳健起见建议添加系统回退,并在样式层定义统一变量以便后续替换与主题化。

- font-family: 'JDZH-Regular';
+ font-family: 'JDZH-Regular', 'Helvetica Neue', Arial, sans-serif;
src/packages/countdown/countdown.scss (1)

19-19: 字体族改名对齐OK,建议加回退栈并核对相邻变量拼写

  • 建议添加系统回退以增强稳健性:
- font-family: 'JDZH-Regular';
+ font-family: 'JDZH-Regular', 'Helvetica Neue', Arial, sans-serif;
  • 旁边 Line 16 的 $coutdown-font-weight 似为拼写错误,是否应为 $countdown-font-weight?请确认以免变量未命中。
src/styles/jd-font.scss (1)

2-2: 无需兼容扫描:旧 JD/JD-Bold 引用已替换,无残留
可选:统一同一家族,仅通过 font-weight(400/700)切换样式,简化命名与选择器。

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b5f41f9 and acaa6c2.

📒 Files selected for processing (5)
  • src/packages/badge/badge.scss (1 hunks)
  • src/packages/countdown/countdown.scss (1 hunks)
  • src/packages/price/price.scss (3 hunks)
  • src/packages/rate/rate.scss (1 hunks)
  • src/styles/jd-font.scss (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: lint
  • GitHub Check: build
  • GitHub Check: test

@xiaoyatong xiaoyatong merged commit f1c8cd9 into jdf2e:feat_v3.x Sep 29, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.x Target branch 3.x action:review This PR needs more reviews (less than 2 approvals) size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants