fix: remove the hardcoded font size in the HTML#619
Conversation
|
Hi @MyLeeJiEun. Thanks for your PR. 😃 |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRemoves the hardcoded 13px font size from the AboutDialog website link so that it inherits the default text size, aligning the link styling with global typography settings. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Hi @MyLeeJiEun. Thanks for your PR. I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Since you're already touching this template, consider moving the remaining inline styles (color, text-decoration) into a themed QML style or shared component so they can adapt more easily to palette changes (e.g., dark mode) and future design updates.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Since you're already touching this template, consider moving the remaining inline styles (color, text-decoration) into a themed QML style or shared component so they can adapt more easily to palette changes (e.g., dark mode) and future design updates.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
a3677c7 to
421cdff
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mhduiy, MyLeeJiEun 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 |
1. Remove the font size style for HTML links in the AboutDialog. 2. Allow the link text to inherit the default font size Log: Remove the hardcoded font size in the HTML link style of the dialog box. fix: 移除HTML中硬编码的字体大小 1. 移除 AboutDialog 中HTML链接样式的字体大小 2. 允许链接文字继承默认字体大小 Log: 移除关于对话框HTML链接样式中硬编码的字体大小 PMS: BUG-361035
421cdff to
7c5aa8a
Compare
|
/test all |
|
@MyLeeJiEun: Cannot trigger testing until a trusted user reviews the PR and leaves an DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/test all |
2 similar comments
|
/test all |
|
/test all |
deepin pr auto review你好!我是CodeGeeX,你的智能编程助手。我已仔细审查了你提供的 Git Diff 输入。本次修改针对 QML 文件中的一个超链接 HTML 模板进行了样式调整。 以下是详细的代码审查意见: 1. 语法逻辑
2. 代码质量
3. 代码性能
4. 代码安全
💡 综合改进建议(针对安全与 QML 最佳实践)如果条件允许,建议将这种 HTML 模板拼接的方式重构为原生的 QML 组件交互方式。这不仅能解决安全问题,还能让样式控制更加 QML 原生化: 重构前(当前方案,存在硬编码样式和潜在注入风险): readonly property string __websiteLinkTemplate:
"<a href='%1' style='text-decoration: none; color: #004EE5;'>%2</a>"
// 某处使用
Text {
text: __websiteLinkTemplate.arg("https://example.com").arg("访问官网")
onLinkActivated: Qt.openUrlExternally(link)
}重构后(推荐方案,样式由 QML 控制,安全且易维护): Text {
id: websiteLinkText
text: "访问官网" // 或者绑定到动态属性
color: "#004EE5"
font.underline: false // 等同于 text-decoration: none
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: Qt.openUrlExternally(websiteLink) // websiteLink 为纯 URL 属性
}
}总结:本次 Diff 的修改本身是合理且积极的,成功移除了不合理的硬编码字体大小。建议在后续迭代中关注 HTML 模板拼接可能带来的安全隐患,并考虑向 QML 原生组件交互方式迁移。 |
|
/merge |
|
This pr cannot be merged! (status: unstable) |
Log: Remove hardcoded font-size from AboutDialog website link style
fix: 移除HTML中硬编码的字体大小
Log: 移除关于对话框网站链接样式中硬编码的字体大小
PMS: BUG-361035
Summary by Sourcery
Bug Fixes: