-
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
More Context-sensitve and Consistant link hints #2083
Comments
Some interesting ideas there, @DNGros. The issues you raise are problematic, but nobody has yet come up with a good general solution. One of the problems is that what seems to be a good solution for one use case, turns out to be exactly the wrong thing for another use case. However, I do think this is something worth looking at again. Do you want to have a go? The place to look is probably to assign a score somewhere here, add the necessary plumbing here, and use the score here and here. You can mimic the way |
@smblott-github I agree there is potential for it not to always generalize. The way I figure, with link-hints being essentially random now, even if system to completely fell apart on a particular site, it wouldn't do any worse than the randomly selected link-hints. There is some concern that if it ends up almost always working, the times where it doesn't work could lead to more following of the wrong link. But for that to happen it would have to be working pretty successfully in the first place, and hopefully a consistency can be reached that the collective fractions of a second saved each time can outweigh the rare misfollow. But yeah, the only way to find out is to try it. Thanks for the links and hints, that will help. I'll start playing with it probably around beginning of next week. I have a feeling that if just a good scoring system can be put in place, consistency and sequences will appear naturally. Also, apologies for any duplication from #2011 / not originally linking to it with #1850. Did not see it earlier. |
@DNGros It might be helpful to look how VimFx does things (hints.coffee). It actually implements some of your ideas. Here is a relevant quote from its documentation about the feature:
Some key points from the above:
Please do share whatever you come up with! I'd love to "steal" good ideas into VimFx :) |
@lydell Though while it is an improvement, I don't think that exclusively size is the optimal scoring method. It does not the have the consistency aspect that I view as a really important feature. It can be thrown off by things like how many characters are in a search result or any button, link, etc, when in reality, the number of characters is rarely indicative of the importance of the link. Also, it tends to favor large images which may never be clicked on and without ad block, ads. I'm not sure other methods will always be better, but with experimentation and comparison hopefully we can find out. |
As an update of what progress I have made so far: I have not tested with it extensively yet. The single character link hints definitely feel more deliberate than just random as before. Brief observations suggest while there is improved consistency, there is still a fair amount to be done. It seems to When I get the chance, I'll continue to tweek it and implement some other ideas I have for scoring. |
First off, let me say I'm very new to vimium, but after a just few days, I already love it! Though I have a few ideas / frustrations with link hints that might be able to make vimium even better.
The most problem I have with link hints is in in Google search results. The first result is almost always different from search. Additionally, either the first, second, or third links is essentially always what I click on, and it seems like these links should get one character link-hints such as the first, second, and third result always being "J","K", and "L" respectively.
The "google problem" was the first thing I noticed, but after that I began wondering how else could link-hints be improved. I began to realize by applying some understanding of how people make websites and the DOM, link-hints could be improved.
Picking what gets a single, home row character link-hint:
Identifying sequences:
Maintaining Consistency
What about filter mode?
Turning on filtering link-hints makes this sort of not matter, but I find it takes more key strokes and is slower than the one or two character hints. This is especially true in google results where links often share first letters or even word. Also, in small links the pop-up can cover up the first letter, which takes a moment longer of thought and slows it down. Having context-sensitive and consistent link hints I think could make single and double character link-hints even faster by removing the aspect allowing you to predict what you will have to click, like always hitting "j" for first google result.
Implementation Ideas
I am interested helping implement this. What I am imagining now with only looking at the code a bit is a couple of heuristics like those mentioned above (font size, in header, strong, click size, etc) that are based on the link element and maybe its immediate parent. Links are put in a priority queue by "link importance score". There is also something watching for links that should be sequence or should have specific value for consistency and would add these to a "preassigned dictionary" instead of the queue. Things in the queue are poped off and get sequentially more complex link hints unless they are in the preassigned dictionary.
Still a lot thinking and looking through to better understand the current code to make this work. I didn't want too deep into without hearing some feedback from current contributors first. This would be my first time working with CoffeeScript, and I don't have much open source experience, but I am really interested in learning and trying to contribute.
These are just some ideas about where to start with context-sensitive and consistent link hints. I look forward to hearing what concerns, ideas, and comments actual contributors and the community have.
tl;dr: Links that are most likely to be clicked should be given priority for single character, home row link-hints, and there should be consistency with things the first, second, and third google result getting the same hint every time.
The text was updated successfully, but these errors were encountered: