2026-03-20 Daily Log
Formula Builder Optimization & Refactoring
Achievements
- Consolidated Field Suggestion Logic: Refactored
RightPanelStaticComponent.updateFormulaFieldSuggestionsto unify the processing ofnumber,formula, anddatepickerfield types. This merge significantly reduced code redundancy and improved the maintainability of the logic responsible for generating formula tooltips and @mention suggestions. - Enhanced Type Resolution: Optimized the metadata mapping for datepicker fields and derived date formulas, ensuring the formula builder correctly identifies
fieldType: 'datepicker'for consistent validation and arithmetic guards. - Architectural Cleanup: Simplified self-reference guards by using a single UUID check for all relevant field types, eliminating redundant conditional blocks.
- Documentation Refinement: Repositioned deep technical comments in
FormulaBuilderComponentto provide better context for future maintenance.
Decisions
- Replaced multiple type-specific checks with a single iteration block for all numeric/date compatible fields.
- Decided to explicitly assign
fieldType: 'datepicker'for both native datepicker components and rule-based formulas that resolve to a date, ensuring chained formula inference remains robust. - Standardized self-reference skipping using
el.uuid !== this.selectedItem?.uuid.
Files Modified
src/ifile-teapot-web-dynaforms/components/dynaform-builder/right-panel-static/right-panel-static.component.tssrc/ifile-teapot-web-dynaforms/components/dynaform-builder/formula-builder/formula-builder.component.tsdocs/dynaforms-history.md(Updated with technical context)