fix: reset fullscreen app list view position on frame switch#782
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 52cyb 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 @52cyb. Thanks for your PR. 😃 |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideResets the fullscreen app list view to the first item whenever switching into FullscreenFrame by marking the change as non-keyboard-driven before updating the current index, ensuring consistent scroll position and correct input state tracking. Sequence diagram for resetting fullscreen app list view on frame switchsequenceDiagram
participant LauncherController
participant FullscreenFrame
participant listviewPage
LauncherController->>FullscreenFrame: onCurrentFrameChanged()
alt [LauncherController.currentFrame == FullscreenFrame]
FullscreenFrame->>listviewPage: changedByNonKeyboard = true
FullscreenFrame->>listviewPage: setCurrentIndex(0)
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Hi @52cyb. 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. |
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Consider guarding the
listviewPageaccess inonCurrentFrameChanged(e.g., null/ready checks) to avoid potential runtime issues if the view is not yet initialized when the frame changes. - If other frames also need to reset or adjust the list view on entry, it may be cleaner to extract the
changedByNonKeyboard+setCurrentIndex(0)logic into a reusable helper to keep frame-change behavior consistent.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider guarding the `listviewPage` access in `onCurrentFrameChanged` (e.g., null/ready checks) to avoid potential runtime issues if the view is not yet initialized when the frame changes.
- If other frames also need to reset or adjust the list view on entry, it may be cleaner to extract the `changedByNonKeyboard` + `setCurrentIndex(0)` logic into a reusable helper to keep frame-change behavior consistent.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
1. When switching back to FullscreenFrame, the app list view now properly resets to the first item 2. Previously, the list view would not reset to the beginning when entering fullscreen mode from other frames 3. Added `changedByNonKeyboard = true` before setting current index to ensure proper state tracking 4. This prevents the list from retaining its previous scroll position, providing consistent user experience Log: Fixed fullscreen app list view not resetting to the first item when entering fullscreen mode Influence: 1. Test switching to FullscreenFrame from other frames (launcher, windowed mode) 2. Verify that app list scrolls to the first item on each entry 3. Check that keyboard navigation works correctly after the reset 4. Test with multiple apps installed to ensure scroll position properly resets 5. Verify no regressions in other list view behaviors fix: 进入全屏模式时重置应用列表视图位置 1. 当切换回FullscreenFrame时,应用列表视图现在会正确重置到第一项 2. 之前从其他框架进入全屏模式时,列表视图不会重置到顶部 3. 在设置当前索引之前添加`changedByNonKeyboard = true`以确保正确的状态 跟踪 4. 这防止了列表保留之前的滚动位置,提供一致的用户体验 Log: 修复进入全屏模式时应用列表视图未重置到第一项的问题 Influence: 1. 测试从其他框架(启动器、窗口模式)切换到FullscreenFrame 2. 验证每次进入时应用列表是否滚动到第一项 3. 检查重置后键盘导航是否正常工作 4. 安装多个应用测试以确保滚动位置正确重置 5. 验证没有影响其他列表视图行为的回归问题 PMS: BUG-366191
changedByNonKeyboard = truebefore setting current index to ensure proper state trackingLog: Fixed fullscreen app list view not resetting to the first item when entering fullscreen mode
Influence:
fix: 进入全屏模式时重置应用列表视图位置
changedByNonKeyboard = true以确保正确的状态 跟踪Log: 修复进入全屏模式时应用列表视图未重置到第一项的问题
Influence:
PMS: BUG-366191
Summary by Sourcery
Bug Fixes: