-
Notifications
You must be signed in to change notification settings - Fork 42
feat: change scroll trigger from click to hover #524
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
Conversation
Changed ArrowListView button behavior from click-based to hover-based scrolling 1. Replaced Button with ActionButton component for better hover handling 2. Added timer-based auto-scrolling with initial 300ms delay and 100ms repeat interval 3. Implemented state machine to manage hover detection and scroll execution 4. Modified layout properties to use Layout.fillWidth for better button sizing 5. Removed onClicked handler and replaced with unified performScroll function feat: 将滚动触发方式从点击改为悬停 将 ArrowListView 按钮行为从基于点击改为基于悬停的滚动 1. 将 Button 替换为 ActionButton 组件以更好地处理悬停 2. 添加基于计时器的自动滚动,具有 300 毫秒初始延迟和 100 毫秒重复间隔 3. 实现状态机来管理悬停检测和滚动执行 4. 修改布局属性使用 Layout.fillWidth 以获得更好的按钮尺寸 5. 移除 onClicked 处理程序并替换为统一的 performScroll 函数 PMS: BUG-314007 BUG-278225
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#524
deepin pr auto review代码审查报告1. ArrowListView.qml 的修改语法逻辑
代码质量
代码性能
代码安全
2. ArrowListViewButton.qml 的修改语法逻辑
代码质量
代码性能
代码安全
改进建议
总体而言,这些修改提高了组件的功能性和用户体验,同时保持了代码的清晰和可维护性。 |
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 there - I've reviewed your changes - here's some feedback:
- Consider making the 300ms initial delay and 100ms repeat interval configurable properties or style constants instead of hardcoding them.
- To avoid potential race conditions, explicitly stop both the initialDelayTimer and hoverScrollTimer in onShouldAutoScrollChanged when shouldAutoScroll becomes false.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider making the 300ms initial delay and 100ms repeat interval configurable properties or style constants instead of hardcoding them.
- To avoid potential race conditions, explicitly stop both the initialDelayTimer and hoverScrollTimer in onShouldAutoScrollChanged when shouldAutoScroll becomes false.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Reviewer's GuideThis PR transitions ArrowListView scrolling from click-triggered to hover-driven behavior by swapping to ActionButton, refactoring click logic into a unified performScroll function, introducing a timer–based auto-scroll state machine, and updating layout sizing to use fillWidth. File-Level Changes
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: 18202781743, BLumia, 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 |
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#524
Changed ArrowListView button behavior from click-based to hover-based
scrolling
repeat interval
execution
sizing
function
feat: 将滚动触发方式从点击改为悬停
将 ArrowListView 按钮行为从基于点击改为基于悬停的滚动
PMS: BUG-314007 BUG-278225
Summary by Sourcery
Enable hover-based auto-scrolling for arrow buttons in ArrowListView and adjust their layout and logic accordingly.
New Features:
Enhancements: