Add Next Gen Dynamic Media (NGDM) support to the StaticImage component - #1989
Open
lovelymandal16 wants to merge 4 commits into
Open
lovelymandal16 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
…sing Addresses outstanding review feedback from rismehta on PR #1965: - NgdmImageUtils was sitting under internal.models.v1.form; move it to internal.form alongside FeatureToggleConstants, since it's a shared helper, not a component model - Replace manual indexOf/substring parsing with StringUtils.substringBefore/After(Last) in isNgdmImageReference() and buildNgdmImageSrc() Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
10 tasks
Accessibility Violations Found
|
Accessibility Violations Found
|
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.
Summary
StaticImagecomponent, resolving/urn:aaid:aem:...references to NGDM delivery URLsFT_FORMS-26424JVM system-property toggle, matching the equivalent implementation inaem-core-forms-components(FORMS-26424-Add Next Gen Dynamic Media (NGDM) support to the StaticImage component #1965) andaemds-guide-corerismehtaon FORMS-26424-Add Next Gen Dynamic Media (NGDM) support to the StaticImage component #1965:NgdmImageUtilsmoved out ofinternal.models.v1.formintointernal.form(alongsideFeatureToggleConstants), and manual substring parsing replaced withStringUtils.substringBefore/After(Last)Test plan
NgdmImageUtilsTest(11 tests) andStaticImageImplTest(24 tests) passmvn clean verifypasses, including code-formatting validation-DFT_FORMS-26424=true: NGDM image picker renders and resolves delivery URLs correctly in the Image component's authoring dialog🤖 Generated with Claude Code