Open
Conversation
...packages/smart-tools/src/edit-bounding-box/edit-bounding-box/edit-bounding-box.component.tsx
Show resolved
Hide resolved
| updateAnnotation={(newAnnotation) => { | ||
| scene.updateAnnotation({ | ||
| ...newAnnotation, | ||
| shape: convertToolShapeToGetiShape(newAnnotation.shape), |
web_ui/src/pages/annotator/tools/edit-tool/edit-annotation-tool.component.tsx
Show resolved
Hide resolved
camiloHimura
previously approved these changes
Aug 21, 2025
5a8e03e to
1fd6218
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the edit bounding box functionality by extracting components and utilities into a new smart-tools package structure. The refactoring aims to improve code organization and reusability without breaking existing functionality.
- Extracted edit bounding box tool and translate shape component to the smart-tools package
- Moved utility functions (allowPanning, getBoundingBoxResizePoints, etc.) to centralized locations
- Updated import paths and removed duplicate code across the codebase
Reviewed Changes
Copilot reviewed 24 out of 25 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
drawing-box.component.tsx |
Updated import path for allowPanning utility |
utils.ts |
Removed allowPanning function (moved to smart-tools) |
svg-tool-canvas.component.tsx |
Consolidated imports from smart-tools |
keypoint-tool.component.tsx |
Updated imports for moved utilities and TranslateShape |
edit-tool/utils.ts |
Removed file - utilities moved to smart-tools package |
edit-tool.component.tsx |
Added Labels component rendering with Fragment wrapper |
| Multiple edit tool components | Updated to use TranslateShape from smart-tools and render children |
edit-bounding-box.test.tsx |
Updated test imports and shape type references |
edit-annotation-tool.component.tsx |
Integrated smart-tools EditBoundingBox component |
| Smart-tools package files | Added new utilities, components, and type definitions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
web_ui/packages/smart-tools/src/edit-bounding-box/translate-shape.component.tsx
Show resolved
Hide resolved
7f5fe6b to
b3d2733
Compare
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.
📝 Description
✨ Type of Change
Select the type of change your PR introduces:
🧪 Testing Scenarios
Describe how the changes were tested and how reviewers can test them too:
✅ Checklist
Before submitting the PR, ensure the following: