Skip to content

Conversation

@wjyrich
Copy link
Contributor

@wjyrich wjyrich commented Aug 8, 2025

  1. Added toolTip.close() before toggling show desktop
  2. Prevents tooltip from remaining visible after clicking
  3. Improves visual consistency when interacting with the dock

fix: 在显示桌面操作前关闭工具提示

  1. 在切换显示桌面之前添加了toolTip.close()
  2. 防止点击后工具提示仍然可见
  3. 提高了与dock交互时的视觉一致性

Pms: BUG-324009

Summary by Sourcery

Bug Fixes:

  • Invoke toolTip.close() before toggling show desktop to prevent the tooltip from remaining visible after clicking

1. Added toolTip.close() before toggling show desktop
2. Prevents tooltip from remaining visible after clicking
3. Improves visual consistency when interacting with the dock

fix: 在显示桌面操作前关闭工具提示

1. 在切换显示桌面之前添加了toolTip.close()
2. 防止点击后工具提示仍然可见
3. 提高了与dock交互时的视觉一致性

Pms: BUG-324009
@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • onClicked事件处理函数中新增了toolTip.close(),需要确认这是否是预期的行为,以及是否有必要在点击时关闭工具提示。
  • Applet.toggleShowDesktop()函数调用没有问题,但应确保该函数在所有情况下都能正常工作,并且不会导致应用程序崩溃。

是否建议立即修改:

  • 是,需要确认新增的toolTip.close()行为是否符合预期,并确保Applet.toggleShowDesktop()函数调用是安全的。

@sourcery-ai
Copy link

sourcery-ai bot commented Aug 8, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

In the onClicked handler for the Show Desktop applet, a call to toolTip.close() has been added before toggling the desktop state to prevent lingering tooltips and improve visual consistency.

Sequence diagram for Show Desktop applet click interaction update

sequenceDiagram
    actor User
    participant ShowDesktopApplet as ShowDesktop Applet
    participant ToolTip
    participant Desktop

    User->>ShowDesktopApplet: Click
    ShowDesktopApplet->>ToolTip: close()
    ShowDesktopApplet->>Desktop: toggleShowDesktop()
Loading

File-Level Changes

Change Details Files
Close tooltip before toggling show desktop
  • Insert toolTip.close() at the start of the onClicked handler
  • Ensure tooltip is hidden prior to invoking Applet.toggleShowDesktop()
panels/dock/showdesktop/package/showdesktop.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

@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 @wjyrich - I've reviewed your changes - here's some feedback:

  • Add a guard to ensure toolTip is defined before calling close (e.g., if (toolTip) toolTip.close()) to avoid potential undefined reference errors.
  • Consider extracting common tooltip-close logic into a helper so you can reuse it across other AppletItem interactions for consistent behavior.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Add a guard to ensure toolTip is defined before calling close (e.g., if (toolTip) toolTip.close()) to avoid potential undefined reference errors.
- Consider extracting common tooltip-close logic into a helper so you can reuse it across other AppletItem interactions for consistent behavior.

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

[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

@wjyrich
Copy link
Contributor Author

wjyrich commented Aug 8, 2025

/forcemerge

@deepin-bot
Copy link

deepin-bot bot commented Aug 8, 2025

This pr force merged! (status: unstable)

@deepin-bot deepin-bot bot merged commit 1b1b267 into linuxdeepin:master Aug 8, 2025
9 of 10 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