Is your feature request related to a problem? Please describe.
The current Neo.mergeConfig method treats all objects as generic JavaScript objects, lacking the ability to perform intelligent, class-aware merging for nested configurations that represent instantiable Neo.mjs classes (i.e., objects containing className, module, or ntype properties). This limitation means that when a subclass provides a configuration for a nested component that extends a component defined in a superclass, the merging process may not correctly respect the inheritance hierarchy, leading to suboptimal or unexpected results (e.g., a simple replacement instead of a deep, inheritance-aware merge).
Describe the solution you'd like
The proposed solution involves implementing a more advanced mergeConfig logic within a dedicated manager (e.g., Neo.manager.ClassHierarchy or a new Neo.manager.Config). This advanced implementation will leverage Neo.manager.ClassHierarchy's isA method to understand the inheritance relationships between classes represented by nested config objects. Once this manager is instantiated and ready (early in the framework's bootstrap process), it will dynamically replace the existing Neo.mergeConfig method with its own, more powerful version. This ensures that all subsequent config processing benefits from intelligent, class-aware merging, allowing for proper inheritance-based merging of nested component configurations.
Describe alternatives you've considered
Attempting to implement this complex class-aware merging directly within the static Neo.mergeConfig method would introduce significant coupling and complexity into the core Neo module. Centralizing this logic within a manager that has access to the class hierarchy provides a cleaner, more maintainable, and extensible solution.
Additional context
This enhancement is a crucial architectural step towards a more robust and intuitive config system, particularly for applications with deep component hierarchies and extensive use of inheritance. It will significantly improve the predictability and correctness of how nested component configurations are merged across the class chain.
Is your feature request related to a problem? Please describe. The current
Neo.mergeConfigmethod treats all objects as generic JavaScript objects, lacking the ability to perform intelligent, class-aware merging for nested configurations that represent instantiable Neo.mjs classes (i.e., objects containingclassName,module, orntypeproperties). This limitation means that when a subclass provides a configuration for a nested component that extends a component defined in a superclass, the merging process may not correctly respect the inheritance hierarchy, leading to suboptimal or unexpected results (e.g., a simple replacement instead of a deep, inheritance-aware merge).Describe the solution you'd like The proposed solution involves implementing a more advanced
mergeConfiglogic within a dedicated manager (e.g.,Neo.manager.ClassHierarchyor a newNeo.manager.Config). This advanced implementation will leverageNeo.manager.ClassHierarchy'sisAmethod to understand the inheritance relationships between classes represented by nested config objects. Once this manager is instantiated and ready (early in the framework's bootstrap process), it will dynamically replace the existingNeo.mergeConfigmethod with its own, more powerful version. This ensures that all subsequent config processing benefits from intelligent, class-aware merging, allowing for proper inheritance-based merging of nested component configurations.Describe alternatives you've considered Attempting to implement this complex class-aware merging directly within the static
Neo.mergeConfigmethod would introduce significant coupling and complexity into the coreNeomodule. Centralizing this logic within a manager that has access to the class hierarchy provides a cleaner, more maintainable, and extensible solution.Additional context This enhancement is a crucial architectural step towards a more robust and intuitive config system, particularly for applications with deep component hierarchies and extensive use of inheritance. It will significantly improve the predictability and correctness of how nested component configurations are merged across the class chain.