[UI] Hotkeys and default URL search params#250
Open
Segolene-Albouy wants to merge 9 commits intoTETRAS-IIIF:mainfrom
Open
[UI] Hotkeys and default URL search params#250Segolene-Albouy wants to merge 9 commits intoTETRAS-IIIF:mainfrom
Segolene-Albouy wants to merge 9 commits intoTETRAS-IIIF:mainfrom
Conversation
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR proposes several additions for viewer interaction.
Keyboard Shortcut
hotkeys/with a genericHotkeyListener, an extendableHotkeyDefinitionsregistry and customhotkeysEventsto link Redux state and React componentsA: if the annotation form sidebar (companion window) is closed, open it to add new annotationBackspace/Del: when a shape is selected, delete the shape. If the annotation contains no more shapes, delete the annotation as well and close companion windowEnter: when the companion window is open, save the annotationEsc: unselect selected annotation (if one is selected), then close companion windowHotkeysListeneris mounted insideexternalStorageAnnotationPlugin. Events include:mae-save-annotation: when saving an annotationmae-delete-shape: when deleting a shapemae-annotation-empty: when the last shape associated with an annotation is deletedContext configuration with URL search parameters
src/contextParams.jsallow to define configuration parameters in URL, if not present, behavior is the same as before. This can be extentededitMode: when set totrue, all shape outlines are visible. When hovering an annotation, the outline changes color. On click on the shape, the shape is immediately resizabledefaultForm: can be set to "note"|"tag"|"expert", when set, the annotation form is automatically selecteddefaultTags: can be set with a list of strings separated by commas. If note form is selected, all the tags are added by default to the annotation. If tag form is selected, only the first tag of the list is addedTest with
http://localhost:4444/demo/src/index.html?editMode=true&defaultForm=note&defaultTags=super,coolMiscellaneous
AnnotationFormHeaderAnnotationDrawingand bit of linting