UI: FreshRSS-style keyboard shortcuts #5
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The reader UI is mouse-only. As a FreshRSS user I have keyboard-driven reading muscle memory —
j/kto move between articles,rto mark read,spaceto open the original — and reaching for the mouse for every article is slow.Goal
Keyboard shortcuts across the reader UI that mirror FreshRSS defaults wherever a FreshRSS action has a yunjin equivalent, so switching between the two readers feels natural.
Findings
src/yunjin/web/static/style.css).config-user.default.phpon theedgebranch of the FreshRSS repo (source):j/khn/phome/endrspacecmf1escapeqvtf,l,s,a,u1/2/31→Reader,2→Feeds,3→Settings; decide during implementationconfigureController.php). For yunjin v1, hardcoded FreshRSS defaults are enough — configurability would be a separate feature if ever wanted.Plan of attack
shortcuts.jsloaded inbase.html— progressive enhancement: the site must remain fully usable with JavaScript disabled (this is the sanctioned, minimal exception to the no-JS rule, and the reason this feature needs any JS at all).keydownhandler that ignores keystrokes while focus is in input/textarea/select elements.j/kmove it,rtoggles read via the existing read/unread route (fetch POST),spaceopens the original in a new tab.ccollapses/expands the current aggregate.f1(and?) opens a help overlay listing all shortcuts;escapecloses it.Dependency note
The
r(toggle read) andh(next unread) shortcut mappings here assume read/unread state is visible and filterable in the reader. #18 (mark groups / articles as read, hide read items) is filed for exactly that — implementing #18 first (or alongside) will save rework on the shortcut endpoints.Design decision (Marvin8 request, implemented in the same PR)
New setting "Mark groups as read when viewed" (default off) on the settings page — this is what makes the
hnext-unread shortcut a proper FreshRSS-style workflow together with the hide-read toggle.Semantics: with the setting on, opening a group marks all its articles read — but the page renders with the read states captured before marking, so what you are reading does not change under you. The group simply counts as read everywhere else: it drops off the reader index when read groups are hidden, and
hskips past it. Stored asmark_read_on_viewin the settings store; toggle at Settings → Reading.Resolved by PR #28 (merged): FreshRSS-style keyboard shortcuts (j/k/n/p, h next-unread article, g open-next-unread-group, r toggle read at article or group level, space, o/enter, c, 1/2/3, f1/? help) plus the mark-groups-read-when-viewed setting (Settings → Reading) that makes the h/g unread workflow end-to-end.