Skip to content

Add shortcuts for focusing next and previous without opening articles.#1767

Merged
Frenzie merged 8 commits intoFreshRSS:devfrom
mdemoss:skipNextPrev
Nov 18, 2018
Merged

Add shortcuts for focusing next and previous without opening articles.#1767
Frenzie merged 8 commits intoFreshRSS:devfrom
mdemoss:skipNextPrev

Conversation

@mdemoss
Copy link
Contributor

@mdemoss mdemoss commented Jan 14, 2018

AOL Reader (and Google Reader, if memory serves) had these assigned to the n and p keys.

AOL Reader called this "Items scan down/up," but I don't think that's clear.

@aledeg
Copy link
Member

aledeg commented Jan 14, 2018

Could you explain what you want to achieve here. I am not sure I understand your use case. Thanks

@Frenzie
Copy link
Member

Frenzie commented Jan 14, 2018

Focus without opening == focus without marking read?

@mdemoss
Copy link
Contributor Author

mdemoss commented Jan 14, 2018

Yes, the shortcut in AOL Reader would move focus without expanding the item or marking it as read. Here's a video of how it is now: https://gfycat.com/OldBlandAuklet Scrolling behavior from what I can remember from AOL & Google reader was a bit different.

@Alkarex Alkarex added this to the 1.10.0 milestone Jan 15, 2018
@Alkarex Alkarex added the UI 🎨 User Interfaces label Jan 15, 2018
@aledeg
Copy link
Member

aledeg commented Jan 15, 2018

Why not keeping the same shortcuts but adding an option to keep the entries closed? This way there is only one set of keys for motion.

@Frenzie
Copy link
Member

Frenzie commented Jan 15, 2018

Because then it's one or the other. The default is fine for me but I do regularly find myself going j, r. Dunno how it'd pan out in practice but I can definitely see some potential. :-)

@aledeg
Copy link
Member

aledeg commented Jan 15, 2018

What I mean is that:

  • we already have the j and k to move around
  • we already have the c to open/close an entry

We could add an option to define the default state of an entry (open/close) and link the reading function on the open/close action.

@Frenzie
Copy link
Member

Frenzie commented Jan 15, 2018

That's exactly what I mean too. That's binary. Such settings are useful if you don't like the default at all, but not if you generally like the default.

@aledeg
Copy link
Member

aledeg commented Jan 15, 2018

I see what you mean. I still find having 2 sets of keys to move around is kinda weird.

@Frenzie
Copy link
Member

Frenzie commented Jan 15, 2018

PS I think n and p specifically are weird and far apart. Something like u and i or n and m seems better.

Vim uses ctrl+b/f.

@aledeg
Copy link
Member

aledeg commented Jan 15, 2018

As long as you can reassign keys, default values are not that important.

@mdemoss
Copy link
Contributor Author

mdemoss commented Jan 15, 2018

Why not keeping the same shortcuts but adding an option to keep the entries closed? This way there is only one set of keys for motion.

Really this is because I want to replicate my habits from AOL (and Google?) Reader(s), and that's how they did it. I remember them as "next" and "previous" and find that my fingers can rest on n,j,k,p easily.

@Alkarex Alkarex requested a review from aledeg February 5, 2018 19:50
@Alkarex
Copy link
Member

Alkarex commented Feb 5, 2018

@aledeg You are our mister shortcuts :-P Is it good for you?

@Alkarex Alkarex modified the milestones: 1.11.0, 1.10.0 Feb 5, 2018
@Frenzie
Copy link
Member

Frenzie commented Feb 5, 2018

@aledeg

As long as you can reassign keys, default values are not that important.

I disagree and I'm sure you do too. ;-) You can't make everybody happy of course but imo you should always design as if there were no options, all the while avoiding the Apple route.

Unless you assume using your left hand to press n and your right hand to press p, then n and p are objectively somewhat suboptimal. (That's the diplomatic way of phrasing it.) The pinky is the worst finger to use because it puts extra stress on the hand. On QWERTY, h and l, i and o, as well as n and m make sense ; on AZERTY maybe only h and l, and i and o.

@mdemoss

Really this is because I want to replicate my habits from AOL (and Google?) Reader(s), and that's how they did it.

That is where configurability comes in, imo.

@Alkarex

You are our mister shortcuts :-P

I'm not "our" mister shortcuts but I did maintain a very heavily customized Opera keyboard shortcut set for over half a decade. It's vaguely similar in principle to Vimperator I suppose, although it dates back to '04 or '05. I've given the matter of keyboard layouts and keyboard shortcuts more thought than most. :-P

@aledeg
Copy link
Member

aledeg commented Feb 5, 2018

@Frenzie
What I meant was that either i and o or m and n is fine for me. As long as the one we choose as default is usable and that it can be changed via configuration, it's good enough.
I am using a qwerty so both solution are equally good for me.

@Alkarex
The code itself look good but I haven't tested it. I might have sometime later this week though.

@Frenzie
Copy link
Member

Frenzie commented Feb 6, 2018

@aledeg Cool! I misunderstood. :-) I propose i and o then?

