-
Notifications
You must be signed in to change notification settings - Fork 0
IK-2396 feat: add object detection focus options and coordinate-based positioning for image transformations #2
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
…ning for image transformations
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 adds object detection focus options and coordinate-based positioning capabilities for image transformations in the ImageKit editor. It enhances the focus system with predefined object lists, custom coordinate positioning, and improved validation.
- Added
DEFAULT_FOCUS_OBJECTSconstant with 80+ predefined objects for focus detection - Introduced coordinate-based positioning with x/y and xc/yc parameters for precise focus control
- Enhanced validation for focus modes including object detection and coordinate requirements
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/imagekit-editor-dev/src/store.ts | Added focusObjects state and initialization support |
| packages/imagekit-editor-dev/src/schema/index.ts | Added focus objects list, coordinate fields, and enhanced validation |
| packages/imagekit-editor-dev/src/index.tsx | Exported DEFAULT_FOCUS_OBJECTS constant |
| packages/imagekit-editor-dev/src/components/sidebar/transformation-config-sidebar.tsx | Updated UI to support focus objects selection with proper formatting |
| packages/imagekit-editor-dev/src/ImageKitEditor.tsx | Added focusObjects prop to editor interface |
| examples/react-example/src/index.tsx | Added example image for testing |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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
Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.
Comments suppressed due to low confidence (1)
packages/imagekit-editor-dev/src/schema/index.ts:1
- [nitpick] Errors use an empty path [], which makes it harder to associate them with specific inputs. Consider setting path to ['x'] or ['y'] (or ['xc']/['yc']) depending on which group is missing to improve form-level error mapping.
import type { Transformation } from "@imagekit/javascript"
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Internal Ticket: IK-2396