Skip to content

[content] Local dev (aem up) doesn't process section-metadata blocks for DA content #2756

Description

@shsteimer

Is your feature request related to a problem? Please describe.

aem-lib#213 removed client-side section-metadata handling; it's now handled server-side in helix-html-pipeline (extract-section-metadata.js, adobe/helix-html-pipeline#1059), gated by features.rendering.version. helix-cli has no equivalent, so aem up shows a raw, un-decorated div.section-metadata block when previewing DA content locally instead of the styled section it renders as in production.

Describe the solution you'd like

Add a serve-time transform in HelixServer.js: div.section-metadata → classes (from style) + data-* attributes on the parent section, block removed. Apply this unconditionally, without mirroring the features.rendering.version flag: not every developer has read access to site config, and the visual result is the same either way (pre-#213 client-side decorateSections and the new server step compute equivalent output from the same block). adobe/da-live#971 backs this up: DA's own live preview/Quick Edit/Experience Workspace now processes section-metadata in prose2aem.js unconditionally too, with no gate.

Prefer reusing @adobe/helix-html-pipeline's src/steps/extract-section-metadata.js directly rather than hand-porting the logic. Not part of the package's public API, so this is an internal import.

Describe alternatives you've considered

da-admin/pre-push processing: rejected to keep content/ a lossless mirror of DA storage.
Fetching site config to mirror the flag exactly: rejected, since not every developer has read access to it.

Related: #2755 (same gap for icons).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions