Skip to content

Feature: Added support for resizing columns in the Columns View #17380

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

Merged

Conversation

workbysaran
Copy link
Contributor

@workbysaran workbysaran commented Jul 31, 2025

Resolved / Related Issues

Partially addresses #6534

  • Support for resizing columns
  • Columns sizes should be saved across sessions
  • Double clicking the resize bar should size the column to fit

Steps used to test these changes

  1. Opened Files and confirmed that:

    • Columns are resizable using the splitter between them
    • Cursor changes to a resize icon when hovering over the column divider
    • Double-clicking the divider resets to default width
    • Content inside each column adjusts correctly to new width
    • No visual glitches appear when resizing multiple columns rapidly
  2. Verified that:

    • Column resizing works with mouse.
    • Resizing does not interfere with item selection, list scroll or navigation
    • Minimum and maximum column widths are respected

Closes [Feature: Make columns resizable in Column Layout](files-community#6534)

---

### **Steps used to test these changes**

1. Opened Files and confirmed that:
   - Columns are resizable using the splitter between them
   - Cursor changes to a resize icon when hovering over the column divider
   - Double-clicking the divider resets to default width
   - Content inside each column adjusts correctly to new width
   - No visual glitches appear when resizing multiple columns rapidly

2. Verified that:
   - Column resizing works with mouse.
   - Resizing does not interfere with item selection, list scroll or navigation
   - Minimum and maximum column widths are respected
@yaira2 yaira2 self-requested a review July 31, 2025 14:18
Partially addresses files-community#6534
- [x] Support for resizing columns
- [ ] Columns sizes should be saved across sessions
- [x] Double clicking the resize bar should size the column to fit

**Steps used to test these changes**

1. Opened Files and confirmed that:
   - Double-clicking the divider set the size the column to fit

2. Verified that:
   - Column auto resizing work
@yaira2 yaira2 changed the title Feature: Make columns resizable in Column Layout Feature: Added support for resizing columns in the Columns View Jul 31, 2025
@yaira2 yaira2 requested a review from Copilot July 31, 2025 18:55
Copy link
Contributor

@Copilot 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 adds resizable column functionality to the BladeView control, allowing users to dynamically adjust column widths through mouse interaction.

  • Added a resizer border element to the BladeView template with manipulation and pointer event handlers
  • Implemented resizing logic with minimum width constraints and double-click auto-sizing functionality
  • Added visual state management for resizer hover and pressed states

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.

File Description
BladeView.xaml Adds resizer UI element and visual states for resizing interaction
BladeItem.cs Implements resizing behavior, event handlers, and optimal width calculation logic

- Removed debug logging for error messages in `BladeItem.cs` to streamline the code.
- Cleaned up `BladeView.xaml` by removing unnecessary event handlers related to `BladeResizer`.
- Fixed whitespace-related issues.
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 ready to merge Pull requests that are approved and ready to merge and removed needs - code review labels Aug 1, 2025
@yaira2 yaira2 merged commit c18be52 into files-community:main Aug 1, 2025
6 checks passed
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.

2 participants