Skip to content

Conversation

@ahnv
Copy link
Member

@ahnv ahnv commented Oct 14, 2025

Internal Ticket: IK-2396

@ahnv ahnv requested review from Copilot and hrhv October 14, 2025 10:31
Copy link

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 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_OBJECTS constant 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.

@ahnv ahnv requested a review from Copilot October 17, 2025 13:51
Copy link

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

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.

@ahnv ahnv changed the title feat: add object detection focus options and coordinate-based positioning for image transformations IK-2396 feat: add object detection focus options and coordinate-based positioning for image transformations Oct 23, 2025
@ahnv ahnv merged commit d388f7d into main Oct 23, 2025
2 checks passed
@ahnv ahnv deleted the IK-2396 branch October 23, 2025 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants