feat(form-container): own fd:changeEventBehaviour via node property + feature toggle#1906
Open
rismehta wants to merge 2 commits into
Open
feat(form-container): own fd:changeEventBehaviour via node property + feature toggle#1906rismehta wants to merge 2 commits into
rismehta wants to merge 2 commits into
Conversation
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>
Accessibility Violations Found
|
3 similar comments
Accessibility Violations Found
|
Accessibility Violations Found
|
Accessibility Violations Found
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings
fd:changeEventBehaviourfully into the core component. Two related changes:1. Honor
fd:changeEventBehaviourset on the nodeAbstractFormComponentImpl.getCustomProperties()filters out everyfd:/jcr:/sling:prefixed node property, so a value set directly on the form container node never reachedmodel.json. Registered it inReservedPropertiesand added a dedicated@ValueMapValuegetter onFormContainerImpl.2. Drive the toggle-default from the core component (replaces cq-guides addon)
fd:changeEventBehaviour="deps"was injected by the cq-guidesCoreComponentCustomPropertiesProvider, which read the Granite toggleFT_FORMS-12053directly. The core component now supports feature toggles, so this moves in-tree:FormContainerImplsets it whenFT_ALLOW_MULTIPLE_FIELDS_IN_WHEN(FT_FORMS-12053) is enabled, read viaComponentUtils.isToggleEnabled(system property). The@OSGiService CoreComponentCustomPropertiesProviderreference is removed.Precedence: toggle provides the default; a value on the node overrides it.
Coordinated PRs (sequencing matters)
FT_FORMS-12053to a system property viaToggleMonitorSystemPropertyFactory, and bump af-core to this release (must ship with/before the cq-guides removal).CoreComponentCustomPropertiesProviderinterface, 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,testNodeChangeEventBehaviourOverridesToggleDefaulttestChangeEventBehaviourFromToggle,testChangeEventBehaviourAbsentWhenToggleDisabled63 v2
FormContainerImplTestcases pass.🤖 Generated with Claude Code