Repository navigation
Conversation
1. Root cause: onHideStateChanged handler only restarted hideTimer when hideState changed to Dock.Hide, but omitted calling Panel.requestClosePopup() to close the overflow popup 2. Fix: add Panel.requestClosePopup() call alongside hideTimer.restart() in the Dock.Hide branch, matching the pattern used by sibling handlers like onPositionChanged and onDockScreenChanged 3. Impact: overflow popup now closes when dock transitions to hidden state, no change to show/hide animation logic or normal display Log: 修复任务栏隐藏时溢出区域弹出层未关闭的问题 Influence: 1. Test overflow popup closes when dock hides with smart-hide mode 2. Test overflow popup still works normally when dock is visible 3. Verify dock show/hide animation is not affected 4. Test overflow popup closes when dock moves to another screen fix: 修复任务栏隐藏时溢出区域弹出层未关闭的问题 1. 根因:onHideStateChanged handler 在 hideState 变为 Dock.Hide 时 仅重启 hideTimer,遗漏了调用 Panel.requestClosePopup() 关闭溢出 区域弹出层 2. 方案:在 Dock.Hide 分支中补充 Panel.requestClosePopup() 调用, 与 onPositionChanged、onDockScreenChanged 等同级 handler 保持 一致的弹出层关闭行为 3. 影响:任务栏隐藏时溢出区域弹出层将正常关闭,不影响显示/隐藏 动画逻辑和正常显示行为 Log: 修复任务栏隐藏时溢出区域弹出层未关闭的问题 Influence: 1. 测试智能隐藏模式下任务栏隐藏时溢出区域弹出层是否关闭 2. 测试任务栏可见时溢出区域弹出层功能是否正常 3. 验证任务栏显示/隐藏动画不受影响 4. 测试任务栏切换屏幕时溢出区域弹出层是否关闭 PMS: BUG-384781
Reviewer's GuideImplementationClose any open popup when the dock enters the hidden state, alongside starting the hide timer.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mhduiy 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 |
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="panels/dock/package/main.qml" line_range="777" />
<code_context>
function onHideStateChanged() {
if (Panel.hideState === Dock.Hide) {
hideTimer.running = true
+ Panel.requestClosePopup()
} else {
// Only restart animation if not already running or if visible state doesn't match
</code_context>
<issue_to_address>
**Dock and popup stay visible**
When an overflow popup is open and the user moves away in smart-hide or keep-hidden mode, `DockHelper::checkNeedHideOrNot()` keeps `needHide` false while the popup is in `m_transientChildShows`, so `Panel.hideState` never becomes `Dock.Hide` and `onHideStateChanged()` never reaches `Panel.requestClosePopup()`; the dock and popup stay visible.
Close the transient popup before the transient-child check prevents `needHide` from becoming true.
</issue_to_address>| function onHideStateChanged() { | ||
| if (Panel.hideState === Dock.Hide) { | ||
| hideTimer.running = true | ||
| Panel.requestClosePopup() |
There was a problem hiding this comment.
🟠 High · Dock and popup stay visible
When an overflow popup is open and the user moves away in smart-hide or keep-hidden mode, DockHelper::checkNeedHideOrNot() keeps needHide false while the popup is in m_transientChildShows, so Panel.hideState never becomes Dock.Hide and onHideStateChanged() never reaches Panel.requestClosePopup(); the dock and popup stay visible.
Close the transient popup before the transient-child check prevents needHide from becoming true.
Prompt for AI agents
In `panels/dock/package/main.qml` at line 777:
**Dock and popup stay visible**
When an overflow popup is open and the user moves away in smart-hide or keep-hidden mode, `DockHelper::checkNeedHideOrNot()` keeps `needHide` false while the popup is in `m_transientChildShows`, so `Panel.hideState` never becomes `Dock.Hide` and `onHideStateChanged()` never reaches `Panel.requestClosePopup()`; the dock and popup stay visible.
Close the transient popup before the transient-child check prevents `needHide` from becoming true.
|
Root Cause Analysis
The
onHideStateChangedhandler inpanels/dock/package/main.qml(line 1074) only callshideTimer.restart()whenPanel.hideStatetransitions toDock.Hide, but omits callingPanel.requestClosePopup()to close any open popup (e.g. the overflow area popup). TherequestClosePopupfunction is already called in 7 other state-change handlers (onPositionChanged,onDockScreenChanged, etc.), but was missing in this one. When the overflow popup is open and the dock transitions to hidden, the popup remains inDockHelper::m_transientChildShows, causingcheckNeedHideOrNot()to setneedHide = false, so both the dock and the popup stay visible.Fix
Add
Panel.requestClosePopup()call in theDock.Hidebranch ofonHideStateChanged, alongside the existinghideTimer.restart(). This matches the pattern used by all sibling state-change handlers.Change Safety Assessment
Code Safety
requestClosePopup, defined in the same file atonRequestClosePopuphandler, line 1098)requestClosePopupcalls were added or removed inonHideStateChanged; this change does not revert any historical fixBusiness Impact Scope
panels/dock/package/main.qml)Verification Suggestion
根因分析
panels/dock/package/main.qml(第 1074 行)的onHideStateChanged处理器在Panel.hideState变为Dock.Hide时仅调用hideTimer.restart(),未调用Panel.requestClosePopup()关闭已打开的弹出窗口(如溢出区域)。requestClosePopup已在其余 7 处状态变更处理器中调用,唯独此处遗漏。溢出区域弹出窗口打开时留在DockHelper::m_transientChildShows中,导致checkNeedHideOrNot()的needHide &= !show将needHide置为 false,任务栏与弹出窗口持续可见。修复方案
在
onHideStateChanged的Dock.Hide分支中补充Panel.requestClosePopup()调用,与所有同级状态变更处理器的行为模式一致。改动安全评估
代码安全评估
requestClosePopup,定义于同文件onRequestClosePopuphandler,第 1098 行)onHideStateChanged从未添加过requestClosePopup调用,本次修改不与任何历史修复冲突业务影响范围
panels/dock/package/main.qml)验证建议
Summary by Sourcery
Bug Fixes: