fix(list): autofit columns on resize-handle double-click - #1116
Open
JoeJoeflyn wants to merge 1 commit into
Open
JoeJoeflyn wants to merge 1 commit into
JoeJoeflyn wants to merge 1 commit into
Conversation
Registered cells carry the column's fixed width_request and their labels cap natural width at one character, so measuring them echoed the current width back and the autofit could never change anything. Measure each cell with both constraints lifted instead.
JoeJoeflyn
force-pushed
the
fix/1115-list-column-autofit
branch
from
September 18, 2026 11:46
62efa50 to
d4d822a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Double-clicking a List-view column resize handle was a no-op:
register_list_column_cellapplies the column's fixedwidth_requestto every registered cell, someasure()insidemax_child_natural_widthechoed the current width back, and all row/heading labels cap natural width at one character viamax_width_chars(1). The autofit could therefore never change the width.This measures each registered cell with both constraints lifted (
list_cell_content_widthclears the cell'swidth_requestand descendant labels'max_width_chars, measures, then restores them), so double-click now expands the column to fit its widest content — matching the Miller-columns behavior added in #114. The same code path serves the FileChooser dialog, which is fixed identically.Also includes a separate
style:commit applying rustfmt to files that drifted on main.Visual evidence
screenrecording-2026-09-18_18-14-31.mp4
Pending — needs owner upload.
ghcannot attach images; please drag these into the editor:target/pr-captures/autofit-before.png— Name column manually narrowed, long filename ellipsizedtarget/pr-captures/autofit-after.png— after double-click on the resize handle: column expanded, full filename visibleHow to test
Expected result: the column expands to fit its widest entry. Works the same in the FileChooser dialog's list view.
Related issue
Closes #1115