-
Notifications
You must be signed in to change notification settings - Fork 5
Feature/keybinds #237
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
Merged
Merged
Feature/keybinds #237
Changes from all commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
90155dd
first stab at collapsable toolbox
TrevorBurgoyne 9b4e556
touch up and fix issues with collapse
TrevorBurgoyne 0e4e13b
start keybinds
TrevorBurgoyne b9d76db
labels vs titles
TrevorBurgoyne 68fe3ab
fix css clash
TrevorBurgoyne 723d9b6
add flag while editing keybinds
TrevorBurgoyne ed76d51
handle chords
TrevorBurgoyne 6533e9f
update all keybinds to use the chord logic
TrevorBurgoyne 64e7d4b
store collapse state
TrevorBurgoyne b23d1c1
refactor 'default keybinds'
TrevorBurgoyne 2e39bd1
Rename change zoom -> reset zoom
TrevorBurgoyne eddd576
configurable class keybinds
TrevorBurgoyne 2b628d4
store keybinds that user sets
TrevorBurgoyne 660897a
add collapse to keybind sections
TrevorBurgoyne ffff427
Reset to default
TrevorBurgoyne 7a19c72
dont use local storage for og keybind check
TrevorBurgoyne e883802
fix original keybinds to use config options passed to constructor
TrevorBurgoyne f4c2494
centralize keybind config names
TrevorBurgoyne f79e925
update active class keybinds on subtask switch, and allow setting of …
TrevorBurgoyne 3b2dff9
fix rendering collapsed keybind sections
TrevorBurgoyne a0d9b72
fix reseting class keybind to null
TrevorBurgoyne 8556c65
use log message
TrevorBurgoyne 729d50b
move reset button to the left of the keybind
TrevorBurgoyne d87c2df
separate reset zoom and show full image
TrevorBurgoyne a2564b6
check if user keybinds are actually different from default
TrevorBurgoyne 6864e76
add some tests
TrevorBurgoyne 16f2e14
fix tests
TrevorBurgoyne 97ad330
tests for each keybinds
TrevorBurgoyne 18b18a6
tests for non config keybinds
TrevorBurgoyne 51c325d
add case for cancel annotation
TrevorBurgoyne 78b89d2
test class keybinds
TrevorBurgoyne 557dd8e
Bump version and update changelog
TrevorBurgoyne dc90f03
add more other keybinds
TrevorBurgoyne f8c7444
Apply suggestions from code review
TrevorBurgoyne 4b2cc63
Merge branch 'feature/keybinds' of github.com:SenteraLLC/ulabel into …
TrevorBurgoyne 0821168
minor tweaks to keybind descriptions
TrevorBurgoyne 40ed0fc
Update src/toolbox_items/keybinds.ts
TrevorBurgoyne 61d0b6f
Merge branch 'feature/annotation-list' into feature/keybinds
TrevorBurgoyne 50d3254
change toggle target to header
TrevorBurgoyne cda9212
full collapse toolbox, button floats
TrevorBurgoyne 079edc9
round out the button
TrevorBurgoyne 750aa80
fix toolbox collapse css
TrevorBurgoyne 2391f36
prevent scroll into view on toolbox collapse
TrevorBurgoyne 8f92e93
Merge branch 'main' into feature/keybinds
TrevorBurgoyne 8825931
update api spec
TrevorBurgoyne ef1ec21
changelog consistency
TrevorBurgoyne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,36 +1,77 @@ | ||
| ## Tasks | ||
| - [x] Read the description in [#234](https://github.com/SenteraLLC/ulabel/issues/234) | ||
| - [x] Write a clear summary of the requested change | ||
| - [x] Break the requested feature down into concrete steps. Add the steps to the tasks list, and then start working on then one by one. | ||
| - [x] Add a sideways, clickable arrow to minimize the entire toolbox | ||
| - [x] Add collapse button to toolbox HTML | ||
| - [x] Add CSS styles for collapsed state | ||
| - [x] Add click handler to toggle collapsed state | ||
| - [x] Store collapsed state in localStorage | ||
| - [x] Test functionality | ||
| - [x] Move arrow to top of toolbox (instead of middle) | ||
| - [x] Make annbox expand when toolbox is collapsed | ||
| - [x] Make collapsed button visible | ||
| - [x] Create a keybinds toolbox item | ||
| - [x] Research existing keybinds in the codebase | ||
| - [x] Create basic keybinds toolbox item file | ||
| - [x] Register keybinds toolbox item in configuration | ||
| - [x] Display list of all keybinds (the key) labeled with the name | ||
| - [x] Add hover tooltips with detailed descriptions (using title attribute) | ||
| - [x] Add collision detection and red highlighting | ||
| - [x] Implement editing for configurable keybinds | ||
| - [x] Test functionality | ||
| - [x] Add support for keybind "chords" (ie, "shift+i") | ||
| - [x] Update keybind edit handler to capture modifier keys (shift, ctrl, alt) | ||
| - [x] Create chord string format (e.g., "shift+i", "ctrl+alt+d") | ||
| - [x] Update key comparison logic in listeners to support chords | ||
| - [x] Update display to show chords properly (displays captured chord automatically) | ||
| - [x] Test chord functionality | ||
| - [x] Store collapse/expand for applicable toolbox items | ||
| - [x] Keybinds | ||
| - [x] Annotation List | ||
| - [x] Image Filters | ||
| - [x] Make all keybinds configurable | ||
| - [x] Minor changes to existing keybinds | ||
| - [x] Rename "Change Zoom" keybind to "Reset Zoom" | ||
| - [x] Change "Toggle Mode" label in the keybind toolbox item to "Toggle Annotation Mode" | ||
| - [x] Make class keybinds configurable in the keybinds toolbox item | ||
| - [x] Store keybinds in local storage | ||
| - [x] Only save them when a user explicitly sets it | ||
| - [x] For keybinds using a user setting, add a button to reset that keybind to default (should change keybind and delete stored keybind) | ||
| - [x] Add "Reset All to Default" button in the keybinds toolbox item that resets all keybinds and deletes stored user keybinds | ||
| - [x] Add a light yellow highlight on keybinds that are using a user setting instead of a default | ||
| - [x] Make sure that we update collison highlights after resetting a keybind to default | ||
| - [x] Only show the reset to default for keybinds with user settings, not on those already at the default | ||
| - [x] Make sure the class keybinds also are included in the keybind collision checks | ||
| - [x] Fix reset to default to use constructor-provided config values instead of hardcoded Configuration defaults | ||
| - [x] Centralize keybind config property names in Configuration.KEYBIND_CONFIG_KEYS constant | ||
| - [x] Make KEYBIND_CONFIG_KEYS dynamically generated from Configuration class properties | ||
| - [x] Rename create_bbox_on_initial_crop to create_bbox_on_initial_crop_keybind for consistency | ||
| - [x] Replace any console outputs with `log_message` | ||
| - [x] Replace the "reset_zoom_keybind" with two separate keybinds: | ||
| - [x] Add "show_full_image_keybind" property to Configuration | ||
| - [x] Update listeners.ts to use both keybinds independently | ||
| - [x] Update toolbox.ts to use both keybinds independently | ||
| - [x] Update api_spec.md to document both keybinds | ||
| - [x] Write e2e tests for the keybind toolbox item | ||
| - [x] Ability to set keybind to a chord | ||
| - [x] Ability to reset keybind | ||
| - [x] Ability to set a class keybind | ||
| - [x] Run tests to verify they pass | ||
| - [x] Write a e2e test for each keybind | ||
| - [x] reset_zoom_keybind (r) | ||
| - [x] show_full_image_keybind (shift+r) | ||
| - [x] create_point_annotation_keybind (c) | ||
| - [x] delete_annotation_keybind (d) | ||
| - [x] switch_subtask_keybind (z) | ||
| - [x] toggle_annotation_mode_keybind (u) | ||
| - [x] create_bbox_on_initial_crop_keybind (f) | ||
| - [x] toggle_brush_mode_keybind (g) | ||
| - [x] toggle_erase_mode_keybind (e) | ||
| - [x] increase_brush_size_keybind (]) | ||
| - [x] decrease_brush_size_keybind ([) | ||
| - [x] annotation_size_small_keybind (s) | ||
| - [x] annotation_size_large_keybind (l) | ||
| - [x] annotation_size_plus_keybind (=) | ||
| - [x] annotation_size_minus_keybind (-) | ||
| - [x] annotation_vanish_keybind (v) | ||
| - [x] fly_to_next_annotation_keybind (tab) | ||
| - [x] fly_to_previous_annotation_keybind (shift+tab) | ||
|
|
||
| ### Summary | ||
| Create an annotation list toolbox item that displays all annotations in a list format, similar to other annotation tools. The list should: | ||
| - Display each annotation (by ID or index) | ||
| - Allow show/hide of deprecated annotations (default: hide) | ||
| - Support grouping by class | ||
| - Enable clicking to "fly to" the annotation | ||
| - Show annotation labels/IDs (on hover or drawn on canvas) | ||
| - Display "current idx / total" when navigating through annotations | ||
| - Highlight annotations when hovering in the list | ||
|
|
||
| ### Implementation Steps | ||
| - [x] 1. Research existing toolbox items and understand the toolbox structure | ||
| - [x] Read `src/toolbox.ts` to understand how toolbox items work | ||
| - [x] Review existing toolbox items in `src/toolbox_items/` | ||
| - [x] Understand how annotation data is accessed and structured | ||
| - [x] 2. Create the basic annotation list toolbox item | ||
| - [x] Create new file `src/toolbox_items/annotation_list.ts` | ||
| - [x] Implement basic UI structure (container, list elements) | ||
| - [x] Register the toolbox item in the main toolbox | ||
| - [x] 3. Implement core list functionality | ||
| - [x] Display all annotations with their ID/index | ||
| - [x] Add show/hide toggle for deprecated annotations (default: hide) | ||
| - [x] Add option to group by class | ||
| - [x] 4. Implement click-to-fly functionality | ||
| - [x] Integrate with existing "fly to" functionality from PR #230 | ||
| - [x] Add click handlers to list items | ||
| - [x] Display "current idx / total" indicator | ||
| - [x] 5. Implement hover highlighting | ||
| - [x] Add hover handlers to list items | ||
| - [x] Integrate with existing annotation highlighting system | ||
| - [x] Ensure bidirectional highlighting (list hover → canvas, canvas hover → list) | ||
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
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
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
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
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
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
Oops, something went wrong.
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.
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.
On my machine, this just expands the window sideways and adds a scrollbar on the bottom:

Hovering annotations will cause the dual-highlight functionality of the annotation list to trigger, and scroll sideways to bring the toolbox into view. Ideally this would physically collapse the toolbox instead of expanding like this.
Uh oh!
There was an error while loading. Please reload this page.
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.
ive tried reworking this a bit, should definitely not do the "scroll to annotation list" when collapsed anymore. and now the toolbox should be fully hidden and not just partially obscured