You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Consolidate the dual render pipeline (legacy type-switch vs FieldRendererService) #148
FormCraftComponent.RenderField contains a legacy type-switch (string/int/decimal/double/float/long/short/byte/bool/DateTime/select/file branches) and delegates some cases to FieldRendererService, which has its own renderer registry. Several v3.0 bugs existed precisely because the two paths diverged (numeric pattern attribute, file-upload crash, LOV/lookup/autocomplete shadowing, MinDate/MaxDate honored in one path only), and fixes sometimes had to be applied twice.
Proposal
Make FieldRendererService the single rendering path:
Move any behavior that only exists in the legacy switch (e.g. select options via Options attribute, MinDate/MaxDate passthrough) into the corresponding renderer components.
Reduce RenderField to: custom template → renderer service.
Delete RenderTextField/RenderNumericField/RenderBooleanField/RenderDateTimeField/RenderSelectField* from FormCraftComponent and the duplicated equivalents in CollectionFieldComponent where feasible.
Keep the bUnit suite as the safety net — assertions target the rendered Mud components, not the dispatch path.
Risks
Subtle styling/behavior differences between the legacy markup and the renderer components (Variant/Margin/ShrinkLabel, Immediate, Culture). Inventory them first and align the components before deleting the switch.
Refs: v3.0 audit findings #13, #34, #53/54 and the file-upload/LOV regressions fixed in v3.0.0.
Shipped in v3.1.0: RenderField is now custom-template → FieldRendererService; the legacy type-switch and its helpers (-282 lines) are gone. Legacy-only behaviors (Options-driven selects incl. nullable/reflection fallback, MinDate/MaxDate, invariant culture on numerics, checkbox-default booleans, styling parity) moved into the renderer components with 17 parity tests. Bonus: AsMultiSelect fields, which the old switch silently skipped, now render a real multi-selection MudSelect.
Activity
refactor: consolidate dual render pipeline into FieldRendererService (#…
phmatray commentedon Jun 10, 2026
Shipped in v3.1.0: RenderField is now custom-template → FieldRendererService; the legacy type-switch and its helpers (-282 lines) are gone. Legacy-only behaviors (Options-driven selects incl. nullable/reflection fallback, MinDate/MaxDate, invariant culture on numerics, checkbox-default booleans, styling parity) moved into the renderer components with 17 parity tests. Bonus: AsMultiSelect fields, which the old switch silently skipped, now render a real multi-selection MudSelect.