Repository navigation
Drag the lines between panes - #114
rustytensor wants to merge 2 commits into
Conversation
[Medium impact] The PR appears safe to merge; no blocking issues remain. SummaryAdds draggable pane lines, saved widths, and double-click reset.
Reviews (7) · Last reviewed commit: "Keep 240 px for each pane of a split" · Reviewed by Greptile |
|
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:
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. |
|
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.
The tests will cover only what's left. |
089894b to
22bc5e7
Compare
|
@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 |
89c7044 to
01ac096
Compare
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.
27ddf90 to
1cf03e7
Compare
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.
1cf03e7 to
d2ebd2f
Compare
|
The red check here is |
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
What changed
+141 −14, all QML and docs.
PaneDivider.qmlis 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.qmlputs a grip on the sidebar's line and the split's line, and keeps the three widths in its Settings.FolderColumnsputs a grip on the line after each column. While a line is held it keeps the columns where they are instead of callingrevealEnd().?overlay. The new strings are only inen.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-gatesbranch 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/testgives the same result as main: 289 passed, 1 skipped.To run them, in a checkout of this branch that also has a local
main:It needs
cmakeandqmake6, and takes a few minutes because it rebuilds Folio and runs the whole test suite.