FORMS-26424: Add Next Gen Dynamic Media (NGDM) image picker support (release/650) - #1984
Open
lovelymandal16 wants to merge 4 commits into
Open
FORMS-26424: Add Next Gen Dynamic Media (NGDM) image picker support (release/650)#1984lovelymandal16 wants to merge 4 commits into
lovelymandal16 wants to merge 4 commits into
Conversation
Ports the NGDM asset support from adobe/aem-core-wcm-components#2481 to the Adaptive Forms StaticImage (form/image v1) component. When the fileReference is an NGDM asset (/urn:...) and the NextGenDynamicMediaConfig OSGi service is enabled, the delivery URL is built directly instead of resolving a DAM rendition. Bumps aem-sdk-api to 2023.9.13665 to pick up the NextGenDynamicMediaConfig API, and enables the NGDM asset picker on the component's file upload dialog field. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Extract Next Gen Dynamic Media (NGDM) URL-resolution logic out of StaticImageImpl into a shared NgdmImageUtils class - Add a Sling Model JSON-exporter test proving the resolved NGDM delivery URL is exposed as "value" and fd:repoPath is correctly absent - Fix multi-dot seo-name filenames (e.g. "product.hero.png") resolving to the wrong delivery URL/extension by splitting on the last dot, not the first - Tighten isNgdmImageReference() to require a non-empty asset-id and seo-name segment, avoiding a NoSuchElementException on malformed references - Mark com.adobe.cq.ui.wcm.commons.config as an optional OSGi import so the bundle still resolves on installations without this Cloud Service API
- Add FT_NGDM_IMAGE_PICKER (FT_FORMS-26424) constant, following the existing FeatureToggleConstants pattern - Split the Image dialog's file widget into two mutually-exclusive variants gated by granite:rendercondition/featuretoggle: NGDM picker enabled shows the Pick (Local/Remote) UI, disabled shows the original Browse Assets/Upload UI - Gate StaticImageImpl's NGDM URL resolution and fd:repoPath exclusion behind the same toggle via ComponentUtils.isToggleEnabled(), so a saved NGDM reference is treated as a plain fileReference when the toggle is off - Add toggle-enabled/disabled test coverage, following the same System.setProperty/@AfterEach pattern already used in FragmentImplTest
- Add aem-sdk-api dependency to bundles/af-core, needed for NextGenDynamicMediaConfig (bundles/core already had it from the cherry-picked commits' conflict resolution, but af-core needed its own declaration too) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
FT_FORMS-26424fileReferenceis an NGDM asset (/urn:aaid:aem:...) andNextGenDynamicMediaConfigis enabled, the delivery URL is built directly instead of resolving a DAM renditionenableNextGenDynamicMediaon the Image field's authoring dialog — this activates AEM's own platform Asset Selector (Pick ▾ → Local/Remote), no custom widget neededaem-sdk-apidependency tobundles/coreandbundles/af-core— needed forNextGenDynamicMediaConfig, not previously a dependency on this branchTesting
StaticImageImplTest,NgdmImageUtilsTest— all passing, coverage checks metScreenshots
Will attach separately (working Pick dropdown, dialog with resolved NGDM image) — not embeddable via CLI.