Skip to content

fix: reset fullscreen app list view position on frame switch#782

Open
52cyb wants to merge 1 commit into
linuxdeepin:masterfrom
52cyb:master
Open

fix: reset fullscreen app list view position on frame switch#782
52cyb wants to merge 1 commit into
linuxdeepin:masterfrom
52cyb:master

Conversation

@52cyb

@52cyb 52cyb commented Jul 6, 2026

Copy link
Copy Markdown
  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

Summary by Sourcery

Bug Fixes:

  • Ensure the fullscreen app list view scroll position resets to the first item when entering FullscreenFrame from other frames.

@deepin-ci-robot

Copy link
Copy Markdown

[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.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-ci-robot

Copy link
Copy Markdown

Hi @52cyb. Thanks for your PR. 😃

@sourcery-ai

sourcery-ai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Resets 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 switch

sequenceDiagram
    participant LauncherController
    participant FullscreenFrame
    participant listviewPage

    LauncherController->>FullscreenFrame: onCurrentFrameChanged()
    alt [LauncherController.currentFrame == FullscreenFrame]
        FullscreenFrame->>listviewPage: changedByNonKeyboard = true
        FullscreenFrame->>listviewPage: setCurrentIndex(0)
    end
Loading

File-Level Changes

Change Details Files
Ensure the fullscreen app list view always resets to the first item when switching into FullscreenFrame, while correctly marking the change as initiated by non-keyboard input.
  • Hook into current frame change handling to detect transitions into FullscreenFrame.
  • Set the list view page state flag to indicate the current index change is caused by non-keyboard interaction.
  • Reset the list view current index to the first item on entering fullscreen mode to clear any previous scroll position.
qml/FullscreenFrame.qml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@deepin-ci-robot

Copy link
Copy Markdown

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions 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.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

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:

  • 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.
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.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants