Skip to content

Drag the lines between panes - #114

Open
rustytensor wants to merge 2 commits into
omacom:mainfrom
rustytensor:upstream-pane-widths
Open

rustytensor wants to merge 2 commits into
omacom:mainfrom
rustytensor:upstream-pane-widths

Conversation

@rustytensor

@rustytensor rustytensor commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

The lines beside the sidebar, between a split's two panes and after each column can now be dragged. Until you drag one, every pane is exactly as wide as it is today.

This is the cut-down version from the review: rebased onto main, no W, no sizing modes, and nothing for the details now that they are a column.

What you'd notice

  • Three lines can be dragged: the sidebar's, the one between a split's two panes, and the line after any column, which sizes all the columns together. The pointer turns into the resize cursor over a line. The lines get no handles or colors, so the window looks the same as before.
  • Double-clicking a line puts that pane back to its normal width.
  • A dragged width stays when you restart Folio.
  • Each pane has limits, so a drag can't hide one: the sidebar goes from 140 to 400 px, the columns from 180 to 480, and each pane of a split keeps at least 240 px. When the window is too small for that, the split stays even.
  • Dragging a column's line no longer jumps the view to the last column. The columns stay where they are scrolled to, and the line stays under the pointer.
  • Right to left, each line drags the other way, so a pane still grows when you drag its line away from it.
  • A line's grip covers the line and a few pixels of the pane after it. The scroll bar of the pane before it keeps its presses.

What changed

+141 −14, all QML and docs.

  • A new PaneDivider.qml is the grip on each line. It has no look of its own. A press only counts as a drag once the pointer has moved across by the system's drag distance.
  • Main.qml puts a grip on the sidebar's line and the split's line, and keeps the three widths in its Settings.
  • FolderColumns puts a grip on the line after each column. While a line is held it keeps the columns where they are instead of calling revealEnd().
  • The drag and the double-click are in the README and the ? overlay. The new strings are only in en.json.

Tested

There are no tests in this PR. I replaced them with gates: 15 checks with fixed expected results, kept outside the PR so it stays small. They are on the pane-lines-gates branch of my fork, and its README lists what each one expects.

The gates open Folio's real window and drag the lines in it. They cover the default widths, each drag, the double-click, the limits, right to left, a settings file with nonsense in it, a scroll bar next to a line, and the column view keeping its place. All 15 pass on Omarchy, and bin/test gives the same result as main: 289 passed, 1 skipped.

To run them, in a checkout of this branch that also has a local main:

git clone -b pane-lines-gates https://github.com/rustytensor/folio ../folio-gates
../folio-gates/gates.sh

It needs cmake and qmake6, and takes a few minutes because it rebuilds Folio and runs the whole test suite.

@greptile-apps

greptile-apps Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no blocking issues remain.

Summary

Adds draggable pane lines, saved widths, and double-click reset.

  • You can drag pane lines to resize the sidebar, split panes, and columns.

Reviews (7) · Last reviewed commit: "Keep 240 px for each pane of a split" · Reviewed by Greptile

Comment thread src/Main.qml Resolved
Comment thread src/FolderColumns.qml Resolved
@omarchybot omarchybot added the enhancement New feature or request label Nov 15, 2026
@dhh

dhh commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Thanks @rustytensor, being able to drag the lines between panes is a good idea and the PaneWidths sums are carefully done. It isn't mergeable as it stands, though, for three reasons:

  1. The details side pane is gone. Details are now a column in the columns view, after the selected file, filling the rest of the window. So the panes left to size are the sidebar, a split's two folder panes, and the columns. The details divider, its 220–600 limits, and Greptile's first thread (sidebar 400 + details 600 leaving no room for files) all go away with it.
  2. W's three modes are a product decision that hasn't been made, and they account for much of the size. Fixed widths plus dragging covers the need without a new key to learn.
  3. Proportion. +1475 with 850 lines of tests is a lot for dragging a few lines.

What would make it mergeable: rebase onto main and cut it down to dragging the sidebar's line, the line between a split's halves, and a column's line (sizing all the columns together), with double-click to reset and the widths kept in Settings, and no W. Please also fix Greptile's second thread: dragging a column line shouldn't call revealEnd() and jump the view to the last column. A focused version like that would be welcome.

@rustytensor

rustytensor commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks for the thorough review, @dhh. I started this while trying to port the Omarchy Hyprland setup to Fedora, and I've since dropped that. I'm on Omarchy now, which is also why I missed that the details pane had become a column.
You're right about the size. The tests were more than half of the diff, which is far too much for a feature whose scope wasn't settled. I'll rebase onto main and cut this down to what you described:

  • Dragging for the sidebar line, the split divider, and one column line that sizes all columns together
  • Double-click to reset, and widths saved in Settings
  • No W key and no sizing modes. Fixed widths plus dragging only
  • No revealEnd() call when a column line is dragged

The tests will cover only what's left.

@rustytensor rustytensor changed the title Drag the lines between panes, and pick their widths with W Drag the lines between panes Nov 23, 2026
@rustytensor

Copy link
Copy Markdown
Contributor Author

@dhh this is now rebased onto main and cut down to what you described. The description above is rewritten to match.

I said the tests would cover only what's left. I took them out of the PR instead and replaced them with gates, so the diff is +141 and all QML. The gates are on the pane-lines-gates branch of my fork if you want to run them yourself.

Comment thread src/Main.qml Resolved
Comment thread src/Main.qml Resolved
Comment thread src/FolderColumns.qml Resolved
The sidebar, a split's two panes and the columns can be sized by dragging
the line beside them. A column's line sizes all the columns together.
Double-clicking a line puts its pane back, and a dragged width is kept
between launches.

Each pane has limits, so a drag can't hide one: the sidebar goes from 140
to 400 px, the columns from 180 to 480, and a split's left pane keeps a
share of the room the two panes have.

While a column's line is held, the columns stay where they are scrolled
to instead of jumping to the last one.
@rustytensor
rustytensor force-pushed the upstream-pane-widths branch 2 times, most recently from 27ddf90 to 1cf03e7 Compare November 23, 2026 18:01
A share of the room protected nothing in a small window: at 720 px with
the sidebar at its widest, dragging the split's line left one pane 79 px
wide. Each pane now keeps at least 240 px, and when the room is too small
for that the split stays even.
@rustytensor

Copy link
Copy Markdown
Contributor Author

The red check here is thumbnailsCancelRunningHelpersAndAvoidFailureMarker, which this PR does not touch. It is a race in the test itself, and it shows on CI runners with four cores. I have sent a fix for the test as #224. Once that is in, this one should go green on a rerun.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants