Skip to content

FORMS-26424: Add Next Gen Dynamic Media (NGDM) image picker support (release/650) - #1984

Open
lovelymandal16 wants to merge 4 commits into
release/650from
dynamic-media-integration
Open

FORMS-26424: Add Next Gen Dynamic Media (NGDM) image picker support (release/650)#1984
lovelymandal16 wants to merge 4 commits into
release/650from
dynamic-media-integration

Conversation

@lovelymandal16

Copy link
Copy Markdown

Summary

  • Ports NGDM (Next Gen Dynamic Media) asset support to the Adaptive Form Image (v1) component, gated behind FT_FORMS-26424
  • When fileReference is an NGDM asset (/urn:aaid:aem:...) and NextGenDynamicMediaConfig is enabled, the delivery URL is built directly instead of resolving a DAM rendition
  • Adds enableNextGenDynamicMedia on the Image field's authoring dialog — this activates AEM's own platform Asset Selector (Pick ▾ → Local/Remote), no custom widget needed
  • Toggle-off behavior is unchanged: falls back to the existing file upload field
  • Fix found only on this branch during backport:
    • Add aem-sdk-api dependency to bundles/core and bundles/af-core — needed for NextGenDynamicMediaConfig, not previously a dependency on this branch

Testing

  • Unit tests: StaticImageImplTest, NgdmImageUtilsTest — all passing, coverage checks met
  • Live-verified on AEM 6.5.3 LTS SP3:
    • Toggle OFF: original Browse Assets/Upload UI, no regression
    • Toggle ON: Pick ▾ dropdown renders (Local + Remote), Remote opens NGDM Asset Selector, picked asset renders correctly in canvas
    • Bundle health confirmed (no unresolved/inactive bundles) after deploy

Screenshots

Will attach separately (working Pick dropdown, dialog with resolved NGDM image) — not embeddable via CLI.

Pankaj Parashar and others added 4 commits September 9, 2026 22:57
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>
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.

1 participant