Repository navigation
Conversation
1. Introduce DockModeTransition to animate geometry, icons, and card opacity when switching dock modes. 2. Reparent and fade taskbar cards independently of the destination layout during transitions. 3. Replace DWindow rounded window with in-content shadow, border, and dynamic radius for full-width windows. 4. Expose contentGeometry and visualGeometry so D-Bus and X11 report the visible dock rect. 5. Drive fashionMode state from the transition alignment and gate interactions while animating. Log: Add an animated transition when switching the dock between classic and fashion modes. Influence: Dock mode switching becomes smooth and the reported geometry matches visible content. feat(dock): 新增经典与时尚模式切换动画 1. 引入 DockModeTransition,在切换 dock 模式时对几何、图标和卡片透明度做 动画。 2. 过渡期间独立于目标布局重新挂载并淡出任务栏卡片。 3. 用内容内阴影、边框和动态圆角替代 DWindow 圆角窗口,适配全宽窗口。 4. 新增 contentGeometry 与 visualGeometry,使 D-Bus 和 X11 上报可见的 dock 区域。 5. 时尚模式状态由过渡对齐方式驱动,动画期间禁用相关交互。 Log: 为 dock 在经典与时尚模式间切换新增过渡动画。 Influence: 模式切换更平滑,上报的几何区域与可见内容一致。 PMS: BUG-384085
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: wjyrich 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 3 issues
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="839" />
<code_context>
hoverEnabled: true
propagateComposedEvents: true
- enabled: !Panel.locked
+ enabled: !Panel.locked && !modeTransition.active
cursorShape: {
</code_context>
<issue_to_address>
**Clicks still affect the moving dock**
When the transition is active and the user clicks an icon or the dock background, the transition gates only `dragArea` and the card area, leaving `DockCenterPart` delegates, `dockContainer` TapHandlers, and task-item `MouseArea`s enabled; clicks on moving icons or the dock background launch apps or open and close menus during the intermediate layout.
Disable the delegates, TapHandlers, and task-item MouseAreas while `modeTransition.active`.
</issue_to_address>
### Comment 2
<location path="panels/dock/package/DockModeTransition.qml" line_range="92" />
<code_context>
+ active = true
+ // Use the normal destination layout for centered mode, and the
+ // compact layout for transitions involving classic mode.
+ alignment = toCentered ? Dock.CenterAlignment : Dock.FashionAlignment
+ animation.start()
+ } else {
</code_context>
<issue_to_address>
**Mode-dependent widgets jump early**
When the user switches from Fashion to left-aligned Classic mode, taskManager and spotlight tracking still use `Panel.fashionMode`, which switches to false as soon as Fashion→Left is requested, while `modeTransition.alignment` remains Fashion for the animation. Task sizing changes and hover tracking clears before the dock reaches its destination, so those elements jump out of sync with the transition.
Drive these mode-dependent consumers from the transition alignment, or defer their mode change until the transition finishes.
</issue_to_address>
### Comment 3
<location path="panels/dock/package/DockModeTransition.qml" line_range="95-96" />
<code_context>
+
+ function finishWhenWindowReady() {
+ if (waitingForWindow && geometryReady)
+ finish()
+ }
+
+ onGeometryReadyChanged: finishWhenWindowReady()
</code_context>
<issue_to_address>
**Rapid mode changes skip animation**
When a second alignment request arrives while the first mode transition is active, `finish()` stops the active animation and applies the latest alignment without starting a transition for it, so the dock jumps directly to the new mode instead of animating the second change.
After finishing or cancelling the active transition, compare the current and requested alignments and start a new animation when the latest request is eligible.
</issue_to_address>| hoverEnabled: true | ||
| propagateComposedEvents: true | ||
| enabled: !Panel.locked | ||
| enabled: !Panel.locked && !modeTransition.active |
There was a problem hiding this comment.
🟡 Medium · Clicks still affect the moving dock
When the transition is active and the user clicks an icon or the dock background, the transition gates only dragArea and the card area, leaving DockCenterPart delegates, dockContainer TapHandlers, and task-item MouseAreas enabled; clicks on moving icons or the dock background launch apps or open and close menus during the intermediate layout.
Disable the delegates, TapHandlers, and task-item MouseAreas while modeTransition.active.
Prompt for AI agents
In `panels/dock/package/main.qml` at line 839:
**Clicks still affect the moving dock**
When the transition is active and the user clicks an icon or the dock background, the transition gates only `dragArea` and the card area, leaving `DockCenterPart` delegates, `dockContainer` TapHandlers, and task-item `MouseArea`s enabled; clicks on moving icons or the dock background launch apps or open and close menus during the intermediate layout.
Disable the delegates, TapHandlers, and task-item MouseAreas while `modeTransition.active`.| active = true | ||
| // Use the normal destination layout for centered mode, and the | ||
| // compact layout for transitions involving classic mode. | ||
| alignment = toCentered ? Dock.CenterAlignment : Dock.FashionAlignment |
There was a problem hiding this comment.
🟡 Medium · Mode-dependent widgets jump early
When the user switches from Fashion to left-aligned Classic mode, taskManager and spotlight tracking still use Panel.fashionMode, which switches to false as soon as Fashion→Left is requested, while modeTransition.alignment remains Fashion for the animation. Task sizing changes and hover tracking clears before the dock reaches its destination, so those elements jump out of sync with the transition.
Drive these mode-dependent consumers from the transition alignment, or defer their mode change until the transition finishes.
Prompt for AI agents
In `panels/dock/package/DockModeTransition.qml` at line 92:
**Mode-dependent widgets jump early**
When the user switches from Fashion to left-aligned Classic mode, taskManager and spotlight tracking still use `Panel.fashionMode`, which switches to false as soon as Fashion→Left is requested, while `modeTransition.alignment` remains Fashion for the animation. Task sizing changes and hover tracking clears before the dock reaches its destination, so those elements jump out of sync with the transition.
Drive these mode-dependent consumers from the transition alignment, or defer their mode change until the transition finishes.| finish() | ||
| } |
There was a problem hiding this comment.
🟡 Medium · Rapid mode changes skip animation
When a second alignment request arrives while the first mode transition is active, finish() stops the active animation and applies the latest alignment without starting a transition for it, so the dock jumps directly to the new mode instead of animating the second change.
After finishing or cancelling the active transition, compare the current and requested alignments and start a new animation when the latest request is eligible.
Prompt for AI agents
In `panels/dock/package/DockModeTransition.qml` at lines 95-96:
**Rapid mode changes skip animation**
When a second alignment request arrives while the first mode transition is active, `finish()` stops the active animation and applies the latest alignment without starting a transition for it, so the dock jumps directly to the new mode instead of animating the second change.
After finishing or cancelling the active transition, compare the current and requested alignments and start a new animation when the latest request is eligible.
Log: Add an animated transition when switching the dock between classic and fashion modes.
Influence: Dock mode switching becomes smooth and the reported geometry matches visible content.
feat(dock): 新增经典与时尚模式切换动画
Log: 为 dock 在经典与时尚模式间切换新增过渡动画。
Influence: 模式切换更平滑,上报的几何区域与可见内容一致。
PMS: BUG-384085
Summary by Sourcery
Smooth dock mode switching with coordinated visual transitions and geometry reporting based on the visible dock content.
New Features:
Bug Fixes:
Enhancements: