Repository navigation
Step the preview with ↑ and ↓, like Quick Look on macOS - #21
Closed
kevinpardo wants to merge 2 commits into
Closed
kevinpardo wants to merge 2 commits into
kevinpardo wants to merge 2 commits into
Conversation
kevinpardo
force-pushed
the
preview-up-down
branch
from
November 11, 2026 08:45
4b642cd to
10780ca
Compare
kevinpardo
marked this pull request as ready for review
November 11, 2026 08:45
[Medium impact] The PR appears safe to merge, with a remaining non-blocking arrow-order issue when Folio takes over a second to reply. Findings
SummaryAdds ↑ and ↓ navigation that follows the folder's list, column, or grid layout.
|
In the preview, ↑ and ↓ only scrolled, so on a picture, a video or a folder they did nothing, and in the list and column views, where files sit one above the other, there was no way to step to the next one with the keys that move through them in the folder. Now ↑ and ↓ still scroll what's taller than the window (a long text, a zoomed picture, a PDF), and anything that fits moves to the item above or below as the folder view lays them out: the row above or below in the list and columns, the tile above or below in the grid. The preview asks Folio with a "step -1" or "step 1" line, since only the window knows its layout; Folio moves its selection and sends the new item back as it already does. A preview running on its own falls back to the previous and next file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ufqf7cLLeC113cXjB33N3R
kevinpardo
force-pushed
the
preview-up-down
branch
from
November 11, 2026 22:01
10780ca to
eea7497
Compare
…xt loads After ↑ or ↓ the preview asked Folio for the row above or below, but an arrow pressed before the answer was taken from the old item: ↓ then → in a grid undid the ↓. Folio now sends the new item at once and then "stepped", and the preview keeps the arrows that came meanwhile until it does (a second at most, if no answer comes). A text still being read looked short, so ↑ and ↓ stepped past a long file on a slow mount. They do nothing until the text is in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ufqf7btMhVDAcTs2d8sLqB
Contributor
|
Thank you, @kevinpardo, this is a lovely touch. I rebased your two commits onto today's main (the preview's shortcuts sheet is now in groups, so ↑ ↓ now sit beside ← → there) and opened them as #174, with your authorship kept, since I couldn't push to your branch. Closing this one in favor of that. |
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.
What changes
This brings the preview closer to how Quick Look behaves on macOS. There, with Quick Look open, the arrow keys keep driving the Finder: in list or column view ↑ and ↓ move the selection to the file above or below, in icon view all four arrows move through the grid, and Quick Look follows to show whatever is now selected. You can flip through a folder of photos or documents without ever closing the preview. Folio's preview (Space) already follows the selection, and ← and → step through the folder, so ↑ and ↓ were the missing piece.
Before this change, ↑ and ↓ in the preview only scrolled. On a picture, a video, audio or a folder there's nothing to scroll, so they did nothing. That's most noticeable in the list and column views, where files sit one above the other and ↑ and ↓ are the keys you use to move through them.
Now ↑ and ↓ still scroll whatever is taller than the window: a long text, a PDF or a zoomed picture. Anything that fits moves to the item above or below, following the folder view's layout. That's the row above or below in the list and columns, and the tile above or below in the grid. ← and → are unchanged.
Only the Folio window knows its layout, so the preview writes
step -1orstep 1on the same stdout channel it already uses. Folio moves its selection, and the existing selection-following sends the new item back to the preview. A preview running on its own (folio preview <file>) falls back to the previous and next file. The help overlay now lists ↑ ↓ next to ← →.Verification
tests/folio_tests: 74 passed, including a newpreviewerStepsByRowOnItsOwnfor the standalone fallback.main, with a folder of 8 images, opening the preview with Space, then pressing:scroll()call as before, taken when the content is taller than the window.Screenshots
Column view, a folder of 8 images, preview open with Space, then ↓ ↓ ↓ ↑.
Before: ↓ and ↑ do nothing on a picture.
After: ↓ and ↑ move to the file below and above, and the selection in the column follows.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Ufqf7cLLeC113cXjB33N3R