Skip to content

Conversation

jpggvilaca
Copy link
Contributor

@jpggvilaca jpggvilaca commented Aug 20, 2025

📝 Description

  • Extract bounding box tool
  • Extract translate shape
  • Extract a few utils
  • Remove Labels from bounding box tool and moved it up the tree

✨ Type of Change

Select the type of change your PR introduces:

  • 🐞 Bug fix – Non-breaking change which fixes an issue
  • 🚀 New feature – Non-breaking change which adds functionality
  • 🔨 Refactor – Non-breaking change which refactors the code base
  • 💥 Breaking change – Changes that break existing functionality
  • 📚 Documentation update
  • 🔒 Security update
  • 🧪 Tests

🧪 Testing Scenarios

Describe how the changes were tested and how reviewers can test them too:

  • ✅ Tested manually
  • 🤖 Run automated end-to-end tests

✅ Checklist

Before submitting the PR, ensure the following:

  • 🔍 PR title is clear and meaningful
  • ✍️ PR description clearly explains the changes and their reason
  • 📝 I have linked the PR to the corresponding GitHub Issues, if any
  • 💬 I have commented my code, especially in hard-to-understand areas
  • 📄 I have made corresponding changes to the documentation
  • ✅ I have added tests that prove my fix is effective or my feature works

@jpggvilaca jpggvilaca added the UI label Aug 20, 2025
@jpggvilaca jpggvilaca changed the title Jvilaca/extract edit bounding box part 2 Extract edit bounding box (Part 2) Aug 20, 2025
updateAnnotation={(newAnnotation) => {
scene.updateAnnotation({
...newAnnotation,
shape: convertToolShapeToGetiShape(newAnnotation.shape),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼

camiloHimura
camiloHimura previously approved these changes Aug 21, 2025
Base automatically changed from jvilaca/extract-edit-bounding-box to main August 21, 2025 12:47
@jpggvilaca jpggvilaca dismissed camiloHimura’s stale review August 21, 2025 12:47

The base branch was changed.

@Copilot Copilot AI review requested due to automatic review settings August 21, 2025 14:00
@jpggvilaca jpggvilaca force-pushed the jvilaca/extract-edit-bounding-box-part-2 branch from 5a8e03e to 1fd6218 Compare August 21, 2025 14:00
Copy link
Contributor

@Copilot Copilot AI left a 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 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.

@jpggvilaca jpggvilaca force-pushed the jvilaca/extract-edit-bounding-box-part-2 branch from 7f5fe6b to b3d2733 Compare August 22, 2025 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants