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

Add keyboard shortcuts. #2549

Merged
merged 1 commit into from
May 27, 2024
Merged

Add keyboard shortcuts. #2549

merged 1 commit into from
May 27, 2024

Conversation

meisterT
Copy link
Member

@meisterT meisterT commented May 13, 2024

This is just draft code to demonstrate possible behavior and gauge interest.

Go to a single submission, and try typing j or k to move to the next or previous submission. This also works on all other pages that end with a number.

Also, try typing s followed by a sequence of digits and Enter, e.g. s123<Enter>, it will navigate to the submission page with the submission 123.

Let me know if something like this is interesting.

TODO:

  • We want to restrict this to the jury pages.
  • Potentially add an option to disable it.
  • If we add it, we could add other shortcuts, e.g. t42 goes to team 42, etc.
  • Unfortunately, j is both the natural next key as well as the natural key for judgings.
  • I am not sure whether I always reset things correctly.
  • We probably want to add Shift + ? to display a keyboard shortcut help box.
  • Other keyboard shortcuts, e.g. to access source code quickly, are trivial to add.

@meisterT meisterT force-pushed the keyboardshortcuts branch 2 times, most recently from ff42ac8 to 6c02a8b Compare May 27, 2024 14:51
@meisterT meisterT marked this pull request as ready for review May 27, 2024 14:55
webapp/public/js/domjudge.js Outdated Show resolved Hide resolved
webapp/public/js/domjudge.js Outdated Show resolved Hide resolved
webapp/public/js/domjudge.js Dismissed Show dismissed Hide dismissed
@meisterT meisterT added this pull request to the merge queue May 27, 2024
Merged via the queue into DOMjudge:main with commit 5b3413a May 27, 2024
22 checks passed
@meisterT meisterT deleted the keyboardshortcuts branch May 27, 2024 16:00
@meisterT
Copy link
Member Author

This is the current list of keyboard shortcuts

image

We probably want to add it the manual once we settled on it.

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

Successfully merging this pull request may close these issues.

2 participants