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] Go to previous match when Shift clicking word #119

Open
vinismarques opened this issue Apr 18, 2023 · 2 comments
Open
Labels
enhancement New feature or request planned Will be actioned

Comments

@vinismarques
Copy link

This is more of a suggestion.

It might be interesting to be able to go to the previous match of that word when clicking it while holding the Shift key, giving a similar experience to what users have in other places (default search bar included with Shift+Enter going back).

The use-case is finding matches for a specific word, but not considering the other words.

There are shortcuts to that already, but I feel that doing this through the interface would be "more natural", not requiring that users set up multiple shortcuts that will rarely be used.

@ator-dev ator-dev added the enhancement New feature or request label Apr 18, 2023
@ator-dev
Copy link
Member

ator-dev commented Apr 18, 2023

Thanks for the report! This a great idea, and something I will certainly implement.

There are two notes I would like to make in addition:

  • I have been considering adding a 'scroll detector' to the keyword buttons. Scrolling down with the mouse wheel (if you have one) would go down one word, and vice-versa for scrolling up.

  • You bring up a good point about the shortcuts. I have been struggling with them: they're likely to completely overwhelm users looking for specific shortcuts, because you have to scroll past a huge list of them organised in no clear way!

    image

    Additionally, we are limited to an arbitrary number of keywords that I decided to hard code. There is no way around this using the extension shortcut system.

    Possible solution:

    • Contextual jumping. One shortcut 'choses' the keyword to the left of the current chosen one, another for the right.
    • By default, no keyword is chosen, and the user can return to this state by choosing past the available keywords.
    • When a keyword is chosen, the shortcut for jumping to the next global match (Alt+Space by default) instead refers to just that keyword.

@ator-dev ator-dev added the planned Will be actioned label Apr 18, 2023
@ator-dev
Copy link
Member

ator-dev commented Apr 25, 2023

Shift+click for previous match now implemented, along with a critical highlighting fix and reduction in cases where keypresses (in inputs) are also detected by the page. Second 2 points remain to be considered.

Shipping with 1.13.7, hopefully very soon (pending review on the Chrome Web Store).

The highlighting improvement in the last update contained a small error which could result in an infinite loop, freezing the page. I am looking into ways to avoid such problems in future.

Edit: now published for Firefox and Chrome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request planned Will be actioned
Projects
None yet
Development

No branches or pull requests

2 participants