Skip to content

fix: adjust dark theme text colors for better readability - #651

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:release/eaglefrom
GongHeng2017:202609081906-re-eagle-fix
Sep 9, 2026
Merged

deepin-bot[bot] merged 1 commit into
linuxdeepin:release/eaglefrom
GongHeng2017:202609081906-re-eagle-fix

Conversation

@GongHeng2017

@GongHeng2017 GongHeng2017 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

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:

  • Improve dark-theme readability by increasing article body text contrast and using a more legible table text color.

Build:

  • Add an option to control whether unit tests are built, while retaining Debug-only test builds.

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: 深色主题下正文和表格的文字颜色显示
@sourcery-ai

sourcery-ai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The 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

Change Details Files
Improved dark-theme contrast for article and table text.
  • Changed article body text to white.
  • Changed table text to 50% white opacity.
  • Applied matching runtime color updates in source and built JavaScript bundles.
src/web/toManual/js/App.js
src/web_dist/toManual/index.js
Added an option to control whether unit tests are included in the build.
  • Added OPT_BUILD_UT, enabled by default.
  • Made test inclusion conditional on OPT_BUILD_UT while retaining Debug-build gating.
CMakeLists.txt

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

🤖 AI 代码审查报告

总体评分: 99 分 (通过阈值: 70分)

Pass


📊 总体评价

项目 结果
审查结论 代码审查通过
评分详情 总体评分 99 分,大于 70 分通过阈值,代码质量符合要求。本次变更调整深色主题下正文和表格文字颜色以提升可读性,并新增 OPT_BUILD_UT 选项控制单元测试构建,变更目的明确,实现简洁正确。

🔍 详细分析

1. 语法逻辑 ✅

评价: 优秀 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: 语法正确,逻辑清晰。CMakeLists.txt 中 option() 命令和 if/endif() 嵌套结构语法正确;App.js 中 setProperty() API 调用语法正确;index.js 为 App.js 的编译版本,语法正确。所有变更逻辑与 commit message 描述的目的完全一致。


2. 代码质量 ✅

评价: 优秀 ✅ 通过

潜在问题:

  1. CMakeLists.txt:10 - OPT_BUILD_UT 选项描述 "Build unit tests" 未说明仅在 Debug 构建类型下生效,可能产生理解歧义

建议: 建议将 OPT_BUILD_UT 选项描述更新为 "Build unit tests (requires Debug build type)" 或 "Enable unit test build in Debug mode",以更准确地反映其行为。


3. 代码性能 ✅

评价: 优秀 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: 性能良好,资源使用合理。CSS 属性变更对运行时性能无影响;CMake 选项为编译时配置,无运行时开销。


4. 代码安全 🔒

评价: 优秀 ✅ 通过

🔐 发现 0 个安全漏洞

安全漏洞详情:
✅ 未发现安全漏洞

建议: 存在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 代码审查工具自动生成

@deepin-ci-robot

Copy link
Copy Markdown

[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.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@GongHeng2017

Copy link
Copy Markdown
Contributor Author

/merge

@deepin-bot
deepin-bot Bot merged commit 8311483 into linuxdeepin:release/eagle Sep 9, 2026
14 checks passed
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