Keyboard shortcut to collapse focused item in list view on dev.newsblur.com

  • 4
  • Idea
  • Updated 6 years ago
On dev.newsblur.com I use the list view (as opposed to the split view). I'd like a keyboard shortcut to collapse the focused item. (This can be done now by clicking the minus sign button in the upper right corner of the focused item.)
Photo of Peter Tuuk

Peter Tuuk

  • 1 Post
  • 0 Reply Likes
  • generally pleased

Posted 6 years ago

  • 4
Photo of toupeira

toupeira

  • 36 Posts
  • 3 Reply Likes
It seems the minus sign was removed in the released design, which makes the new list view pretty awkward to navigate in feeds with huge stories. IMHO there should be both a keyboard shortcut and a button to collapse a story.
Photo of Samuel Clay

Samuel Clay, Official Rep

  • 6514 Posts
  • 1474 Reply Likes
Just click on the story title again.
Photo of toupeira

toupeira

  • 36 Posts
  • 3 Reply Likes
Ah... I didn't realize the title was listed twice :-)

But yeah, basically I want the behaviour of the n/p/o shortcuts from Google Reader, at the moment the list view is not really keyboard-friendly with feeds that have long full-text stories, because you only see one story at a time.
Photo of mgeraci

mgeraci

  • 38 Posts
  • 12 Reply Likes
I wouldn't mind a keyboard shortcut for this, either.
Photo of Samuel Clay

Samuel Clay, Official Rep

  • 6514 Posts
  • 1474 Reply Likes
What keyboard shortcut would you expect?
Photo of Darryl

Darryl

  • 15 Posts
  • 12 Reply Likes
In Google Reader the shortcut is Enter. I think that would work well.
Photo of toupeira

toupeira

  • 36 Posts
  • 3 Reply Likes
I found an old userscript at http://userscripts.org/scripts/show/1... and cleaned it up to work with the new list view, you can find it at https://gist.github.com/toupeira/5631905.

It unmaps the Up/Down arrows, adds 'n'/'p' shortcuts to navigate stories without opening them, a 'o' shortcut for toggling the story content, and a 'v' shortcut to replace the original 'o'.

Let me know if you run into any problems, it's only tested on Firefox so far.
Photo of George Entenman

George Entenman

  • 1 Post
  • 0 Reply Likes
I would like this shortcut, too. Maybe 'j/k' for 'down/up' and 'o' to toggle open/close?
Photo of mgeraci

mgeraci

  • 38 Posts
  • 12 Reply Likes
Enter would work for me. I'm in list view, and enter doesn't seem to be used when a story is open.
Photo of toupeira

toupeira

  • 36 Posts
  • 3 Reply Likes
I've been using my userscript for a few weeks now without any problems, it works great and feels almost exactly like Google Reader. But the script is very hackish and bound to break in the future, so it would be great if you could implement these shortcuts in NewsBlur proper.

I assume you don't want to change the behaviour of existing shortcuts, so I suggest 'h/k' for 'down/up without expanding stories', and 'o' for 'expand/collapse current story'.

Also, it would be great if you could add a way to change the default key bindings, even if it's only a simple JS API we can use in userscripts (if that doesn't exist yet).
Photo of Samuel Clay

Samuel Clay, Official Rep

  • 6514 Posts
  • 1474 Reply Likes
I like this idea well enough, but I don't want to take those keys away from future shortcuts. You just want to mark stories as read without opening them? What if you're reading a story and you "navigate" to another story. Does it close the current story and put up a "Select a story" notice?
Photo of toupeira

toupeira

  • 36 Posts
  • 3 Reply Likes
The stories are not marked as read when navigating "over" them, only when expanding them. If I navigate to another story the expanded story simply collapses again (I think Google Reader kept it open, but it doesn't really mattter), or I can use the default 'j/k' shortcuts to move to another story directly. There's no popup notice and I'm not sure why you would think that ;-)

If you only use a keyboard this behaviour is essential for the list view UI, without it you can't open a specific story without losing track of your position in the list relative to the story you're looking for (at least with long stories). The split view doesn't have this problem because the story list always stays visible.
Photo of Samuel Clay

Samuel Clay, Official Rep

  • 6514 Posts
  • 1474 Reply Likes
Can you just use 'x' to expand and collapse the story? Not sure what you're trying to achieve if it doesn't mark it as read.
Photo of toupeira

toupeira

  • 36 Posts
  • 3 Reply Likes
And I'm not sure why I would want to mark a story as read if I haven't actually read it.

I think your making some wrong assumptions about my workflow, so I'll try to give you an example. Imagine that you have only a keyboard. You open a feed and look through the story titles, until one in the middle of the list catches your interest, so you press 'j' to move down. But now the first post in the list fills most or even all of the screen, and the story you wanted to read is gone. The only way to get there is to keep pressing 'j' and checking the title. See what I'm getting at?

As for using 'o' instead of 'x' in my userscript, that's just my personal preference because I'm used to Google Reader's shortcuts. I don't mind going back to 'x' if it means I can drop the userscript.
Photo of Samuel Clay

Samuel Clay, Official Rep

  • 6514 Posts
  • 1474 Reply Likes
What happens to those stories you skip? Are you planning to go back to them or just mark them as read with a shift+a?
Photo of toupeira

toupeira

  • 36 Posts
  • 3 Reply Likes
Usually I'll mark them as read with Shift+A when I'm done with the feed, but sometimes I keep certain stories that I know I want to read later. But I could use saved stories for that, so this behavioural detail isn't really that important to me.

Another part of the picture is that I often prefer reading the stories on the original site, so I usually go through a feed, open a few tabs in the background for the stories I'm interested in (with the 'v' shortcut from my userscript, which also marks the story as read), and then mark all read and go on to read the tabs.