feat: add image transformations, cropping, and color adjustments#154
Open
PatrykC01 wants to merge 2 commits into
Open
feat: add image transformations, cropping, and color adjustments#154PatrykC01 wants to merge 2 commits into
PatrykC01 wants to merge 2 commits into
Conversation
TheMultii
requested changes
Jun 15, 2026
| canvas.height === sourceHeight | ||
| ) { | ||
| toast.info( | ||
| `DPI: skala ${scaleText}x, ` + |
Collaborator
There was a problem hiding this comment.
hardcoded pl. use i18next
| } | ||
|
|
||
| toast.success( | ||
| `DPI: skala ${scaleText}x, ` + |
Collaborator
There was a problem hiding this comment.
hardcoded pl. use i18next
| ) { | ||
| toast.info( | ||
| `DPI: skala ${scaleText}x, ` + | ||
| `rozmiar bez zmian (${canvas.width} x ` + |
Collaborator
There was a problem hiding this comment.
hardcoded pl. use i18next
Comment on lines
+196
to
+207
| const brightnessModifier = [...modifiers] | ||
| .reverse() | ||
| .find( | ||
| (mod): mod is BrightnessModifier => | ||
| mod.enabled && mod.type === "brightness" | ||
| ); | ||
| const contrastModifier = [...modifiers] | ||
| .reverse() | ||
| .find( | ||
| (mod): mod is ContrastModifier => | ||
| mod.enabled && mod.type === "contrast" | ||
| ); |
Collaborator
There was a problem hiding this comment.
Duplicate modifiers are silently dropped
| const ctx = maskCvs.getContext("2d"); | ||
| ctx?.clearRect(0, 0, maskCvs.width, maskCvs.height); | ||
| onChange({ _maskCanvas: maskCvs }); | ||
| onChange({ _maskCanvas: maskCvs, maskDataUrl: null }); |
Collaborator
There was a problem hiding this comment.
am i wrong or is maskDataUrl always null?
| import { ModifierSettingsDialog } from "@/components/edit-window/modifiers/ModifierSettingsDialog"; | ||
|
|
||
| const CANVAS_CONTEXT_UNAVAILABLE = "Canvas context unavailable"; | ||
| const FAILED_TO_SAVE_IMAGE_KEY = "Failed to save image: {{error}}"; |
Collaborator
There was a problem hiding this comment.
A failed rotation/crop is not a save failure - use operation-specific keys
|
|
||
| <div className="space-y-1"> | ||
| <span className="block text-sm font-medium"> | ||
| Reference length (mm) |
| setModifiers(prev => [...prev, newMod]); | ||
| // Automatically open edit dialog for the new modifier | ||
| setEditingModifierId(newMod.id); | ||
| setTimeout(() => setEditingModifierId(newMod.id), 50); |
Collaborator
There was a problem hiding this comment.
This looks like a race workaround
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan