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

Consider consolidating all link hints commands to one: LinkHints.activate #4634

Open
philc opened this issue Feb 13, 2025 · 0 comments
Open

Comments

@philc
Copy link
Owner

philc commented Feb 13, 2025

Today we have several very similar link hints commands. Each one specifies an option to a core command.

To improve this and allow people to combine these orthogonal options together, we could move to one command, LinkHints.activate, which takes parameters to customize its behavior:

  • action: open, focus, hover, copy
  • destination/placement: current tab, new tab, new window
  • multiple: i.e. open many at once; currently LinkHints.activateModeWithQueue
  • focus on open: whether to switch immediately to the new tab
  • incognito: whether the destination should be an incognito window

This would make it seamless to add in long-tail use cases for the link hints command, like opening a link in a new window rather than a new tab (#3450).

These are the historical reasons we have separate commands for each parameter:

  1. We added each link hints variant one at a time over many years.
  2. The ability to have user-specified options on Vimium commands was added much later.
  3. The only way we expose documentation about commands is in the help dialog, which even today doesn't have a way of listing and explaining the various options that some commands accept. However, we're progressing the UX towards this capability. Now the help dialog shows if a user has added any options to commands they've bound; next is to implement a better UX for documenting all commands and their allowed options (see [RFC] Add a (painfully) minimal commands listing #2827 for inspiration).

Backwards compatibility: we can either migrate people's existing configurations at the time they are read, or we can indefinitely support e.g. LinkHints.activateModeToOpenInNewTab as an alias for LinkHints.activate destination=newTab.

Related: #1948.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant