Skip to content

Add n/p shortcuts (same behavior as in Google Reader) - #80

Closed
jefffederman wants to merge 2 commits into
stringer-rss:masterfrom
jefffederman:np_shortcuts
Closed

jefffederman wants to merge 2 commits into
stringer-rss:masterfrom
jefffederman:np_shortcuts

Conversation

@jefffederman

Copy link
Copy Markdown

Hey Matt,

Very nice work on Stringer, am thinking it could be my Google Reader replacement. Thought I'd add n/p shortcuts to complement the j/k shortcuts. I use them all the time in Reader and missed having them in Stringer.

As to what I changed:
• added Mousetrap bindings for the n/p shortcuts
• added an 'updateScroll' callback so that scroll only updates for n/p movements once article is above/beneath the viewport
• added https://github.com/teamdf/jquery-visible to help with the viewport code
• updated the locale files to include the n/p description (used Google Translate)
• updated the shortcuts partial to include the n/p description
• updated the layout to include the jquery-visible script

Specs are passing, though I didn't create any integration specs (or JS specs) for this branch. Browser tested in Chrome, Safari and IE8.

Best,
Jeff

@swanson

swanson commented May 12, 2013

Copy link
Copy Markdown
Collaborator

I can get behind these changes - I am in the middle of moving the clientside JS to backbone (https://github.com/swanson/stringer/tree/backbone) because it is getting too hairy - so it may be a bit before I get this merged in.

@swanson

swanson commented May 13, 2013

Copy link
Copy Markdown
Collaborator

n/p implemented in 0947e3b

@swanson swanson closed this in 330b343 May 13, 2013
@swanson

swanson commented May 13, 2013

Copy link
Copy Markdown
Collaborator

Thanks for this - sorry it was a bit of a hack job to get it actually merged. I really like the idea of only scrolling the view if it is off screen, it works really well now 👍

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants