Repository navigation
fix: restore initial crop selection for uploaded signatures - #9528
Open
vitormattos wants to merge 5 commits into
Open
vitormattos wants to merge 5 commits into
vitormattos wants to merge 5 commits into
Conversation
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
vitormattos
marked this pull request as ready for review
November 17, 2026 12:51
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
This branch has not been deployed
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.
Closes #9526
Root cause
FileUpload.vuepassed a fixed-sizedefaultSizeobject derived from the display container tovue-advanced-cropper. The cropper interprets it in source-image coordinates rather than CSS pixels, causing a tiny initial stencil with high-resolution uploads.Fix
signature-width / signature-height), the PNG result and existing zoom controls.ResizeObserver, container-width sizing code and stale assertions.Verified red → green regression
Before the fix —
2d02d914d8d707fa2573e5a5e68587b002dd78ec:defaultSize = {width: 700, height: 200}. Expected: no fixeddefaultSize.After the fix —
5683304f1b61f4cf4581cfee98ff2da8df77e109:PHP image quality and scope
SignatureBackgroundService::scaleDimensions()already preserves smaller stamp-background images and proportionally downsizes images larger than 3× the configured full stamp dimensions;SignatureBackgroundServiceTestcovers both cases. This is the stamp background, not the user's cropped signature. The latter is validated as PNG (including a 5 MiB size limit) inFileInputValidatorand stored bySignerElementsService. The signing engine controls final PDF rendering.No PHP image processing, resolution rules or file validation are changed by this PR.
Validation limitation
The regression checks the Vue component's integration contract with the cropper and the preserved aspect ratio. It does not assert actual CSS-frame measurements in a real browser using a 3000×1200 image; those measurements were supplied in the original issue report.
Both commits were made with signed DCO trailers.
Follow-up from code review (2026-11-18)
The original change fixes the initial stencil, but a high-entropy 3000 px image can now export a PNG larger than the backend's 5000 KiB visible-element limit.
b5bb0d2, NPM lint failed on@stylistic/multiline-ternaryatFileUpload.vue:218,220, while the Node tests passed. Both ESLint formatting errors were addressed in 4c2cc7d, a signed DCO commit without a logic change. The new CI for this head is running; it must finish before merge.