-
Notifications
You must be signed in to change notification settings - Fork 37
fix: fix touchscreen drag issue with hidden items #707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743 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 |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideReplaces visibility toggling with opacity changes for list item labels during drag operations in touchscreen contexts to prevent drag interruption while preserving the visual hiding behavior and existing interactions. Sequence diagram for touchscreen drag interaction with opacity-based hidingsequenceDiagram
actor User
participant Touchscreen
participant AppListView
participant ListItem
participant DragHandler
User->>Touchscreen: touchDown on list item
Touchscreen->>AppListView: emitPressEvent
AppListView->>ListItem: startDrag
ListItem->>DragHandler: Drag.active = true
Note over ListItem,DragHandler: New behavior using opacity
DragHandler->>ListItem: updateDragState
ListItem->>ListItem: set opacity = 0 (item visually hidden)
Touchscreen->>DragHandler: continueDragEvents
DragHandler->>AppListView: updateItemPosition
User-->>Touchscreen: touchMove continues
Touchscreen->>DragHandler: dragMove events uninterrupted
User-->>Touchscreen: touchRelease
Touchscreen->>DragHandler: dragEnd
DragHandler->>ListItem: Drag.active = false
ListItem->>ListItem: set opacity = 1 (item visible)
Note over Touchscreen,DragHandler: Drag gesture remains active because item stays visible to input system
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey - I've left some high level feedback:
- Switching from
visibletoopacitymeans these controls are still hit-testable when fully transparent; consider explicitly tyingenabled/hoverEnabled(and tooltip activation if needed) to the same condition so invisible labels don’t unexpectedly receive input. - The previous
visible: falsealso removed these items from layout/size calculations, whileopacity: 0does not; double-check any anchoring or implicit size dependencies and, if necessary, gate layout-affecting properties (likeLayout.*orimplicitHeight) on the same condition used for opacity.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Switching from `visible` to `opacity` means these controls are still hit-testable when fully transparent; consider explicitly tying `enabled`/`hoverEnabled` (and tooltip activation if needed) to the same condition so invisible labels don’t unexpectedly receive input.
- The previous `visible: false` also removed these items from layout/size calculations, while `opacity: 0` does not; double-check any anchoring or implicit size dependencies and, if necessary, gate layout-affecting properties (like `Layout.*` or `implicitHeight`) on the same condition used for opacity.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
1. Changed visibility control from `visible` property to `opacity` property in AppListView.qml and FreeSortListView.qml 2. This prevents drag interruption when items are hidden during drag operations 3. The issue occurred because setting `visible: false` during drag would interrupt the drag gesture on touchscreens 4. Using opacity instead maintains the visual hiding effect while keeping the item technically visible to the touch system Log: Fixed touchscreen drag issue where dragging would abnormally interrupt when items were hidden Influence: 1. Test touchscreen drag operations on both app list and free sort views 2. Verify that dragging items no longer interrupts when items become hidden 3. Check that visual appearance during drag is correct (items should be invisible but not disrupt drag) 4. Test mouse drag operations to ensure they still work correctly 5. Verify that tooltips and other interactive features still function properly fix: 修复触摸屏拖拽时隐藏项导致的问题 1. 在 AppListView.qml 和 FreeSortListView.qml 中将可见性控制从 `visible` 属性改为 `opacity` 属性 2. 这防止了在拖拽操作期间隐藏项目时拖拽被中断的问题 3. 问题发生在拖拽过程中设置 `visible: false` 会中断触摸屏上的拖拽手势 4. 使用透明度替代可以保持视觉隐藏效果,同时让项目在触摸系统中保持技术上 的可见性 Log: 修复了触摸屏拖拽问题,当项目隐藏时拖拽不再异常中断 Influence: 1. 测试应用列表和自由排序视图上的触摸屏拖拽操作 2. 验证拖拽项目时不再因项目隐藏而中断 3. 检查拖拽期间的视觉外观是否正确(项目应不可见但不中断拖拽) 4. 测试鼠标拖拽操作确保仍能正常工作 5. 验证工具提示和其他交互功能是否仍能正常使用 PMS: BUG-346077
deepin pr auto review这段代码变更主要涉及两个QML文件的修改,包括版权年份的更新和拖拽交互逻辑的调整。以下是对代码变更的详细审查意见: 1. 版权年份更新变更内容:将两个文件的版权年份范围从单一年份扩展为年份范围(2023-2026 和 2024-2026)。
2. 拖拽交互逻辑调整(
|
visibleproperty toopacityproperty in AppListView.qml and FreeSortListView.qml
operations
visible: falseduring drag wouldinterrupt the drag gesture on touchscreens
keeping the item technically visible to the touch system
Log: Fixed touchscreen drag issue where dragging would abnormally
interrupt when items were hidden
Influence:
hidden
invisible but not disrupt drag)
properly
fix: 修复触摸屏拖拽时隐藏项导致的问题
visible属性改为
opacity属性visible: false会中断触摸屏上的拖拽手势的可见性
Log: 修复了触摸屏拖拽问题,当项目隐藏时拖拽不再异常中断
Influence:
PMS: BUG-346077
Summary by Sourcery
Bug Fixes: