MD.OFFICE
FAL

Daily Log - 2026-04-28

Dynaforms: Dependent Fields (Configurator UX & MVP Runtime)

Achievements

  • Builder Dependency Configurator: Shipped a standalone dependencyConfigurator component within the right panel, allowing form designers to visually author rules, operators, priorities, and mapped effects completely separately from the legacy formula rules UI.
  • UX Alignment: Refactored the dependency configurator into a native accordion layout using small icon buttons (pi-plus, pi-trash) to guarantee visual parity with the existing system's rule building experience.
  • Dynamic Controller Discovery: Configured the dependency field-picker to recursively scan the canvas and present clean, container-free path strings (e.g. Section > Tab > Field) for accurate controller selection.
  • Renderer Integration (Visibility + Required): Activated the evaluateAndApply() runtime pipeline in the renderer, natively binding setVisibility (with automatic clearOnHide propagation) and setRequired effects natively to root elements and parent containers without polluting stored JSON schemas.

Decisions

  • One-Pass Compilation: Opted to compute indexes (controllerIndex, targetIndex, baseRequiredMap) solely once upon initialization to bypass full recursive schema traversal on every user keystroke.
  • Single-Source Rule Precedence: Allowed dependency precedence to execute purely in sequential stored order, letting the first matching rule determine behavior without requiring complex tie-breaker algorithms.
  • Control Cache Implementation: Cached DOM targets in a controlMap upfront to avoid extremely expensive repeated findControl scans during reactive field updates.

Technical Details

  • Added: dependency-configurator.component.ts/html/scss -> Core UI for designing dependencies.
  • Modified: right-panel-static.config.ts -> Added option catalogs (DEPENDENCY_OPERATORS, DEPENDENCY_EFFECT_OPTIONS).
  • Modified: right-panel-static.component.ts -> Hooked rename actions (onLabelBlur) to trigger deep controller reference updates.
  • Modified: Parent/Core level renderers (form-renderer-root.component.html, section-field, etc.) -> Embedded hidden guards directly binding to the engine's visibilityMap.