fix(dock-tray): prevent stash popup from closing during drag-and-drop - #1685
fix(dock-tray): prevent stash popup from closing during drag-and-drop#1685MyLeeJiEun wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Sorry @MyLeeJiEun, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
|
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. |
Reviewer's GuideThis PR refines the tray/stash popup’s drag-and-drop behavior by tracking drag context and drop success, and conditionally suppressing the auto-close timers so the stash panel stays open during valid drag operations while still closing correctly in other cases. Sequence diagram for updated drag-and-drop stash popup behaviorsequenceDiagram
actor User
participant Panel
participant TrayContainer
participant StashContainer
participant StashedPopup as stashedPopup
participant CloseTimerTray as closeStashPopupTimerTray
participant CloseTimerBtn as closeStashPopupTimerButton
User->>Panel: start drag
Panel->>Panel: contextDragging = true (onContextDraggingChanged)
Panel->>StashedPopup: wasOpenBeforeDrag = popupVisible
Panel->>StashedPopup: stashDropSucceeded = false
Note over CloseTimerTray,CloseTimerBtn: Timers see Panel.contextDragging and do not run
alt drop on stash button (TrayContainer)
User->>TrayContainer: drop
TrayContainer->>DDT.TraySortOrderModel: dropToDockTray(surfaceId, index, isBefore)
DDT.TraySortOrderModel-->>TrayContainer: success
TrayContainer->>TrayContainer: isDroppedOnStashButton = (SurfaceIdRole == internal/action-show-stash)
TrayContainer-->>StashedPopup: onStashDropSucceeded()
StashedPopup->>StashedPopup: stashDropSucceeded = true
else drop into stash popup (StashContainer)
User->>StashContainer: drop
StashContainer->>DDT.TraySortOrderModel: dropToStashTray(surfaceId, 0, false)
DDT.TraySortOrderModel-->>StashContainer: success
StashContainer-->>StashedPopup: onStashDropSucceeded()
StashedPopup->>StashedPopup: stashDropSucceeded = true
end
User->>Panel: end drag
Panel->>Panel: contextDragging = false (onContextDraggingChanged)
CloseTimerTray->>CloseTimerTray: running = !Panel.contextDragging
CloseTimerBtn->>CloseTimerBtn: running = !Panel.contextDragging
CloseTimerTray->>StashedPopup: onTriggered
alt wasOpenBeforeDrag == false and stashDropSucceeded == false and !dropHover
CloseTimerTray->>StashedPopup: close()
end
CloseTimerBtn->>StashedPopup: onTriggered
alt wasOpenBeforeDrag == false and stashDropSucceeded == false
CloseTimerBtn->>StashedPopup: close()
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
ed68d70 to
ff8dd8a
Compare
1. Added contextDragging check to keep the close timer from running during drag 2. Track wasOpenBeforeDrag flag to distinguish user-initiated open from drag open 3. Track stashDropSucceeded flag to prevent closing when drag successfully moves to stash 4. Wired up onStashDropSucceeded callbacks from both StashContainer and TrayContainer Log: Fix stash popup being unexpectedly closed during drag-and-drop operations Influence: Resolves popup close behavior during drag fix(dock-tray): 修复拖拽过程中 stash 面板意外关闭的问题 1. 添加 contextDragging 检查,防止拖拽中关闭计时器运行 2. 记录 wasOpenBeforeDrag 标记,区分用户主动打开和拖拽打开 3. 记录 stashDropSucceeded 标记,防止拖拽成功移入 stash 后关闭面板 4. 连接 StashContainer 和 TrayContainer 的拖拽成功回调 Log: 修复拖拽操作时 stash 面板被意外关闭的问题 PMS: BUG-336185 Influence: 解决拖拽时面板关闭行为异常
ff8dd8a to
35bbf79
Compare
Log: Fix stash popup being unexpectedly closed during drag-and-drop operations
Influence: Resolves popup close behavior during drag
fix(dock-tray): 修复拖拽过程中 stash 面板意外关闭的问题
Log: 修复拖拽操作时 stash 面板被意外关闭的问题
PMS: BUG-336185
Influence: 解决拖拽时面板关闭行为异常
Summary by Sourcery
Adjust dock tray stash popup behavior to remain open and avoid unintended closure during drag-and-drop operations.
Bug Fixes:
Enhancements: