ADO-fix (MWPW-190444): remove 512x512 minimum dimension restriction for Firefly uploads#750
ADO-fix (MWPW-190444): remove 512x512 minimum dimension restriction for Firefly uploads#750dstrong23 wants to merge 12 commits into
Conversation
…alytics dashboard. (#740) **Issue Fix Descriptions** : Explained in the comments **Testing Notes:** Refer to [wiki](https://wiki.corp.adobe.com/spaces/adobedotcom/pages/3835093951/PR+Testing+Notes+%E2%80%94+Analytics+Upload+Reliability+Fixes) Resolves: [MWPW-192702](https://jira.corp.adobe.com/browse/MWPW-192702) **Test URLs:** Before: https://main--cc--adobecom.aem.page/products/firefly/features/remove-object-from-photo?unitylibs=stage After: https://main--cc--adobecom.aem.page/products/firefly/features/remove-object-from-photo?unitylibs=analyticsIssues --------- Co-authored-by: Arushi Gupta <arugupta@Arushis-MacBook-Pro.local>
Resolves: [MWPW-189974](https://jira.corp.adobe.com/browse/MWPW-189974) [MWPW-189488](https://jira.corp.adobe.com/browse/MWPW-189488) **Test URLs:** - Before: https://main--cc--adobecom.aem.page/products/firefly/features/remove-object-from-photo?unitylibs=stage - After: https://main--cc--adobecom.aem.page/products/firefly/features/remove-object-from-photo?unitylibs=bugfixesv2 --------- Co-authored-by: Arushi Gupta <arugupta@Arushis-MacBook-Pro.local>
* Implementing fetch request to page config API post-LCP * Scalable and backwards-compatible approach to fetch experiment data and leverage location header for successive API calls Resolves: [MWPW-191927](https://jira.corp.adobe.com/browse/MWPW-191927) **Test URLs:** - Before: https://main--dc--adobecom.aem.page/acrobat/online/compress-pdf?unitylibs=stage - After: https://main--dc--adobecom.aem.page/acrobat/online/compress-pdf?unitylibs=MWPW-191927
Testing Notes: 1. Regress all the upload workflow acros products 2. Test the limits for each product Resolves: [MWPW-193670](https://jira.corp.adobe.com/browse/MWPW-193670) **Test URLs:** - Before: https://main--da-cc--adobecom.aem.page/drafts/arugupta/image-to-video/doodlebug/image-to-video?unitylibs=stage - After: https://main--da-cc--adobecom.aem.page/drafts/arugupta/image-to-video/doodlebug/image-to-video?unitylibs=wave2-video --------- Co-authored-by: Arushi Gupta <arugupta@Arushis-MacBook-Pro.local> Co-authored-by: Vipul Gupta <vipugpta@gmail.com> Co-authored-by: vipulg <vipulg@adobe.com>
…754) * Enable milolibs/unitylibs query params on stage URLs Resolves: [MWPW-191633](https://jira.corp.adobe.com/browse/MWPW-191633) **Test URLs:** - Before: https://main--cc--adobecom.aem.live/?martech=off - After: https://MWPW-191633-support-milolibs-stage--cc--adobecom.aem.live/?martech=off > Note that this has a supporting PR in `adobecom/da-cc` as well at adobecom/da-cc#45 **Dev validation:** (using browser overrides) URL 1: https://www.stage.adobe.com/products/firefly/features/remove-person-from-photo.html?milolibs=ratko-test&unitylibs=doodlebug-v152-2 URLs by domain: [ff-doodlebug_milolibs_unitylibs_js_urls.md](https://github.com/user-attachments/files/27097349/ff-doodlebug_milolibs_unitylibs_js_urls.md) URL 2: https://www.stage.adobe.com/creativecloud/plans.html?milolibs=ratko-test&unitylibs=doodlebug-v152-2 URLs by domain: [plans_milolibs_js_urls.md](https://github.com/user-attachments/files/27097352/plans_milolibs_js_urls.md) URL 3: https://www.stage.adobe.com/products/firefly/features/remove-person-from-photo.html?milolibs=ratko-test URLs by domain: [doodlebug_milolibs_js_urls.md](https://github.com/user-attachments/files/27097356/doodlebug_milolibs_js_urls.md) URL 4: https://www.stage.adobe.com/products/firefly/features/remove-person-from-photo.html?unitylibs=doodlebug-v152-2 URLs by domain: [doodlebug_unitylibs_js_urls.md](https://github.com/user-attachments/files/27097358/doodlebug_unitylibs_js_urls.md)
|
Verified main upload flow and Edit flow. All looks fine. All error toasts are working fine. |
Resolves: [MWPW-194052](https://jira.corp.adobe.com/browse/MWPW-194052) [MWPW-193773](https://jira.corp.adobe.com/browse/MWPW-193773) [MWPW-193716](https://jira.corp.adobe.com/browse/MWPW-193716) [MWPW-194279](https://jira.corp.adobe.com/browse/MWPW-194279) [MWPW-194149](https://jira.corp.adobe.com/browse/MWPW-194149) **Test URLs:** - Before: https://main--da-cc--adobecom.aem.page/drafts/arugupta/image-to-video/doodlebug/image-to-video?unitylibs=stage - After: https://main--da-cc--adobecom.aem.page/drafts/arugupta/image-to-video/doodlebug/image-to-video?unitylibs=wave2vid-followup --------- Co-authored-by: Arushi Gupta <arugupta@Arushis-MacBook-Pro.local>
| "limits-firefly": { | ||
| "allowedFileTypes": ["image/jpeg", "image/png", "image/jpg", "image/webp"], | ||
| "maxFileSize": 100000000, | ||
| "minHeight": 512, |
There was a problem hiding this comment.
This alone will not help remove this file dimensions check completely.
As per the code, We still proceed for extracting the file dimensions first, and then if we don't find the minWidth/minHeight in target config, only then we skip and proceed further. Just in case we error out while finding the dimensions we fail even if no limits are mentioned in target config.
We should simply remove the check at the first place where we are calling this, cleanup the code, alongside removing the limits from the targetconfig.json.
@dstrong23 @sanjayms01
There was a problem hiding this comment.
@vipu0303 That's a good point. I see you have another PR to take up that change. Is that correct?
Resolves: MWPW-190444
Test URLs:
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.json under limits-firefly as minHeight: 512 and minWidth: 512. This config is merged into this.limits in action-binder.js at construction time and evaluated in checkImageDimensions(). Because isMinLimits is only truthy when both minWidth and minHeight are 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 called checkImageDimensions(), 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.json
Removed minHeight: 512 from limits-firefly
Removed minWidth: 512 from limits-firefly
All other limits (maxFileSize, allowedFileTypes) are unchanged
Photoshop and Lightroom limits (limits-photoshop, limits-lightroom) are completely unaffected
No JavaScript changes are required.
Verification
Confirmed minHeight/minWidth only exist in target-config.json in this repo (no other JS files hardcode these values)
Confirmed fallback.js reference to minHeight is a CSS property on a browser-compatibility banner — unrelated
Confirmed no API endpoint dynamically supplies dimension limits — this config is the single source of truth
Testing
Verify images smaller than 512×512 can be uploaded via the main upload flow on Firefly/Doodlebug pages
Verify images smaller than 512×512 can be uploaded via the Edit flow (reference image from device)
Verify images above maxFileSize (100MB) are still correctly rejected on both paths
Verify allowed file types (JPEG, PNG, WEBP) validation is still enforced
Verify Photoshop and Lightroom upload validation is unaffected
Jira
MWPW-190444