Skip to content

feat(form-container): own fd:changeEventBehaviour via node property + feature toggle#1906

Open
rismehta wants to merge 2 commits into
devfrom
feature/changeEventBehaviour-node-prop
Open

feat(form-container): own fd:changeEventBehaviour via node property + feature toggle#1906
rismehta wants to merge 2 commits into
devfrom
feature/changeEventBehaviour-node-prop

Conversation

@rismehta

@rismehta rismehta commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

Brings fd:changeEventBehaviour fully into the core component. Two related changes:

1. Honor fd:changeEventBehaviour set on the node

AbstractFormComponentImpl.getCustomProperties() filters out every fd:/jcr:/sling: prefixed node property, so a value set directly on the form container node never reached model.json. Registered it in ReservedProperties and added a dedicated @ValueMapValue getter on FormContainerImpl.

2. Drive the toggle-default from the core component (replaces cq-guides addon)

fd:changeEventBehaviour="deps" was injected by the cq-guides CoreComponentCustomPropertiesProvider, which read the Granite toggle FT_FORMS-12053 directly. The core component now supports feature toggles, so this moves in-tree: FormContainerImpl sets it when FT_ALLOW_MULTIPLE_FIELDS_IN_WHEN (FT_FORMS-12053) is enabled, read via ComponentUtils.isToggleEnabled (system property). The @OSGiService CoreComponentCustomPropertiesProvider reference is removed.

Precedence: toggle provides the default; a value on the node overrides it.

Coordinated PRs (sequencing matters)

  • aemds: bridge Granite toggle FT_FORMS-12053 to a system property via ToggleMonitorSystemPropertyFactory, and bump af-core to this release (must ship with/before the cq-guides removal).
  • cq-guides: remove the now-unused CoreComponentCustomPropertiesProvider interface, impl and test.

No-regression note: during transition both the old provider and this code may emit the same "deps" value (idempotent). The only unsafe order is removing the cq-guides provider before the aemds system-property bridge exists.

Tests

  • testGetChangeEventBehaviourFromNode, testNodeChangeEventBehaviourOverridesToggleDefault
  • testChangeEventBehaviourFromToggle, testChangeEventBehaviourAbsentWhenToggleDisabled

63 v2 FormContainerImplTest cases pass.

🤖 Generated with Claude Code

rismehta and others added 2 commits June 17, 2026 19:33
fd:changeEventBehaviour was only surfaced when supplied by the
CoreComponentCustomPropertiesProvider. When set directly on the form
container node it was dropped, because getCustomProperties() filters out
every property with an "fd:"/"jcr:"/"sling:" prefix.

Register fd:changeEventBehaviour in ReservedProperties and read it via a
dedicated @ValueMapValue on FormContainerImpl, emitting it after the
provider merge so a node value overrides the provider value (consistent
with how other node-level custom properties take precedence). Adding it to
ReservedProperties alone is not sufficient — that registry only prevents
generic re-dumping; emission still requires an explicit getter + put.

Add tests for the node-only path and for node-overrides-provider.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…toggle

Move the fd:changeEventBehaviour="deps" injection out of the cq-guides
CoreComponentCustomPropertiesProvider addon and into the core component.
FormContainerImpl now sets it directly when FT_ALLOW_MULTIPLE_FIELDS_IN_WHEN
(FT_FORMS-12053) is enabled, read via ComponentUtils.isToggleEnabled (system
property), matching the other core feature toggles. The @OSGiService
CoreComponentCustomPropertiesProvider reference is removed.

A value set on the node still overrides the toggle-driven default.

Requires: the Granite toggle FT_FORMS-12053 to be bridged to a system property
via ToggleMonitorSystemPropertyFactory in the aemds feature model (separate PR),
and removal of the now-unused provider from cq-guides (separate PR).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rismehta rismehta changed the title fix(form-container): emit fd:changeEventBehaviour set on the node feat(form-container): own fd:changeEventBehaviour via node property + feature toggle Jun 17, 2026
@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

3 similar comments
@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
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
target-size serious

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