Skip to content

feat(form): add image field with Upload and AEM Assets - #800

Draft
holtvogt wants to merge 12 commits into
adobe:mainfrom
holtvogt:feat-sc-asset-picker
Draft

holtvogt wants to merge 12 commits into
adobe:mainfrom
holtvogt:feat-sc-asset-picker

Conversation

@holtvogt

@holtvogt holtvogt commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Depends on #799 and the release of adobe/da-sc-sdk#18. Until #799 merges, the SDK is released and the bundle is rebuilt, this PR stays a draft.

What

Adds an image field to the Structured Content editor. Schema properties with "x-semantic-type": "media" render as an image field instead of a text input. Authors can upload an image, pick one from AEM Assets, replace it, or remove it after a confirmation. The document stores a single URL string.

AEM Assets appears only when the site config has aem.repositoryId. It opens Adobe's hosted Asset Selector in a modal dialog and loads its code only when chosen. Rejected assets, failed uploads, and cancel all keep the previous value and show errors inline.

The SDK bundle in nx/deps/da-sc-sdk is hand-patched to expose the media semantic type from adobe/da-sc-sdk#18. It will be rebuilt with npm run build:da-sc-sdk after the SDK release.

Why

Structured content often needs images, and authors should not have to paste URLs by hand. The field follows the Spectrum style of the other form fields and reuses what DA already offers. Uploads use the existing source.uploadMedia API. AEM Assets uses the shared module from #799, so the stored URL matches what canvas inserts.

Not included

  • No Smart Crop step. Smart Crop sites store the original URL.
  • No alt text prefill from AEM metadata. Alt text stays a separate schema field.

holtvogt and others added 11 commits October 1, 2026 17:34
Move da-live's non-UI AEM Assets logic into Nexter so canvas, the
classic editor, and the SC editor share one implementation. It covers
repository config, URL building, a selection resolver with approval
and publish checks, and a memoized loader for Adobe's hosted selector.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Require confirmation before clearing an image field. Keep the asset
file untouched, remove the obsolete Undo toast, and restore focus
after Cancel or Remove.

Align the Replace button hover surface with its rounded shape.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Render string fields with the media semantic type as an image field.
The stored URL stays unchanged.

Offer Upload on every site and AEM Assets only when the site config
names a repository and the host provides a picker. Log into the DA
preview and content origins so private images preview.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Open Adobe's hosted AEM Assets selector from the image field when the
site configures aem.repositoryId. The shared resolver turns the pick
into the same URL canvas inserts, and errors keep the previous value.
The selector code loads only when the user picks AEM Assets.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add the media semantic type from da-sc-sdk#18 to the bundled SDK so
image fields render. The bundle is hand-patched and does not match
the 0.5.0 dependency yet. Rebuild it with npm run build:da-sc-sdk
after the SDK release and the version bump.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The preview area painted a decorative gradient that flashed while an
uploaded image loaded and showed through transparent pixels. Use a
neutral surface, reveal the image once it has loaded, and draw the
canvas transparency checkerboard behind it.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

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.

1 participant