Add keep_focus_on_list: stay on the list when selecting a channel or opening a thread#84
Closed
Frodotus wants to merge 1 commit into
Closed
Add keep_focus_on_list: stay on the list when selecting a channel or opening a thread#84Frodotus wants to merge 1 commit into
Frodotus wants to merge 1 commit into
Conversation
…ting a channel or opening a thread
06a23f2 to
5625720
Compare
Owner
|
hi @Frodotus curious why you're closing your PRs! |
Contributor
Author
Hi! Sorry for the confusion — no slight intended! I opened those while trying to get slk working as my daily driver, but I'm not really a Go person. In the end I built my own client in Python since it's what I know — that way I can quickly tweak things to fit my daily-driver needs instead of it turning into a Go learning project. Really appreciate slk though, and the effort you've put into it! |
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.
Closes #83.
What
A new
[general]bool,keep_focus_on_list(defaultfalse). When enabled, selecting a channel or opening a thread loads the content but leaves keyboard focus on the list, so you can browse withj/k+Enterwithout tabbing back each time.Behavior (when
true)Selecting still loads the content; only the focus jump is suppressed:
Step into the content via the existing focus keys (
Tab/l/→). Default (false) is the long-standing focus-follows-selection behavior, so nobody is affected unless they opt in.Implementation
focusedPanelassignments —reduceChannelSelected(channel pick),handleEnter(threads-view Enter), andopenThreadPanel(message → thread) — behind!a.keepFocusOnList.config.General.KeepFocusOnList→app.SetKeepFocusOnList(...), mirroring the other[general]/[appearance]bools.ThreadsViewActivatedMsgstill focuses the threads list — that list is what you browse in the threads view, so landing on it is the on-list behavior (commented inline). Mouse click-to-focus-a-pane is also untouched.Tests
Three tests, each driving a real production path and asserting default-vs-flag:
ChannelSelectedMsgreducer (Update)handleEnterkeystrokehandleEnterkeystrokeFull suite +
go vetgreen. WikiConfiguration.mdupdated ("Browsing without losing focus").