Skip to content
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

Implement missing vimium features #45

Closed
11 tasks done
AndreasArvidsson opened this issue Jun 30, 2022 · 17 comments · Fixed by #120
Closed
11 tasks done

Implement missing vimium features #45

AndreasArvidsson opened this issue Jun 30, 2022 · 17 comments · Fixed by #120
Labels
enhancement New feature or request
Milestone

Comments

@AndreasArvidsson
Copy link

AndreasArvidsson commented Jun 30, 2022

I would like to completely replace vimium with rango, but there is some features I still use that are vimium explicit.

  • scrollPageDown
  • scrollPageUp
  • scrollUp
  • scrollDown
  • scrollLeft
  • scrollRight
  • visitPreviousTab
  • moveTabToNewWindow
  • go home: "gU". Go to root of current URL hierarchy
  • link next: "]]". Follow the link labeled next or >
  • go input: "gi". Focus the first text input on the page
@david-tejada
Copy link
Owner

Scroll is implemented with downer and upper. Currently it scrolls 2/3 of a page. Would you like the behavior to be different? I guess in vimium one is a full page scroll and the other a small one. I also implemented crown, center and bottom like in cursorless. They also take into account sticky headers. Scroll left and right I had them implemented but with responsive design everywhere I couldn't find a page to test it. If you can link one I'd appreciate it. visitPreviousTab I already had it in mind. And moveTabToNewWindow is easy, no problem.

@AndreasArvidsson
Copy link
Author

Ideally you could give a float as a second parameter. That way the user could configure their own scroll levels and even have a rule with a number in it for custom scrolling. If we are talking about fixed levels then half the page is what vimium uses and I find that very useful.

upper and downer followed by a target I have found but how do you center on a target? upper and downer also works a bit weird for me. Sometimes the target is outside of the viewport and if you issue it on the same target again you don't get the same result.

I don't have a page in mind but you could easily build a jsfiddle to test with.

@david-tejada
Copy link
Owner

Centering is still not released but you can see how it will work here: #3 (comment)

You can use up again and down again to avoid that issue where the element is outside of the viewport. After that repeating commands should work normally.

@AndreasArvidsson
Copy link
Author

AndreasArvidsson commented Jun 30, 2022

I guess it's not trivial to fix so upper/downer doesn't overshoot like that?

@david-tejada
Copy link
Owner

What do you mean overshoot? I can make scroll be the amount that I want. I can implement the float as a second parameter that you mention, it's no problem.

@AndreasArvidsson
Copy link
Author

I mean upper/downer <target> that should scrolled to the target often scroll too far

@david-tejada
Copy link
Owner

I think you're misunderstanding what the goal of that command is. The goal is to be able to scroll a scroll container that otherwise is not reachable by voice. So the target is just a way to reference that container, it is not meant to just scroll the element up and down and stop when the element is about to disappear from the viewport. crown and bottom instead work like that, they leave the element at the top or bottom but still visible.

Let me know if you're not well served with the way these scroll commands work and we'll see what can we do about that. Implementing the behavior that you mention is possible, maybe passing an argument like overshoot or something like that.

@AndreasArvidsson
Copy link
Author

Okay I guess my confusion is because there is no commands called crown and bottom in my code. I guess it's not released yet?

The only thing I would like is for the scroll amount to be configurable via a parameter in the api

@david-tejada
Copy link
Owner

Yes, crown, bottom and center are still not released.

I will add a parameter to configure the scroll amount

@AndreasArvidsson
Copy link
Author

Thanks! :)

@david-tejada
Copy link
Owner

Do you have any suggestion for words for scroll left and right?

@david-tejada
Copy link
Owner

For opening in a new window I thought of tab detach.

I also need one for visitPreviousTab. BTW, would this command cycle between two tabs or would it move back and forth through the tabs in order of last visited. Maybe we could have commands for both

@AndreasArvidsson
Copy link
Author

AndreasArvidsson commented Jul 5, 2022

These are the commands I used today

tab split:         app.tab_detach()
tab back:          user.tab_back()

small up:          user.scroll_up()
small down:        user.scroll_down()
small left:        user.scroll_left()
small right:       user.scroll_right()

half up:           user.scroll_up_half_page()
half down:         user.scroll_down_half_page()

full up:           user.scroll_up_page()
full down:         user.scroll_down_page()

The vimium implementation is just swapping between the last two. I do agree that both are probably useful and if you could implement both as separate commands that will be great.

@david-tejada
Copy link
Owner

tab split implemented. It keeps the tab state like you mentioned

@dyancat
Copy link

dyancat commented Aug 29, 2022

I also have some Vimium commands I use quite often which could be handy

  • go home: "gU". Go to root of current URL hierarchy
  • link next: "]]". Follow the link labeled next or >
  • go input: "gi". Focus the first text input on the page

Of course all these can currently be done by clicking rango hints, but I find that I do these often enough that being able to skip reading/speaking letters is valuable

@david-tejada
Copy link
Owner

All those seem useful and easy to implement . I will try to have them ready for the next release.

@david-tejada
Copy link
Owner

I implemented the rest of the features, but I somehow missed go input. I will have it ready for the next release, which won't take so long as this one.

@david-tejada david-tejada reopened this Jan 30, 2023
@david-tejada david-tejada added the enhancement New feature or request label Feb 3, 2023
@david-tejada david-tejada added this to the v0.5.0 milestone May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants