fix(theme): adjust dark mode tooltip colors for support button - #649
deepin-bot[bot] merged 1 commit into
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideDark mode styling is updated for improved support-button tooltip readability, with source changes and generated web_dist output synchronized; reviewers should verify that the generated bundle applies the same variables as the source. Flow diagram for dark mode support tooltip stylingflowchart LR
DarkMode[Dark mode active] --> AppSet[App.js setProperty]
AppSet --> TooltipVars[nav-hove-word-color #FFFFFF<br/>tips-background-color #141414]
TooltipVars --> SupportTooltip[Support button tooltip]
AppSet --> BuiltBundle[web_dist index.js]
BuiltBundle --> BundleVars[Generated tooltip variables]
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 2 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="src/web_dist/toManual/index.js" line_range="733" />
<code_context>
document.documentElement.style.setProperty('--search-WikiSearch-color', '#6D7C88');
document.documentElement.style.setProperty('--search-itemTitle-word-color', '#C0C6D4');
- document.documentElement.style.setProperty('--search-context-word-color', '#6D7C88');
+ document.documentElement.style.setProperty('--search-context-word-color', '#141414');
document.documentElement.style.setProperty('--tips-background-color', 'rgba(42, 42, 42, 0.8)');
document.documentElement.style.setProperty('--tips-border-color', 'rgba(0, 0, 0, 0.3)');
</code_context>
<issue_to_address>
**issue (broader_impact):** The shipped `web_dist` bundle leaves `--tips-background-color` at `rgba(42, 42, 42, 0.8)` instead of the source value `#141414`, so users loading the built web output do not receive the dark-mode tooltip background fix.
**Triggers:** When the application runs from the checked-in `web_dist` bundle in dark mode.
**Suggested fix:** Regenerate `src/web_dist/toManual/index.js` so its dark-mode `--tips-background-color` assignment is `#141414`.
</issue_to_address>
### Comment 2
<location path="src/web_dist/toManual/index.js" line_range="733" />
<code_context>
document.documentElement.style.setProperty('--search-WikiSearch-color', '#6D7C88');
document.documentElement.style.setProperty('--search-itemTitle-word-color', '#C0C6D4');
- document.documentElement.style.setProperty('--search-context-word-color', '#6D7C88');
+ document.documentElement.style.setProperty('--search-context-word-color', '#141414');
document.documentElement.style.setProperty('--tips-background-color', 'rgba(42, 42, 42, 0.8)');
document.documentElement.style.setProperty('--tips-border-color', 'rgba(0, 0, 0, 0.3)');
</code_context>
<issue_to_address>
**issue (bug_risk):** The built bundle changes the dark-mode search context text color to `#141414`, while the search context is rendered on a dark background, making search-result excerpts effectively unreadable.
**Triggers:** When a user views search results in dark mode using the built web output.
**Suggested fix:** Regenerate the bundle from the source and restore the dark-mode `--search-context-word-color` value to `#6D7C88`.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
0ab84ee to
6cdf603
Compare
Change tooltip font color to #FFFFFF and background to #141414 in dark mode for better readability. Sync built web_dist output. 调整深色模式下"服务与支持"提示框字体颜色为#FFFFFF、背景为#141414, 提升可读性。同步编译产物 web_dist。 Log: 调整深色模式服务与支持提示框颜色 PMS: BUG-243239 Influence: 深色模式下"服务与支持"按钮 tooltip 字体及背景颜色调整, 提升显示效果。
6cdf603 to
9d3ca0c
Compare
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 语法正确,逻辑清晰。本次变更仅修改 CSS 自定义属性的值(颜色值),不涉及任何逻辑流程变更,语法完全正确。 2. 代码质量 ✅评价: 优秀 ✅ 通过 潜在问题:
建议: 1.建议确认项目是否有构建流程,若有则仅需修改源码 src/web/toManual/js/App.js,构建后自动生成 dist 文件 3. 代码性能 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 性能良好,资源使用合理。CSS 自定义属性值变更不影响性能,浏览器渲染开销无变化。 4. 代码安全 🔒评价: 优秀 ✅ 通过
安全漏洞详情: 建议: 存在0个安全漏洞。本次变更仅涉及硬编码 CSS 颜色值,无用户输入处理,无安全风险。 💡 改进建议代码示例// 建议在源码中添加注释说明颜色变更意图
// 暗色模式主题设置
document.documentElement.style.setProperty('--nav-hove-word-color', '#FFFFFF'); // 纯白色提高悬停文字对比度
document.documentElement.style.setProperty('--tips-background-color', '#141414'); // 不透明深色背景,提升 tooltip 可读性本报告由 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 |
|
/forcemerge |
Change tooltip font color to #FFFFFF and background to #141414 in dark mode for better readability. Sync built web_dist output.
调整深色模式下"服务与支持"提示框字体颜色为#FFFFFF、背景为#141414,
提升可读性。同步编译产物 web_dist。
Log: 调整深色模式服务与支持提示框颜色
PMS: BUG-243239
Influence: 深色模式下"服务与支持"按钮 tooltip 字体及背景颜色调整,
提升显示效果。
Summary by Sourcery
Improve dark-mode support-button tooltip contrast and synchronize the generated web output.
Bug Fixes:
Chores: