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

feat(KeyboardShortcuts): add customizable shortcuts for common actions #5097

Draft
wants to merge 13 commits into
base: production
Choose a base branch
from

Conversation

maxpatiiuk
Copy link
Member

Fixes #1746

Checklist

  • Self-review the PR after opening it to make sure the changes look good
    and self-explanatory (or properly documented)
  • Add automated tests
  • Add relevant issue to release milestone

Testing instructions

  • Added Keyboard Shortcuts item to User tools - verify it looks good
  • For each shortcut on the Keyboard Shortcuts page that has a default value assigned, make sure that the default keyboard shortcuts we have set do not already have an action assigned to them (we don't want to overwrite default browser or OS actions, unless we really have to, or unless user would expect us to do so)
    • i.e open any non-specify webpage (google.com) and see if this key does anything (this needs to be verified in non-specify pages because if specify collides with a system shortcut, specify will take priority, and so you may not even know that it collides)
    • Verify this on Windows in Chrome and Firefox
    • Verify this on macOS in Chrome and Safari
    • (if possible) Verify this on Linux in Firefox

@maxpatiiuk maxpatiiuk self-assigned this Jul 14, 2024
@maxpatiiuk maxpatiiuk changed the title Keyboard shortcuts feat(KeyboardShortcuts): add customizable shortcuts for common actions Jul 14, 2024
@maxpatiiuk maxpatiiuk force-pushed the keyboard-shortcuts branch from d19d3ec to d3623a8 Compare July 14, 2024 02:37
@maxpatiiuk maxpatiiuk force-pushed the keyboard-shortcuts branch from d3623a8 to aa3beed Compare July 21, 2024 21:47
@grantfitzsimmons
Copy link
Member

CSIRO mentioned users are having repetitive strain injuries due to this not being implemented

@maxpatiiuk
Copy link
Member Author

maxpatiiuk commented Dec 15, 2024

Bugs:

  • Can add same shortcut twice for the same action
  • When adding the keyboard shortcut, can't reach the "Remove" button with keyboard alone

maxpatiiuk added a commit to maxpatiiuk/calendar-plus that referenced this pull request Dec 22, 2024
The original keyboard shortcuts handling code was used as a basis for
specify/specify7#5097, but then, on that PR I
made logic more robust and added features.

Now backporting the code from that PR back into calendar-plus.

Fixes #255
maxpatiiuk added a commit to maxpatiiuk/calendar-plus that referenced this pull request Dec 23, 2024
The original keyboard shortcuts handling code was used as a basis for
specify/specify7#5097, but then, on that PR I
made logic more robust and added features.

Now backporting the code from that PR back into calendar-plus.

Fixes #255
"Keyboard" is a bit too generic/ambiguous
- Replace "show nodes with children only" checkbox with a toggle button.
  Reasons:
  - The checkbox was the only thing below the tree viewer - occupying
    an entire line of horizontal space.
  - Because of how Tab and Shift+Tab keys are used in the tree viewer,
    moving focus to elements below the tree viewer is not possible - you
    can only move above the tree viewer. That made this checkbox
    inaccessible from keyboard
  - The label for this checkbox is long, adding visual noise - it's
    cleaner as a small tidy button
- Don't display split view controls if split view is not enabled to
  reduce visual clutter
@maxpatiiuk
Copy link
Member Author

Added ability to set shortcut to any URL:

out.mp4

Use cases:

  • can set a keyboard shortcut to any menu item/user tool
  • can set a keyboard shortcut to a record set/query that you use often
  • can set a keyboard shortcut to an external website (morphosource/gbif/...)
    • this was trivial to implement, and makes the feature much more powerful - will see how it will end up being used
  • brings us closer to Implement Workspaces #5686

By default, I only included keyboard shortcut to open the keyboard shortcut viewer, and will add shortcut to go to the home page. For the rest, we can let people set those to what makes sense to them (I avoided setting too many be default as things can conflict with os/browser/browser extensions, unless we go for 3-4 key shortcuts)

TODO:

  • come up with a default keyboard shortcut to go to the home page

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

Successfully merging this pull request may close these issues.

Add keyboard shortcuts for common actions
2 participants