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

Feature request: hide/narrow down hinted links as one narrows to seach #536

Closed
impaktor opened this issue Jan 27, 2020 · 10 comments
Closed
Labels
feature Feature requests. good-first-issue Marks a good issue for first-time contributors.

Comments

@impaktor
Copy link

Brief description

I think I discussed this previously on IRC, with mixed reactions but, here goes:

When find-hint (or equivalent) as you type the title or url you want to go to, I'd like the hints in the buffer to also be narrowed down (see image below)

Motivation

I find this very useful, because:

  • often I do not see the link I want to for all the "hinting" (think: the
    forest obscures the trees
    ),

  • and also, my mind doesn't know what index the link I want to follow has before I've issued the find-hint, so as I hit C-g, my mind already knows I can start typing "rome" to narrow down to what I want and have the screen less cluttered (it also re-indexes the links to be shorter to type).

  • Once I've only have 3-4 links on screen, I can just C-n/C-p (or arrow) once or twice to get to the desired link, if my mind doesn't feel like typing the exact index.

  • Another highly useful way to use this, that I use probably daily, is as a search feature. I.e. I know the url I want to is somewhere one the screen, and I know (part of) the title, but there are too many links to find it, e.g. something with "rome" in the example image, so just start typing, and I see exactly which links are of interest.

Summary

If I do narrow to search, why show non-matching link hints? They are by definition uninteresting.

Example

(from conkeror)
In this example I maybe want "Roman Greece", so I instantly start typing "rom" and instantly see the different links reagrding Rome and ancient Greece, and then just smash 4, or do 3 C-n

myimage

@chrisboeg
Copy link
Contributor

chrisboeg commented Jan 27, 2020

I'm definitely in agreement, and I will even contribute my time to make it happen, if @jmercouris and/or @Ambrevar approves.

@Ambrevar
Copy link
Member

Ambrevar commented Jan 27, 2020 via email

@chrisboeg
Copy link
Contributor

@Ambrevar I think it should just match the content in the minibuffer. So as items disappear in the minibuffer as you narrow down, which they already do, their corresponding hints should disappear from the site as well, one-to-one.

@Ambrevar
Copy link
Member

Ambrevar commented Jan 27, 2020 via email

@chrisboeg
Copy link
Contributor

chrisboeg commented Jan 27, 2020

So I might be confused, but I don't think that's a question for this issue. It might be relevant in general, but as I understand this issue, the problem is that if you link hint and then narrow the search, what appear in the minibuffer and as hints on the page is not one-to-one. All hints appear on the page, whereas the minibuffer shows the narrowed search matches.

So to fix the issue at hand, we should just make hints on the page one-to-one with the matches in the minibuffer.

What the matches in the minibuffer then is, like how they are filtered and determined as you mention, that's another issue.

In short: if I go to the next manual, invoke follow-hint and type "with", the minibuffer says "Go to element: [6]: with", and it shows 6 matches, but it shows 235 hints on the page. There should only be 6 hints.

At least that's how I see it.

@Ambrevar
Copy link
Member

Ambrevar commented Jan 27, 2020 via email

@chrisboeg
Copy link
Contributor

@impaktor Could you shed a light on this? Is the following the problem at hand, or is there something more to it that I'm overlooking?:

if I go to the next manual, invoke follow-hint and type "with", the minibuffer says "Go to element: [6]: with", and it shows 6 matches, but it shows 235 hints on the page. There should only be 6 hints.

@impaktor
Copy link
Author

impaktor commented Jan 27, 2020

So to fix the issue at hand, we should just make hints on the page one-to-one with the matches in the minibuffer.

Sounds like you're spot on, @chrisboeg

"Next-Manual" example

if I go to the next manual, invoke follow-hint and type "with",

EDIT so in example below, I just type "wi", and can then smash RET

2020-01-27-112135_1600x900_scrot

@chrisboeg
Copy link
Contributor

@impaktor The result you show there as number 1 in conqueror (I believe) ends up as the number 3 match in next, but that is because when you start narrowing, next also includes other things than links. I could see this be optional. However that would be another issue, another patch.

The fix for this issue would be to make the matches in the minibuffer one-to-one with the hints shown on the website.

@Ambrevar Ambrevar added the good-first-issue Marks a good issue for first-time contributors. label Jun 1, 2020
@Ambrevar Ambrevar added the feature Feature requests. label Mar 24, 2021
@aartaka
Copy link
Contributor

aartaka commented Feb 8, 2022

Hints on the page and hints in the minibuffer are now one, what's left is:

  • Adding a prompter:filter-postprocessor filtering out non-matching hints.
  • Delete the excluded hints.
  • Re-draw the re-introduced ones.

Should not be terribly hard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature requests. good-first-issue Marks a good issue for first-time contributors.
Development

Successfully merging a pull request may close this issue.

4 participants