Repository navigation
feat(columns): make the focused column the first column - #1925
Conversation
Add a `make_first_column` command (Alt+Down in the default map) that, in Columns view, drops the columns before the focused one and keeps the columns after it. Focus and the cursor stay on the same item, and the change is a history step, so Back restores the whole strip. It does nothing in the first column, in Icons and List, and in 10xer mode, which keeps its own parent, current and preview strip. The command is listed in Settings > Keyboard and in the Columns section of the shortcut reference. Closes lgse#1922
ReviewBlocking: Hungarian catalog is missing the new stringThis branch is based on The branch merges into Fix: merge Minor
Checked, no issues
I reviewed this by reading the code and test-merging against |
|
Thanks for the review and for pushing the fixes (Hungarian string, key order, consuming Alt+Down only when the strip is re-rooted, keeping the selection). I updated the description to say 13 catalogs. |
…sed-column-first # Conflicts: # src/app/browser.rs # src/app/navigation.rs # src/app/navigation/tests.rs # src/ui/browser.rs # src/ui/shortcut_reference.rs # src/ui/window/keyboard/items.rs
|
Merged the latest
One fix on top: the The navigation, browser, keyboard and shortcut tests pass locally. |
Columns re-roots the strip at the focused column and Back restores it; List leaves the strip alone.
… a column first The cursor now starts on the second of two selected items, so dropping the reorder that hands the cursor back to its own item fails the test.
… covers app::browser::tests::navigation::making_a_column_first_keeps_later_columns_focus_and_cursor checks the kept path, the first-column and past-the-end no-ops, and Back to the whole strip.
…thing in choosers
Both columns reload after the re-root; the cursor lands in column 0 once it lists, which can finish after column 1.
Review and cleanupStacked on #2070. This PR's base is now CI has not run yet. The Merged Review against the description and #1922.
Fixes pushed
Tests removed
Validation
Follow-ups outside this PR
|
Resolve conflicts with the stacked PRs (lgse#2070, lgse#1925, lgse#1924, lgse#1826, lgse#1802) and re-home the bookmark changes in the files they split: - keys/conflicts.rs: keep the split step_digits/fixed_top_level_key and give the bookmark groups no digit range; - keys/label.rs: keep both the two-key Digits `then` and the Letters range; - keys/tests.rs: take the split modules and move the Letters cases of catalog_bindings_use_the_canonical_key and every_listed_binding_has_its_own_row_in_its_maps into tests/catalog.rs; - shortcut_footer.rs: take the split modules and move the chord panel refill (show while rows exist, so the ' menu appears once the saved letters load) into shortcut_footer/indicators.rs; - tenxer_mode.rs: add the bookmark marks and options next to FolderAction; - window/keyboard.rs: take the split key routing, keep the pending bookmark cancel before the tab-shortcut check, and move the focus and mode-exit cancels into keyboard/footer_bindings.rs; - keymap.md: list the bookmark chords alongside `; .`; - keyboard_dispatch.rs: declare both letter_bookmarks and list_motion.
Description
Adds a
make_first_columncommand for Columns view. Alt+Down in the default map makes the focused column the first one: the columns to its left close, the columns to its right stay open, and focus and the cursor stay on the same item.NavigationState::go_to_column(depth)records the current path the waygo_parentdoes and returns the path fromdepthon, so Back/Alt+Left restores the whole strip.Browser::make_first_columnrestores that path through the same code as Back/Forward/Parent. The shared part ofrestore_pathmoved intorestore_path_focused, which takes the column to focus and its preferred cursor;restore_pathkeeps its behavior (last column, came-from child).default_onlyblock: 10xer keeps its parent, current and preview strip.docs/keyboard-navigation.md.Two deliberate differences from the proposal in #1922:
Tests:
app::navigation::tests::go_to_column_keeps_the_path_from_that_column_and_records_itandapp::browser::tests::navigation::making_a_column_first_keeps_later_columns_focus_and_cursor(strip, focus, cursor, no-op in the first column, Back).Visual evidence
How to test
Expected result: after step 2 the focused column is the first one, the columns to its right are still open, and the cursor is on the same item. Step 3 restores the full strip. Step 4 changes nothing.
Related issue
Closes #1922