From 4f45f51ea148b9f8338ce2b763798c78f9bdf20e Mon Sep 17 00:00:00 2001 From: delchev Date: Tue, 21 Jul 2026 22:38:27 +0300 Subject: [PATCH] feat(harmonia): humanize generated property labels + task-form Details-card layout Two presentation fixes to the generated Harmonia UI, reported together. 1. Humanized property labels. The label catalog value for a property defaulted to the raw PascalCase name (parameterUtils widgetLabel default -> generateUtils translate action), so list columns and the detail/document view showed "PaymentMethod" / "TaxEventDate" instead of "Payment Method" / "Tax Event Date" - while entity labels were already humanized. humanizeName moves to parameterUtils (the shared util module generateUtils already imports from), is exported, and now backs the widgetLabel default; an explicitly authored widgetLabel still wins. Affects every generated app (Angular + Harmonia); flows to the label catalog and the form/list templates alike. 2. Task-form Details-card layout. A BPM task form's read-only fields rendered as label-beside-value hbox rows; they now render as the entity detail / document view's headerless x-h-card of vbox detail cells (muted text-xs label above a text-sm value), so the Inbox task form matches the entity Details layout. Verified live: regenerated kf-mod-sales-invoices - the served label catalog humanizes (Payment Method / Tax Event Date / Bank Account) and the ApproveSalesInvoice task form renders the x-h-card + vbox gap-0 detail cells. Co-Authored-By: Claude Fable 5 --- .../ui/index.html.template | 33 ++++++++++++------- .../template/generateUtils.js | 24 ++------------ .../template/parameterUtils.js | 24 +++++++++++++- 3 files changed, 47 insertions(+), 34 deletions(-) diff --git a/components/template/template-form-builder-harmonia/src/main/resources/META-INF/dirigible/template-form-builder-harmonia/ui/index.html.template b/components/template/template-form-builder-harmonia/src/main/resources/META-INF/dirigible/template-form-builder-harmonia/ui/index.html.template index 9f1d40af49f..bb3bcde3d31 100644 --- a/components/template/template-form-builder-harmonia/src/main/resources/META-INF/dirigible/template-form-builder-harmonia/ui/index.html.template +++ b/components/template/template-form-builder-harmonia/src/main/resources/META-INF/dirigible/template-form-builder-harmonia/ui/index.html.template @@ -1,20 +1,20 @@ #macro(leaf $el) #if($metadata.taskForm && $el.readonly && $el.model) - -
- $!el.label +
+ $!el.label #if($el.controlId == "input-number") - + #elseif($el.controlId == "input-date" || $el.controlId == "input-datetime-local" || $el.controlId == "input-time" || $el.controlId == "input-month") - + #else - + #end
#elseif($el.controlId == "header") @@ -138,10 +138,13 @@
#if($metadata.taskForm) - -
+ +
+
+
#else
#end @@ -162,7 +165,13 @@ #leaf($element) #end #end +#if($metadata.taskForm) +
+
+#else +
+#end