fix: adjust dark theme text colors for better readability - #651
deepin-bot[bot] merged 1 commit into
Conversation
Update the article body text color from #C0C6D4 to #FFFFFF and table text color from #6D7C88 to rgba(255,255,255,0.5) in dark theme to improve contrast and readability. Also add OPT_BUILD_UT option to CMakeLists.txt to control unit test build. 调整深色主题下正文文字和表格文字颜色,提升可读性 Log: 调整深色主题下正文和表格文字颜色 PMS: BUG-243251 Influence: 深色主题下正文和表格的文字颜色显示
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR improves dark-theme readability by increasing article text contrast and replacing the table text color with semi-transparent white, updates both source and generated frontend bundles, and adds an OPT_BUILD_UT CMake option to independently disable unit-test builds. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 语法正确,逻辑清晰。CMakeLists.txt 中 option() 命令和 if/endif() 嵌套结构语法正确;App.js 中 setProperty() API 调用语法正确;index.js 为 App.js 的编译版本,语法正确。所有变更逻辑与 commit message 描述的目的完全一致。 2. 代码质量 ✅评价: 优秀 ✅ 通过 潜在问题:
建议: 建议将 OPT_BUILD_UT 选项描述更新为 "Build unit tests (requires Debug build type)" 或 "Enable unit test build in Debug mode",以更准确地反映其行为。 3. 代码性能 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 性能良好,资源使用合理。CSS 属性变更对运行时性能无影响;CMake 选项为编译时配置,无运行时开销。 4. 代码安全 🔒评价: 优秀 ✅ 通过
安全漏洞详情: 建议: 存在0个安全漏洞。CSS 颜色值为硬编码常量,无用户输入参与,无注入风险;CMake 构建选项无安全风险。 💡 改进建议代码示例# CMakeLists.txt - 改进选项描述
# 原代码:
option(OPT_BUILD_UT "Build unit tests" ON)
# 建议修改为:
option(OPT_BUILD_UT "Build unit tests (requires Debug build type)" ON)
# src/web/toManual/js/App.js - 深色主题颜色调整(无需修改,实现正确)
// 正文文字颜色: #C0C6D4 -> #FFFFFF (提升对比度)
document.documentElement.style.setProperty(`--article-read-word-color`, '#FFFFFF');
// 表格文字颜色: #6D7C88 -> rgba(255, 255, 255, 0.5) (提升可读性)
document.documentElement.style.setProperty(`--article-table-text-color`, 'rgba(255, 255, 255, 0.5)');本报告由 AI 代码审查工具自动生成 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: GongHeng2017, max-lvs The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/merge |
Update the article body text color from #C0C6D4 to #FFFFFF and table text color from #6D7C88 to rgba(255,255,255,0.5) in dark theme to improve contrast and readability. Also add OPT_BUILD_UT option to CMakeLists.txt to control unit test build.
调整深色主题下正文文字和表格文字颜色,提升可读性
Log: 调整深色主题下正文和表格文字颜色
PMS: BUG-243251
Influence: 深色主题下正文和表格的文字颜色显示
Summary by Sourcery
Improve dark-theme text readability and make unit-test builds configurable.
Bug Fixes:
Build: