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

Make forward slash (/) opening search page customizable, or remove it as a default shortcut #2710

Open
hdfssk opened this issue Mar 24, 2024 · 1 comment
Labels
c: bug Something isn't working s: pending triage Pending Triage

Comments

@hdfssk
Copy link

hdfssk commented Mar 24, 2024

Pressing forward slash for search currently

  1. switches elk to its search page,
  2. appends “/” to anything currently in the search field,
  3. starts a new search (which usually comes up empty, because it’s just searching for “/” or “//”)

This isn’t very useful because:

  1. it overrides the browser’s built in forward slash program for opening “search in page”,
  2. it’s fairly easy to type forward slash accidentally and be abruptly switched to the search page,
  3. returning to the previous page (for example, Home) loses your scroll position, placing you back at the top (forcing the user to scroll down & actively seek where they were before), making accidental searches disrupt normal usage. Also,
  4. who ever wants to search for “/” by itself? what would the utility of this be?

Please consider changing “go to search page” shortcut so it is not plain forward slash, either disabling it entirely or adding a modifier key to it, so it is less likely to be pressed accidentally - at least until it’s possible to override keyboard shortcuts.

Note that CTRL-K / CMD-K is a working alternative that opens an in-page search modal dialog, which fills pretty much every need for a search shortcut: unlikely to be accidentally triggered; easy to dismiss (with ESC); does not take the user away from what they’re viewing w/ no easy way to get back to it. Forward slash should really open this search modal dialog instead of switching to the search page, if it remains a default keyboard shortcut.

If people are determined that forward slash remain the default keyboard shortcut for opening the search page, it should still be disabled until a few aspects of the search experience are fixed, so that:

  1. switching from Home to Search and back to Home restores the original scroll position in Home,
  2. there is a simple way to leave the search page and go back to elk's previous view, whatever that way (for example, pressing ESC), and
  3. a “/” is not appended to the search field when forward slash is used to switch to the search page.

The present “/” shortcut search experience is a garden rake left outside that whacks the user in the face when they accidentally type it. This would be less of a problem if keyboard shortcuts could be deactivated or overridden, but is still an anti-feature in its present form. Please consider reassigning it, removing it, or making it open the search modal dialog instead of the search page.

Expected

initial view
initial view
accidentally pressed forward slash, search modal dialog pops up
accidentally pressed forward slash, search modal dialog pops up
oops! pressed ESC, initial view is restored
oops! pressed ESC, initial view is restored

Actual

initial view
initial view
accidentally pressed forward slash, search page opens, unhelpfully searching for "/"
accidentally pressed forward slash, search page opens, unhelpfully searching for "/"
oops! pressed ESC, nothing happens. clicked Home link, but arg! initial view is not restored
oops! pressed ESC, nothing happens. clicked Home link, but arg! initial view is not restored
pressed forward slash again, search page opens, unhelpfully searching for "//"
pressed forward slash again, search page opens, unhelpfully searching for "//"

@hdfssk hdfssk added c: bug Something isn't working s: pending triage Pending Triage labels Mar 24, 2024
Copy link

stackblitz bot commented Mar 24, 2024

Solve in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: bug Something isn't working s: pending triage Pending Triage
Projects
None yet
Development

No branches or pull requests

1 participant