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

Filtered hints and numbers? #122

Closed
agzam opened this issue Feb 4, 2020 · 13 comments
Closed

Filtered hints and numbers? #122

agzam opened this issue Feb 4, 2020 · 13 comments

Comments

@agzam
Copy link

agzam commented Feb 4, 2020

When Use the link's name and characters for link-hint filtering option is enabled and you press f on a page that have links with numbers, e.g., google search results page. How do you jump to a link that starts with a number? Let's say you want to jump to the 2nd page of google search results, how do you do that efficiently? There's no easy way to filter all the links that start with "2", is it?

I mean, in this specific case you can just press ]] and it would take you to the next page, but that's not the point. The point is: maybe it would be nice to have a way to filter links that start with numbers?

@gdh1995
Copy link
Owner

gdh1995 commented Feb 5, 2020 via email

@agzam
Copy link
Author

agzam commented Feb 5, 2020

Oh, I know how filtered hinting works, I think I either failed to explain the problem, or you weren't paying attention :)

Let me try again. So let's say you go to google.com and type some search term (could be anything because it's irrelevant). Now, on the search results page, go all the way down to the bottom (press G)

So my question is, with filtered hinting how do you jump to search results page "7"? You press f and the number assigned to the page would be something like "25". See the problem now? To go to page "7" you first have to find the randomly assigned, relevant Vimium marker with a number (and there will be many) and then type that number, instead of "7".

Wouldn't be nice if you could press "7" and it either would filter all the links that contain "7" or focus on the link to the "page 7" automatically?

I wonder if it's possible to improve the algorithm so it tries to assign relevant numbers to links with numbers. So instead of randomly assigning Vimium markers with numbers from the top of the page to the bottom, it would assign "2" to "page 2", "3" to "page 3", and so on. Once all the links with numbers are filled, then it would continue assigning markers to other elements.

If that approach is too difficult or may have performance implications, there's another alternative:

What if, after pressing f, user could type numbers but with a modifier key. For example (again, to quickly jump to "page 7"): you press f, then Alt+7 - and voila - it would filter the links that contain "7"? Basically, pressing Alt+7 would leave the marker only on one link (even though it initially got Vimium marker with "25"). That would allow to quickly filter links that start with numbers. User would have to press f, and then Alt+7. Of course that is, if there's only one link that contains "7". What if there's also links labeled "17" and "77"? Well, that still would enormously improve the UX, because the scope will shrink to include only those links.

@gdh1995
Copy link
Owner

gdh1995 commented Feb 5, 2020

Oh sorry my English reading skill is too poor. I'll review this issue later.

@agzam
Copy link
Author

agzam commented Feb 5, 2020

Oh no worries. I understand. I am not a native English speaker myself. I wish I could explain that in Chinese 😄.

@agzam agzam changed the title question: how to deal with numbers? Filtered hints and numbers? Feb 5, 2020
@gdh1995
Copy link
Owner

gdh1995 commented Feb 5, 2020

First of all, the idea of assign 3 to a link of "3" is interesting, and I'd like to add it.

Is it enough to just handle those what only include number characters ? I mean if a link has a title of 7abcd, then its index will be assigned as before.

BTW, currently the logic is not completely random - both Vimium and Vimium C assign smaller index numbers to those whose text are shorter.

@agzam
Copy link
Author

agzam commented Feb 6, 2020

I honestly think it would be easier to allow number filtering with a modifier key Alt or Ctrl. Like for example on this very page

image

see, If I want to select the item with your github handle by typing 1, 9, or 5; or I want to jump to the item that says "2 days ago", I currently can't do that efficiently. But what if I could do that by typing numbers with holding Alt? Would be nice, right?

@gdh1995
Copy link
Owner

gdh1995 commented Mar 11, 2020

Hello, here's a version implementing the idea of assigning 3 to a link of "3", and 42 to "42" (if there're at least 3/42 hint markers):
vimium_c-1.80.3-chrome-0ecf497.zip; vimium_c-1.80.3-firefox-0ecf497.zip.

  • unzip the files into an empty folder
  • if on Chrome, open chrome://extensions/ and enable the "developer mode"
  • if on Firefox, open about:debugging#/runtime/this-firefox manually
  • click the "load extension" button and select the extension folder or manifest.json

@agzam
Copy link
Author

agzam commented Mar 14, 2020

Awesome. I'll give it a try. Thank you Dahan.

@agzam
Copy link
Author

agzam commented Mar 14, 2020

It works, but only sometimes. On pages with lots of numbers, Github is a good example it is still doesn't offer you a good way to quickly navigate to links with numbers. Even on this page, right now, if I press <f> and the link with a title "14 minutes ago" gets assigned "32" not "14".

I still think the best way to tackle this problem, is to allow filtering links with numbers separately from alphanumeric links, e.g: if user holds <Alt> and starts typing numbers it filters only those links that contain numbers (and ignore links with no numbers).

@gdh1995
Copy link
Owner

gdh1995 commented Mar 15, 2020

Oh the new version only implements "the idea of assigning 3 to a link of "3", and 42 to "42" (if there're at least 3/42 hint markers)". And for me it is not determined how to trigger number text matching yet, so neither its developing.

@gdh1995
Copy link
Owner

gdh1995 commented Apr 5, 2020

Here's a simple test: vimium_c-1.81.4-chrome-bdd53c4.zip . Use Alt+N to filter hints by searching N in their text.

Install:

  • unzip a zip file into an empty folder
  • if on Chrome, open chrome://extensions/ and enable the "developer mode"
  • if on Firefox, open about:debugging#/runtime/this-firefox manually
  • click the "load extension" button and select the extension folder or manifest.json

@agzam
Copy link
Author

agzam commented Apr 6, 2020

I tried it in Chrome. It is working!

You're the best, man!

upd: Brave - things are good!

@gdh1995
Copy link
Owner

gdh1995 commented Apr 15, 2020

v1.81.5 has been released.

@gdh1995 gdh1995 closed this as completed Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants