-
Notifications
You must be signed in to change notification settings - Fork 1
Piyush/enhancements #6
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
base: main
Are you sure you want to change the base?
Conversation
…ma with validation and integration
… with enhanced validation and default values
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 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: [{ |
Copilot
AI
Jan 27, 2026
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.
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).
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.
@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")) { |
Copilot
AI
Jan 27, 2026
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.
Excessive nested parentheses reduce readability. Consider extracting conditions into named boolean variables or simplifying the expression structure.
| 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) { |
packages/imagekit-editor-dev/src/components/common/ColorPickerField.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@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. |
…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
Adds
trim,color-replace,border&sharpento base imagetrimadjustment ,border&sharpento layers