Skip to content

Conversation

@piyushryn
Copy link

Adds

  • Features like trim , color-replace , border & sharpen to base image
  • and trim adjustment , border & sharpen to layers

@piyushryn piyushryn requested a review from Copilot January 27, 2026 11:21
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 image enhancement features to both base images and layers, including trim, color replace, border, and sharpen transformations.

Changes:

  • Added four new adjustment transformations for base images: Border, Trim, Color Replace, and Sharpen
  • Extended layer transformations with trim threshold, border, and sharpen capabilities
  • Enhanced ColorPickerField component to accept and apply fieldProps configuration

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
packages/imagekit-editor-dev/src/schema/index.ts Added schema definitions for new transformations (border, trim, color-replace, sharpen) and updated layer transformation handling
packages/imagekit-editor-dev/src/components/sidebar/transformation-config-sidebar.tsx Added fieldProps prop to ColorPickerField component
packages/imagekit-editor-dev/src/components/common/ColorPickerField.tsx Updated to accept and spread fieldProps into the ColorPicker component

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

{
key: "ai",
name: "AI Transformations",
items: [{
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

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

Inconsistent formatting: the opening bracket should be on a new line to match the formatting pattern used elsewhere in this array (see line 1578 and others).

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

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

@copilot open a new pull request to apply changes based on this feedback

overlayTransform.sharpen = values.sharpen
}
}
if ((values.borderWidth && typeof values.borderWidth === "number" && values.borderWidth > 0) && (values.borderColor && typeof values.borderColor === "string")) {
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

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

Excessive nested parentheses reduce readability. Consider extracting conditions into named boolean variables or simplifying the expression structure.

Suggested change
if ((values.borderWidth && typeof values.borderWidth === "number" && values.borderWidth > 0) && (values.borderColor && typeof values.borderColor === "string")) {
const hasValidBorderWidth =
typeof values.borderWidth === "number" && values.borderWidth > 0
const hasValidBorderColor =
typeof values.borderColor === "string" && values.borderColor.length > 0
if (hasValidBorderWidth && hasValidBorderColor) {

Copilot uses AI. Check for mistakes.
piyushryn and others added 2 commits January 27, 2026 16:54
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link

Copilot AI commented Jan 27, 2026

@piyushryn I've opened a new pull request, #7, to work on those changes. Once the pull request is ready, I'll request review from you.

piyushryn and others added 3 commits January 27, 2026 16:55
…Field.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: piyushryn <105715267+piyushryn@users.noreply.github.com>
Fix inconsistent array formatting in AI transformations schema
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