Skip to content

Conversation

@workbysaran
Copy link
Contributor

Resolved / Related Issues
Fixed an issue where the horizontal scrollbar in Columns Layout did not automatically scroll to show newly opened folder columns, leaving them partially visible.

Closes #17755

Steps used to test these changes

  1. Single folder navigation
    • Open Files app in Columns Layout view
    • Click on any subfolder
    • Verify the new column is fully visible and scrolled into view
  2. Deep folder navigation with long file/folder name
    • Navigate to a deep path (e.g., C:\Users[Name]\Documents\Folder1\Folder2\My very very long folder in Windows)
    • Verify each newly opened column scrolls into view smoothly
    • Verify columns are fully visible regardless of width

UpdateLayout();
GetScrollViewer()?.ChangeView(_scrollViewer.ScrollableWidth, null, null);
// The following line doesn't work as expected due to the items not being fully loaded yet and thus the scrollable width not being accurate.
//GetScrollViewer()?.ChangeView(_scrollViewer.ScrollableWidth, null, null);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be removed?

Copy link
Member

@yaira2 yaira2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yaira2 yaira2 added the ready to merge Pull requests that are approved and ready to merge label Nov 5, 2025
@yaira2 yaira2 requested a review from Copilot November 5, 2025 20:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an issue with scrolling to the end of a blade view when the scrollable width is not yet accurate. The solution defers scrolling until after the layout is updated, ensuring items are fully loaded.

  • Introduced a new ScrollToEnd() method that waits for layout updates before scrolling
  • Added a call to ScrollToEnd() after setting blade width in the columns layout
  • Commented out the non-working immediate scroll approach in ItemsVectorChanged

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/Files.App.Controls/BladeView/BladeView.cs Added ScrollToEnd() method with layout-deferred scrolling and commented out immediate scroll that didn't work
src/Files.App/Views/Layouts/ColumnsLayoutPage.xaml.cs Called ScrollToEnd() after setting blade width to ensure scroll happens after layout completes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready to merge Pull requests that are approved and ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Column layout not always scrolled to the right when opening a folder

2 participants