-
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
Feature/keybinds #237
Conversation
…null class keybinds
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 a comprehensive keybind management system with a dedicated toolbox item for viewing and customizing keyboard shortcuts. The toolbox becomes collapsible to provide more workspace, and keybind configurations are split and renamed for clarity.
Key changes:
- Added collapsible toolbox with persistent state and a new Keybinds toolbox item for viewing/editing shortcuts
- Split
change_zoom_keybindintoreset_zoom_keybindandshow_full_image_keybind - Renamed
create_bbox_on_initial_croptocreate_bbox_on_initial_crop_keybindfor consistency
Reviewed Changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/testing-utils/annotation_utils.js | Adds helper to extract class ID from annotations |
| tests/e2e/keybinds.spec.js | E2E tests for keybind toolbox UI features |
| tests/e2e/keybind-functionality.spec.js | E2E tests verifying each keybind works correctly |
| src/toolbox_items/keybinds.ts | New toolbox item for keybind management with editing and persistence |
| src/toolbox_items/image_filters.ts | Adds collapse state persistence |
| src/toolbox_items/annotation_list.ts | Adds collapse state persistence |
| src/toolbox.ts | Adds collapsible toolbox UI and updates keybind references |
| src/listeners.ts | Refactors keybind handling to support chords and new keybind names |
| src/initializer.ts | Restores custom keybinds from localStorage on init |
| src/index.js | Adds keybind editing state flag |
| src/configuration.ts | Updates keybind config properties and adds dynamic keybind key enumeration |
| src/blobs.js | Adjusts toolbox header flex sizing |
| demo/multi-class.html | Updates demo with new keybind property names |
| api_spec.md | Documents new keybind configuration properties |
| .github/tasks.md | Task tracking for implementation |
| .github/copilot-instructions.md | Updates coding guidelines |
Co-authored-by: Copilot <[email protected]>
joshua-dean
left a comment
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.
Toolbox collapse is a bit clunky.
Keybind functionality looks great though 👍
| - [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 |
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.
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
Co-authored-by: Joshua Dean <[email protected]>
Keybinds
Description
Keybindstoolbox item for viewing and customizing keybindscreate_bbox_on_initial_croptocreate_bbox_on_initial_crop_keybindfor consistencychange_zoom_keybindinto two separate keybinds:reset_zoom_keybind(default:r) - Reset zoom to fit imageshow_full_image_keybind(default:shift+r) - Zoom to show full imagePR Checklist
package.jsonhas been bumped since last releasepackage.jsonandsrc/version.jsnpm installandnpm run buildAFTER bumping the version numberapi_spec.md)changelog.mdBreaking API Changes
create_bbox_on_initial_croptocreate_bbox_on_initial_crop_keybindfor consistencychange_zoom_keybindinto two separate keybinds:reset_zoom_keybind(default:r) - Reset zoom to fit imageshow_full_image_keybind(default:shift+r) - Zoom to show full image