Copy link
Member

@aledeg aledeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mdemoss First thing, thank you for you PR.
Every contribution is appreciated.

I have a few comments on it, that I would you to change before accepting it.
As you have seen in the comment section, we would like to have a different set of keys as default so they are more natural (closer on the keyboard both on QWERTY and AZERTY).
I've tested it and it working properly. One thing to change though. You've put the configuration in the navigation section. It's fine but those shortcuts don't behave as the others. By that I mean that the modifiers are not working.
So I suggest you change how the form is rendered to show that those action cannot be used on feed nor categories.

@Alkarex @Frenzie If you have other suggestions!

@Frenzie
Copy link
Member

Frenzie commented Feb 7, 2018

@aledeg Something based on element height might make more sense than window height glancing at the code (new_pos -= $(window).height()/4) but I haven't tried it yet.

And yes, we'd expect Shift to work. :-)

@aledeg
Copy link
Member

aledeg commented Feb 7, 2018

@Frenzie the scrolling parameters made the experience really smooth. It didn't bothered me that it was based on window. I have no opinion on what is best for that matter.

@Frenzie
Copy link
Member

Frenzie commented Feb 7, 2018

It's the kind of thing that jumps out to me as suspicious because it might inadvertently be based on an effective window height of some 600-800 without properly taking into account 200 or 2000. But like I said, might. :-)

@Alkarex Alkarex modified the milestones: 1.10.0, 1.11.0 Feb 22, 2018
@Alkarex Alkarex modified the milestones: 1.11.0, 1.12.0 May 23, 2018
@Alkarex Alkarex modified the milestones: 1.12.0, 1.13.0 Oct 14, 2018
@Alkarex
Copy link
Member

Alkarex commented Nov 18, 2018

@aledeg or @Frenzie Could you please take care of this issue?

'go_website' => 'space',
'next_entry' => 'j',
'prev_entry' => 'k',
'skip_next_entry' => 'n',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'skip_next_entry' => 'n',
'skip_next_entry' => 'i',

'next_entry' => 'j',
'prev_entry' => 'k',
'skip_next_entry' => 'n',
'skip_prev_entry' => 'p',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'skip_prev_entry' => 'p',
'skip_prev_entry' => 'o',

@Frenzie
Copy link
Member

Frenzie commented Nov 18, 2018

@Alkarex I don't have permission to push to the repo.

@Alkarex
Copy link
Member

Alkarex commented Nov 18, 2018

@Frenzie Ok. If you know the changes to be done, I then suggest we merge here, and you make a new PR with the remaining changes

@Frenzie
Copy link
Member

Frenzie commented Nov 18, 2018

I'm not entirely sure how @aledeg envisions the config page but the two suggestions I added are probably the main thing.

Something like this perhaps?
screenshot_2018-11-18_12-14-57

@Alkarex
Copy link
Member

Alkarex commented Nov 18, 2018

@Frenzie Good for me

@Frenzie Frenzie merged commit f3a8861 into FreshRSS:dev Nov 18, 2018
@Frenzie
Copy link
Member

Frenzie commented Nov 18, 2018

Alright, I'll stick it in a follow-up PR.

Frenzie added a commit to Frenzie/FreshRSS that referenced this pull request Nov 18, 2018
Alkarex pushed a commit that referenced this pull request Nov 18, 2018
* [fix] Finishing touches for next/previous without focus

Cf. #1767.

* Avoid single quote

Alternative: use `’`

* Minor whitespace

* Minor whitespace

* be explicit about skipping

* add todos

* overshot by one
@Alkarex
Copy link
Member

Alkarex commented Nov 20, 2018

I am late to the discussion, but what would you think of using 'up' / 'down' as default shortcuts for these new skip to the previous / next ? (standard in mail clients such as Outlook, GMail... and other lists)

@Frenzie
Copy link
Member

Frenzie commented Nov 20, 2018

I'm not the biggest fan of that, but as long as it doesn't interfere with scrolling in opened articles I'm ambivalent toward it.

@Alkarex
Copy link
Member

Alkarex commented Nov 20, 2018

Good point @Frenzie . With the current implementation, it would indeed interfere in a negative way with open articles.

@Alkarex Alkarex mentioned this pull request Dec 16, 2018
mdemoss added a commit to mdemoss/FreshRSS that referenced this pull request Mar 25, 2021
FreshRSS#1767)

* add skipping option to toggleContent to use later for 'i' and 'o' hotkeys

* in English config j,k are now 'open' and not 'skip', i,o are called 'focus .. without opening'
mdemoss pushed a commit to mdemoss/FreshRSS that referenced this pull request Mar 25, 2021
* [fix] Finishing touches for next/previous without focus

Cf. FreshRSS#1767.

* Avoid single quote

Alternative: use `’`

* Minor whitespace

* Minor whitespace

* be explicit about skipping

* add todos

* overshot by one
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

UI 🎨 User Interfaces

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants