fix(MWPW-190444): remove 512x512 minimum dimension restriction from Firefly upload config#749
Closed
fix(MWPW-190444): remove 512x512 minimum dimension restriction from Firefly upload config#749
Conversation
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
Commits
|
Collaborator
Author
|
Closing in replacement of #750. |
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
Fixes MWPW-190444 — removes the 512×512 minimum image dimension restriction from Firefly upload flows.
The 512×512 minimum was a product-specified requirement that has since been lifted. The restriction was enforced on the primary upload path but was never applied to the Edit flow (reference image upload from device), causing an inconsistency. Removing the config entries resolves both issues simultaneously: the primary upload no longer blocks small images, and the Edit flow inconsistency is moot.
Root Cause
The 512×512 minimum dimension was hardcoded in
target-config.jsonunderlimits-fireflyasminHeight: 512andminWidth: 512. This config is merged intothis.limitsinaction-binder.jsat construction time and evaluated incheckImageDimensions(). BecauseisMinLimitsis only truthy when bothminWidthandminHeightare present, removing these keys from the config causes the minimum-dimension check block to become a no-op with no JS changes required.The Edit flow (reference image upload via the prompt-bar widget) bypassed
uploadImage()entirely and therefore never calledcheckImageDimensions(), which is why the inconsistency existed. Both paths now behave identically: no minimum dimension is enforced.Changes
File:
unitylibs/core/workflow/workflow-upload/target-config.jsonminHeight: 512fromlimits-fireflyminWidth: 512fromlimits-fireflymaxFileSize,allowedFileTypes) are unchangedlimits-photoshop,limits-lightroom) are completely unaffectedNo JavaScript changes are required.
Verification
minHeight/minWidthonly exist intarget-config.jsonin this repo (no other JS files hardcode these values)fallback.jsreference tominHeightis a CSS property on a browser-compatibility banner — unrelatedTesting
maxFileSize(100MB) are still correctly rejected on both pathsJira
MWPW-190444