Skip to content

Conversation

@robertkill
Copy link
Contributor

@robertkill robertkill commented Jun 5, 2025

Introduce a Connections block to handle stashedPopup.popupVisibleChanged signal. When the popup is hidden and no item is being dragged, reset dropHoverIndex to -1. This ensures proper state management when the popup visibility changes.

pms: BUG-317959

Summary by Sourcery

Bug Fixes:

  • Reset dropHoverIndex when the stash popup is hidden and no item is dragging to prevent stale hover state.

Add popup visibility handler to ActionShowStashDelegate

Introduce a Connections block to handle `stashedPopup.popupVisibleChanged` signal. When the popup is hidden and no item is being dragged, reset `dropHoverIndex` to -1. This ensures proper state management when the popup visibility changes.

pms: BUG-317959
@sourcery-ai
Copy link

sourcery-ai bot commented Jun 5, 2025

Reviewer's Guide

Implements a Connections block to listen for stashedPopup.popupVisibleChanged, resetting dropHoverIndex to -1 when the popup closes without an active drag to maintain correct state management.

File-Level Changes

Change Details Files
Add handler for popup visibility changes to reset dropHoverIndex
  • Inserted a Connections block targeting stashedPopup
  • Defined onPopupVisibleChanged callback
  • Reset dropHoverIndex to -1 when popupVisible is false and stashItemDragging is false
panels/dock/tray/package/ActionShowStashDelegate.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

@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • 新增的Connections块中,target属性指向stashedPopup,但未看到stashedPopup的定义,需要确认其存在且类型正确。
  • onPopupVisibleChanged函数中,dropHoverIndex被设置为-1,但没有看到dropHoverIndex的定义,需要确认其存在且类型正确。
  • onPopupVisibleChanged函数中,stashedPopup.stashItemDragging属性被检查,但没有看到stashItemDragging的定义,需要确认其存在且类型正确。

是否建议立即修改:

@robertkill robertkill changed the title fix: Add popup visibility handler to ActionShowStashDelegate fix: The tray window panel automatically opens Jun 5, 2025
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 @robertkill - I've reviewed your changes - here's some feedback:

  • The description mentions logging the popup visibility change, but the handler only resets dropHoverIndex—consider adding a console.log call (or equivalent) inside onPopupVisibleChanged to record the event.
  • Instead of a separate Connections block, you could define onPopupVisibleChanged directly on the stashedPopup element to keep the handler co-located and avoid null-target issues.
  • Consider placing the visibility-changed handler adjacent to the stashedPopup declaration for better readability and context.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

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: BLumia, robertkill

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

@robertkill
Copy link
Contributor Author

/forcemerge

@deepin-bot
Copy link

deepin-bot bot commented Jun 5, 2025

This pr force merged! (status: blocked)

@deepin-bot deepin-bot bot merged commit b378fe6 into linuxdeepin:master Jun 5, 2025
7 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