Skip to content

Add Next Gen Dynamic Media (NGDM) support to the StaticImage component - #1989

Open
lovelymandal16 wants to merge 4 commits into
devfrom
dynamic-media-integration-dev
Open

lovelymandal16 wants to merge 4 commits into
devfrom
dynamic-media-integration-dev

Conversation

@lovelymandal16

Copy link
Copy Markdown

Summary

Test plan

  • NgdmImageUtilsTest (11 tests) and StaticImageImplTest (24 tests) pass
  • mvn clean verify passes, including code-formatting validation
  • Manually verified in a local AEM Cloud SDK instance with -DFT_FORMS-26424=true: NGDM image picker renders and resolves delivery URLs correctly in the Image component's authoring dialog

🤖 Generated with Claude Code

Pankaj Parashar and others added 4 commits September 23, 2026 11:53
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>
@adobe-bot

Copy link
Copy Markdown

Accessibility Violations Found

Id Impact
aria-required-attr critical
empty-heading minor
label-title-only serious
target-size serious

@adobe-bot

Copy link
Copy Markdown

Accessibility Violations Found

Id Impact
aria-required-attr critical
empty-heading minor
label-title-only serious
page-has-heading-one moderate
target-size serious

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants