-
Notifications
You must be signed in to change notification settings - Fork 462
feat(annotator): Canvas settings #5192
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 introduces a comprehensive canvas settings dialog for the annotator, allowing users to customize annotation visibility, opacity, image adjustments, and rendering preferences.
Changes:
- Added a settings dialog with controls for annotation opacity (fill and border), image adjustments (brightness, contrast, saturation), label visibility, and pixel view mode
- Refactored the toolbar to separate concerns: visibility toggle, focus toggle, and zoom controls are now individual components
- Implemented a context provider pattern for managing and applying canvas settings through CSS custom properties
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
toggle-focus.component.tsx |
New component for toggling focus mode in the annotator |
toggle-annotations-visibility.component.tsx |
New component for toggling annotation visibility with tooltip |
settings.module.scss |
Styles for the settings dialog with custom padding |
settings.component.tsx |
Refactored to display a popover dialog containing canvas settings |
settings-list.component.tsx |
Main settings UI with switches and sliders for all configurable options |
image-setting.component.tsx |
Slider component for image adjustment settings (brightness, contrast, saturation) |
header-setting.component.tsx |
Reusable header component for settings with reset functionality and value display |
canvas-settings.test.tsx |
Comprehensive test suite for canvas settings functionality |
canvas-settings.component.tsx |
Wrapper component connecting settings UI to the canvas settings provider |
canvas-settings-provider.component.tsx |
Context provider managing canvas settings state with default values |
annotator-canvas-settings.component.tsx |
Component that applies canvas settings as CSS custom properties |
annotation-setting.component.tsx |
Slider component for annotation opacity settings |
primary-toolbar.component.tsx |
Updated to include separated visibility, settings, zoom, and focus controls |
media-preview.component.tsx |
Integrated canvas settings provider and wrapper into the component hierarchy |
utils.ts |
Changed annotation fill opacity from hardcoded value to CSS variable |
edit-bounding-box.component.tsx |
Updated to use new AnnotationShapeRenderer component |
annotator-canvas.tsx |
Added CSS class to image element for applying settings |
annotator-canvas.module.scss |
Styles applying CSS custom properties for image filters and rendering |
mask-annotations.component.tsx |
Updated to use new AnnotationShapeRenderer component |
annotation.component.tsx |
Updated to use new AnnotationShapeRenderer component |
annotation-shape-without-labels.component.tsx |
New component for rendering annotations without labels |
annotation-shape-renderer.component.tsx |
New component that conditionally renders annotations with or without labels based on settings |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
application/ui/src/features/annotator/annotations/annotation-shape-without-labels.component.tsx
Outdated
Show resolved
Hide resolved
📊 Test coverage report
|
Docker Image SizesCPU
GPU
XPU
|
Summary
This PR introduces annotator canvas settings so the user can change annotation opacity, border opacity, hide labels etc.
Close #5125
How to test
Screen.Recording.2026-01-14.at.14.27.47.mov
Checklist