fix: dispatch configurable page_up/page_down keybindings in all views - #51
Open
jones77 wants to merge 9 commits into
Open
fix: dispatch configurable page_up/page_down keybindings in all views#51jones77 wants to merge 9 commits into
jones77 wants to merge 9 commits into
Conversation
KeyAction::PageUp and KeyAction::PageDown were defined in the config system but never checked in any view's event handler, so user remappings (e.g. Space -> page_down) had zero effect. Additionally, physical PageUp/PageDown keys in the detail view incorrectly required the Ctrl modifier. - Add key_matches() guards in Dashboard, FeedItems, FeedItemDetail, and Starred views so configurable bindings are dispatched - Split the combined Ctrl guard arm so physical PageUp/PageDown work without modifiers; Ctrl+u/Ctrl+d remain hardcoded for vim-style scrolling - Add tests for keybinding parsing, custom binding dispatch, physical key fix, and page navigation in Dashboard
Author
|
hiya, I wrote this change using deepseek-v4-flash -- I'm not a Rust programmer personal context: I use "space" to page down on the unix command line (eg like less, more, etc) so it's the first thing I change in an app because my muscle memory is too strong (eg I use "space" in Vim to page down too) so when I changed the config this bug popped up And since I've recently been playing around with OpenCode and got a working fix almost immediately, lmk if there's any egregious slapdashery and I'll fix it |
Render a proportional visual indicator on the right border of the article content area that shows the user's current position within the article. The indicator recolors a segment of the right border to match colors.primary (cyan on dark theme, sage green on light), with thumb height proportional to the visible-to-total content ratio. The indicator is hidden when the article fits entirely in the viewport. Minimum thumb height is 1 character.
Add a boolean config key under [ui] to control the scroll position indicator in the article detail view. Defaults to true. Supports get/set via 'feedr config' CLI.
Move 'h' from the Back default binding to the Home default binding, so pressing 'h' navigates directly to the Dashboard from any view. Back remains accessible via Esc and Backspace. Add Home dispatch handlers in FeedList and Starred views so 'h' works from every non-Dashboard view.
When pressing 'h' (Home) from the article detail view, look up the current article's (feed_idx, item_idx) in the active dashboard items and select it, so the user returns to the same article highlighted. If the article is no longer listed (e.g. filtered out), fall back to no selection.
…ed views Dispatch configurable JumpTop/JumpBottom keybindings in Dashboard, FeedItems, and Starred views for first/last item navigation. Update help overlays for all three views. Default bindings: 'g' = JumpTop, 'G' = JumpBottom (already existed).
…ome navigation - Config: scroll_position defaults, back-compat, get/set - Events: JumpTop/JumpBottom in Dashboard and FeedItems views - Events: Home from FeedList, Starred, detail (with selection preserve and fallback) - Fix stale comment about 'h' being Back
Restore 'h' to the Back action's default bindings (matching README documentation). Home has no default letter binding — only the physical Home key. The Home dispatch handlers (with selection preserve from detail view) remain available for users who bind it in config.
Replace the hardcoded KeyCode::Char('l') arm in the detail view
with a key_matches(KeyAction::ExtractLinks, &key) guard so user
remappings are respected (same fix as the PageDown/PageUp pattern).
Fix the page_down custom binding test which used Space (conflicted
with ToggleRead).
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.
KeyAction::PageUp and KeyAction::PageDown were defined in the config system but never checked in any view's event handler, so user remappings (e.g. Space -> page_down) had zero effect.
Additionally, physical PageUp/PageDown keys in the detail view incorrectly required the Ctrl modifier.