fix: adjust dark theme text colors for better readability - #652
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR improves dark-theme readability by increasing article and table text contrast in both the editable JavaScript source and bundled distribution output, and adds a CMake option to control whether Debug unit tests are included in the build. Flow diagram for optional Debug unit-test buildsflowchart TD
Configure[CMake configuration] --> Opt{OPT_BUILD_UI enabled?}
Opt -->|No| Skip[Skip tests]
Opt -->|Yes| Debug{CMAKE_BUILD_TYPE is Debug?}
Debug -->|Yes| Tests["add_subdirectory(tests)"]
Debug -->|No| Skip
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="CMakeLists.txt" line_range="10" />
<code_context>
project(deepin-manual)
option(DMAN_RELEAE OFF "Install dman resources to system or not")
+option(OPT_BUILD_UI "Build init tests" ON)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake)
</code_context>
<issue_to_address>
**issue (bug_risk):** The new option is named `OPT_BUILD_UI`, but the requested/documented unit-test control is `OPT_BUILD_UT`; passing `-DOPT_BUILD_UT=OFF` therefore has no effect and Debug builds still add the tests subdirectory.
**Triggers:** When a build invokes the intended `OPT_BUILD_UT` CMake option.
**Suggested fix:** Rename the option and its condition to `OPT_BUILD_UT` (and update the help text to describe unit-test builds).
</issue_to_address>fb84f81 to
26ddc60
Compare
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-376465 Influence: 深色主题下正文和表格的文字颜色显示
26ddc60 to
bee57e1
Compare
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: CMake语法正确,嵌套if/endif结构完整;JavaScript setProperty调用语法正确 2. 代码质量 ✅评价: 优秀 ✅ 通过 潜在问题:
建议: 建议通过构建工具自动生成分发文件,避免手动同步 3. 代码性能 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: CSS颜色值变更不影响性能,CMake构建选项不影响运行时性能 4. 代码安全 🔒评价: 优秀 ✅ 通过
安全漏洞详情: 建议: CSS颜色值为静态常量,无用户输入,无注入风险 💡 改进建议代码示例// 建议在构建流程中自动生成 web_dist 文件
// 例如在 CMakeLists.txt 中添加自定义命令:
// add_custom_command(TARGET App.js POST_BUILD
// COMMAND npx babel src/web --out-dir src/web_dist
// COMMENT "Building web distribution files")本报告由 AI 代码审查工具自动生成 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: GongHeng2017, lzwind 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-376465
Influence: 深色主题下正文和表格的文字颜色显示
Summary by Sourcery
Improve dark-theme text readability and make unit-test builds configurable.
Bug Fixes:
Build: