-
Notifications
You must be signed in to change notification settings - Fork 165
#4872 - Customizable key-bindings #5804
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements customizable key bindings for the annotation editor, allowing users to configure keyboard shortcuts via Spring Boot properties.
- Centralized key bindings configuration using Spring Boot
@ConfigurationProperties - Added a custom converter (
StringToEnumArrayConverter) to parse comma-separated key binding values from configuration files - Updated all UI components to use injected key bindings and display them in tooltips
Reviewed changes
Copilot reviewed 25 out of 26 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
KeyBindingsProperties.java |
Interface defining keyboard shortcut categories (navigation, editing, anchoring mode, dialog) |
KeyBindingsPropertiesImpl.java |
Implementation with default values matching existing hard-coded shortcuts |
StringToEnumArrayConverter.java |
Spring converter to parse comma-separated enum values into KeyType arrays |
KeyBindingsUtil.java |
Utility for formatting KeyType arrays as human-readable shortcut strings |
AnnotationAutoConfiguration.java |
Registers KeyBindingsPropertiesImpl and StringToEnumArrayConverter as Spring beans |
UndoPanel.java |
Updated to inject key bindings and append shortcuts to tooltips |
DocumentNavigator.java |
Updated to use configurable key bindings for document navigation |
CurationDocumentNavigator.java |
Updated to use configurable key bindings for curation navigation |
DefaultPagingNavigator.java |
Updated to use configurable key bindings for page navigation |
AnnotationDetailEditorPanel.java |
Updated to use configurable key bindings for editing actions |
AnchoringModePanel.java |
Updated to retrieve key bindings from configuration instead of static map |
OpenDocumentDialogPanel.java |
Updated to use configurable key binding for closing dialog |
*.utf8.properties |
Removed hard-coded shortcuts from tooltip text |
settings_annotation-editor.adoc |
Documentation of available key binding configuration options |
*Test.java |
Unit and integration tests for key bindings functionality |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...ception-doc/src/main/resources/META-INF/asciidoc/admin-guide/settings_annotation-editor.adoc
Outdated
Show resolved
Hide resolved
...ception-doc/src/main/resources/META-INF/asciidoc/admin-guide/settings_annotation-editor.adoc
Outdated
Show resolved
Hide resolved
...ception-doc/src/main/resources/META-INF/asciidoc/admin-guide/settings_annotation-editor.adoc
Outdated
Show resolved
Hide resolved
...ception-doc/src/main/resources/META-INF/asciidoc/admin-guide/settings_annotation-editor.adoc
Outdated
Show resolved
Hide resolved
...ception-doc/src/main/resources/META-INF/asciidoc/admin-guide/settings_annotation-editor.adoc
Outdated
Show resolved
Hide resolved
...ception-doc/src/main/resources/META-INF/asciidoc/admin-guide/settings_annotation-editor.adoc
Outdated
Show resolved
Hide resolved
...ception-doc/src/main/resources/META-INF/asciidoc/admin-guide/settings_annotation-editor.adoc
Outdated
Show resolved
Hide resolved
...ception-doc/src/main/resources/META-INF/asciidoc/admin-guide/settings_annotation-editor.adoc
Outdated
Show resolved
Hide resolved
...ception-doc/src/main/resources/META-INF/asciidoc/admin-guide/settings_annotation-editor.adoc
Outdated
Show resolved
Hide resolved
...ception-doc/src/main/resources/META-INF/asciidoc/admin-guide/settings_annotation-editor.adoc
Outdated
Show resolved
Hide resolved
3f31fab to
d52dfbf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 25 out of 26 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.../java/de/tudarmstadt/ukp/clarin/webanno/api/annotation/config/KeyBindingsPropertiesImpl.java
Outdated
Show resolved
Hide resolved
...java/de/tudarmstadt/ukp/clarin/webanno/ui/annotation/detail/AnnotationDetailEditorPanel.java
Show resolved
Hide resolved
...java/de/tudarmstadt/ukp/clarin/webanno/ui/annotation/detail/AnnotationDetailEditorPanel.java
Show resolved
Hide resolved
.../java/de/tudarmstadt/ukp/inception/ui/curation/sidebar/CurationSidebarDocumentNavigator.java
Outdated
Show resolved
Hide resolved
...ception-doc/src/main/resources/META-INF/asciidoc/admin-guide/settings_annotation-editor.adoc
Outdated
Show resolved
Hide resolved
...ception-doc/src/main/resources/META-INF/asciidoc/admin-guide/settings_annotation-editor.adoc
Outdated
Show resolved
Hide resolved
.../java/de/tudarmstadt/ukp/clarin/webanno/api/annotation/config/KeyBindingsPropertiesImpl.java
Outdated
Show resolved
Hide resolved
.../java/de/tudarmstadt/ukp/clarin/webanno/api/annotation/config/KeyBindingsPropertiesImpl.java
Outdated
Show resolved
Hide resolved
d52dfbf to
0a8f27c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 25 out of 26 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.../java/de/tudarmstadt/ukp/clarin/webanno/ui/curation/actionbar/CurationDocumentNavigator.java
Show resolved
Hide resolved
...java/de/tudarmstadt/ukp/clarin/webanno/api/annotation/config/StringToEnumArrayConverter.java
Outdated
Show resolved
Hide resolved
...a/de/tudarmstadt/ukp/clarin/webanno/api/annotation/config/KeyBindingsPropertiesImplTest.java
Outdated
Show resolved
Hide resolved
...c/test/java/de/tudarmstadt/ukp/clarin/webanno/api/annotation/config/KeyBindingsUtilTest.java
Show resolved
Hide resolved
...java/de/tudarmstadt/ukp/clarin/webanno/ui/annotation/actionbar/docnav/DocumentNavigator.java
Show resolved
Hide resolved
0a8f27c to
4a651a0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 25 out of 26 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...ception-doc/src/main/resources/META-INF/asciidoc/admin-guide/settings_annotation-editor.adoc
Outdated
Show resolved
Hide resolved
...java/de/tudarmstadt/ukp/clarin/webanno/api/annotation/config/StringToEnumArrayConverter.java
Show resolved
Hide resolved
...java/de/tudarmstadt/ukp/clarin/webanno/api/annotation/config/StringToEnumArrayConverter.java
Outdated
Show resolved
Hide resolved
4a651a0 to
9bc881d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 26 out of 27 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...java/de/tudarmstadt/ukp/clarin/webanno/ui/annotation/detail/AnnotationDetailEditorPanel.java
Outdated
Show resolved
Hide resolved
...java/de/tudarmstadt/ukp/clarin/webanno/ui/annotation/detail/AnnotationDetailEditorPanel.java
Outdated
Show resolved
Hide resolved
.../java/de/tudarmstadt/ukp/inception/ui/curation/sidebar/CurationSidebarDocumentNavigator.java
Outdated
Show resolved
Hide resolved
.../java/de/tudarmstadt/ukp/inception/ui/curation/sidebar/CurationSidebarDocumentNavigator.java
Outdated
Show resolved
Hide resolved
...java/de/tudarmstadt/ukp/clarin/webanno/ui/annotation/actionbar/docnav/DocumentNavigator.java
Show resolved
Hide resolved
- Centralize key bindings in a properties class configurable via Spring Boot - Inject key bindings into the button tooltips - Added a special converter to deal with comma-separated key binding values - Added tests
9bc881d to
ba8f194
Compare
What's in the PR
How to test manually
Automatic testing
Documentation