Mailpile icon indicating copy to clipboard operation
Mailpile copied to clipboard

Allow keyboard navigation within a thread

Open BjarniRunar opened this issue 8 years ago • 8 comments

It would be nice to be able to use hotkeys to navigate within a thread.

Probably the most natural way to implement this, would be to enhance the j/k key-bindings so when a thread is displayed, the keys navigate within the thread and only when you try to move off the top or bottom of the thread list do you end up moving to another message.

The functions that need changing live in shared-data/default-theme/html/jsapi/ui/keybindings.js.

(as discussed with @karlp)

BjarniRunar avatar Jul 18 '17 09:07 BjarniRunar

Is this issue still open? I would like to fix it.

ghost avatar Jul 21 '17 02:07 ghost

@Dragotamer46, yes it is still open. A fix would be most appreciated!

BjarniRunar avatar Jul 22 '17 13:07 BjarniRunar

Alright, I will get to work on it! Which branch should I clone from and what key combinations would you want to be used?

ghost avatar Jul 23 '17 16:07 ghost

It's best to just work off master.

Currently the keybindings j and k are used to move up and down in the list of search results, like in GMail. The bindings are defined in shared-data/default/html/jsapi/index.js, but they mostly invoke functions in shared-data/default/html/jsapi/ui/keybindings.js.

These should be enhanced so when a message is being displayed, they move up and down in the thread - when you reach the end of the thread list (top or bottom) going back to moving within the search result list seems like the normal behaviour. This may be best done by enhancing the template for displaying a message thread (in shared-data/default-theme/html/partials/pile_threading.html), so it contains markers that the Javascript can look for.

BjarniRunar avatar Jul 24 '17 09:07 BjarniRunar

I've been trying to work on this for the past two days. I still can't get the markers to recognize. Do you have an idea of what I can do?

ghost avatar Jul 27 '17 20:07 ghost

I don't understand what you mean "can't get the markers to recognize". Maybe if you describe your approach in more detail, or just file an incomplete pull request so I can see the code and help out that way? Or both!

BjarniRunar avatar Jul 28 '17 11:07 BjarniRunar

Looking at moving through thread, wanted to push my first open source commit! Sorry if too quickly. Thanks! - Greg

akademsubotnik avatar Jul 22 '20 03:07 akademsubotnik

More code has been added for navigation within thread in commit https://github.com/mailpile/Mailpile/pull/2260/commits/ac6ec126f81eb56d4c3069ab511e28e2a46c554c there are still a few problems (ones I found listed in code)

akademsubotnik avatar Jul 26 '20 17:07 akademsubotnik