feat: The newly installed app shows blue dot when it is not running.#567
Conversation
Reviewer's GuideAdds a blue dot indicator for newly installed but unlaunched apps by inserting a small QML Rectangle in list views and updating the IconItemDelegate to prepend a RichText dot marker. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey @wjyrich - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 3 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| theme: ApplicationHelper.DarkType | ||
| z: 1 | ||
| } | ||
| Rectangle { |
There was a problem hiding this comment.
suggestion: Duplicate indicator Rectangle block in multiple views
Move the duplicated 8×8 circle in AppListView and FreeSortListView into a shared QML component to avoid duplication and simplify updates.
| width: 8 | ||
| height: 8 | ||
| radius: 4 | ||
| color: "#6CA6FF" |
There was a problem hiding this comment.
suggestion: Hardcoded color literal
Extract this repeated hex literal into a theme or shared palette to improve maintainability and consistency.
| id: iconItemLabel | ||
| text: root.text | ||
| textFormat: Text.PlainText | ||
| text: (model.lastLaunchedTime === 0 && model.installedTime !== 0 ? "<font color='#6CA6FF' size='1'>●</font> " : "") + root.text |
There was a problem hiding this comment.
🚨 issue (security): Concatenating raw text into RichText risks HTML injection
Escape root.text with Qt.htmlEscape or move the indicator into its own element to prevent unescaped < or & from breaking the rich text.
| text: root.text | ||
| textFormat: Text.PlainText | ||
| text: (model.lastLaunchedTime === 0 && model.installedTime !== 0 ? "<font color='#6CA6FF' size='1'>●</font> " : "") + root.text | ||
| textFormat: Text.RichText |
There was a problem hiding this comment.
suggestion (performance): Switching to RichText may impact performance and eliding
To preserve elide: Text.ElideRight, avoid embedding HTML in RichText and instead add a small Rectangle or Circle indicator next to the label.
a66e47a to
bd87e0c
Compare
as title PMS-BUG-289271
bd87e0c to
24c3ff9
Compare
deepin pr auto review代码审查意见:
综上所述,建议进行代码重构,以提高代码的可维护性、可读性和性能。 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: BLumia, wjyrich 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 |
|
This pr force merged! (status: behind) |
as title
PMS-BUG-289271
Summary by Sourcery
New Features: