Skip to content

fix: hide status indicator when title is active#1541

Closed
wjyrich wants to merge 1 commit intolinuxdeepin:masterfrom
wjyrich:fix-UIWithBackground
Closed

fix: hide status indicator when title is active#1541
wjyrich wants to merge 1 commit intolinuxdeepin:masterfrom
wjyrich:fix-UIWithBackground

Conversation

@wjyrich
Copy link
Copy Markdown
Contributor

@wjyrich wjyrich commented Apr 1, 2026

The status indicator was incorrectly showing when the title was active in Efficient display mode. This fix adds a condition to hide the status indicator when root.titleActive is true, ensuring the indicator only appears when appropriate.

Log: Fixed status indicator visibility issue in dock task manager

Influence:

  1. Test dock task manager in Efficient display mode
  2. Verify status indicator hides when window title is active
  3. Check status indicator shows correctly when title is not active
  4. Test with multiple windows open
  5. Verify behavior across different display modes

fix: 修复状态指示器在标题激活时错误显示的问题

状态指示器在高效显示模式下标题激活时错误显示。此修复添加了当
root.titleActive 为 true 时隐藏状态指示器的条件,确保指示器只在适当的
时候显示。

Log: 修复了任务管理器中状态指示器可见性问题

Influence:

  1. 在高效显示模式下测试任务管理器
  2. 验证状态指示器在窗口标题激活时隐藏
  3. 检查状态指示器在标题未激活时正确显示
  4. 测试多个窗口打开的情况
  5. 验证不同显示模式下的行为

Summary by Sourcery

Bug Fixes:

  • Hide the status indicator in Efficient display mode while the window title is active to prevent incorrect visibility.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Apr 1, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates the dock task manager app item so the status indicator in Efficient display mode is hidden whenever the window title is active, by tightening the QML visibility condition.

Flow diagram for status indicator visibility condition

flowchart TD
  A[root.displayMode === Dock.Efficient] -->|true| B[root.windows.length > 0]
  A -->|false| E[Status indicator hidden]
  B -->|false| E[Status indicator hidden]
  B -->|true| C[!root.titleActive]
  C -->|true| D[Status indicator visible]
  C -->|false| E[Status indicator hidden]
Loading

File-Level Changes

Change Details Files
Tighten the visibility condition of the status indicator so it does not show when the window title is active in Efficient display mode.
  • Extend the status indicator visible binding to also require !root.titleActive in addition to Efficient display mode and having one or more windows.
  • Ensure the status indicator only appears when there are windows and the title is not currently active, matching the intended UX.
panels/dock/taskmanager/package/AppItem.qml

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

Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • Consider extracting the visible expression into a named property or computed alias (e.g., root.showStatusIndicator) to make the visibility logic easier to read and reuse if similar conditions are needed elsewhere.
  • It may be worth double-checking whether root.titleActive fully captures all cases where the status indicator should be hidden (e.g., focus changes from keyboard vs mouse) and whether additional state flags (like window urgency) should override this condition.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider extracting the `visible` expression into a named property or computed alias (e.g., `root.showStatusIndicator`) to make the visibility logic easier to read and reuse if similar conditions are needed elsewhere.
- It may be worth double-checking whether `root.titleActive` fully captures all cases where the status indicator should be hidden (e.g., focus changes from keyboard vs mouse) and whether additional state flags (like window urgency) should override this condition.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@deepin-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, wjyrich

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

height: root.statusIndicatorSize
anchors.centerIn: iconContainer
visible: root.displayMode === Dock.Efficient && root.windows.length > 0
visible: root.displayMode === Dock.Efficient && root.windows.length > 0 && !root.titleActive
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

是拆分模式下所有item都不显示这个还是说针对单个item呀,

@deepin-bot
Copy link
Copy Markdown

deepin-bot bot commented Apr 7, 2026

TAG Bot

New tag: 2.0.35
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #1545

@deepin-bot
Copy link
Copy Markdown

deepin-bot bot commented Apr 7, 2026

TAG Bot

New tag: 2.0.36
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #1547

The status indicator was incorrectly showing when the title was active
in Efficient display mode. This fix adds a condition to hide the status
indicator when `root.titleActive` is true, ensuring the indicator only
appears when appropriate.

Log: Fixed status indicator visibility issue in dock task manager

Influence:
1. Test dock task manager in Efficient display mode
2. Verify status indicator hides when window title is active
3. Check status indicator shows correctly when title is not active
4. Test with multiple windows open
5. Verify behavior across different display modes

fix: 修复状态指示器在标题激活时错误显示的问题

状态指示器在高效显示模式下标题激活时错误显示。此修复添加了当
`root.titleActive` 为 true 时隐藏状态指示器的条件,确保指示器只在适当的
时候显示。

Log: 修复了任务管理器中状态指示器可见性问题

Influence:
1. 在高效显示模式下测试任务管理器
2. 验证状态指示器在窗口标题激活时隐藏
3. 检查状态指示器在标题未激活时正确显示
4. 测试多个窗口打开的情况
5. 验证不同显示模式下的行为
@wjyrich wjyrich force-pushed the fix-UIWithBackground branch from db3fc05 to 163cd0d Compare April 8, 2026 02:03
@wjyrich wjyrich closed this Apr 8, 2026
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