-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ability to jump between scrolling jump history #1082
Conversation
This is a good feature and it looks solid, @fent please add some tests |
Not sure why travis tests failed. Not familiar with the tests codebase. |
hmm, locally tests pass $ cake test
Running unit tests...
Pass (89/89)
Running DOM tests...
Pass (29/29) not sure why travis build failed. also not sure where to begin adding the tests, it doesn't seem like many of the other commands have tests. |
Conflicts: background_scripts/commands.coffee
Should be mapped to Also, you'll have a memory leak if you scroll a lot I haven't seen a maximum history size but only an |
Conflicts: background_scripts/commands.coffee
ability to jump between scrolling jump history Conflicts: content_scripts/scroller.coffee
Conflicts: content_scripts/scroller.coffee
I've merged the latest changes. Max scrolling history added, and mapped Not sure what to do about having Also made it so previous animations are cancelled when |
Like in vim, Ctrl-O and Ctrl-I jump backward/forward respectively in jump history. "jump history" is basically any command that uses the
scroller.jumpTo()
function.I've often needed to see something at the top/bottom of a tall page, but wanted to quickly go back to where I was. What I had to do was create a mark, jump, and then jump back to the mark. With this feature, jump history will already be recorded, having the user press less keys if they want to jump back.
Jump history is truncated if a user jumps back and then uses a
scroller.jumpTo()
command. History will also be updated if the user scrolls after they've jumped to a position and history, and then jumped again.History is cleared if the activated element ever changes and is scrolled with a command. I wasn't sure how to keep history per element without editing the page structure. So it seemed like the best solution was to clear it.