Discovered while cleaning up v0.10.0 fixture loose ends (commit 4069b601)
Symptom
MDL with a templated column caption + parameters silently loses CaptionParams, ContentParams, ShowContentAs, and Content properties on round-trip.
Input MDL (mirrors Studio-Pro-generated Main.Product_Select from LatoProductInventory):
column Name (
Attribute: Name,
Caption: '{1}',
CaptionParams: [{1} = Name],
ShowContentAs: dynamicText,
Content: 'Name',
ColumnWidth: manual,
Size: 8
) {
textfilter tfName
}
DESCRIBE output after mxcli exec:
column Name (Attribute: Name, Caption: '{1}', ColumnWidth: manual, Size: 8) {
textfilter tfName
}
CaptionParams, ShowContentAs, and Content are silently dropped.
Studio Pro consequence
mx check reports CE0720 "Place holder index 1 is greater than 0, the number of parameter(s)." — the BSON has Caption: '{1}' set as a TextTemplate, but the TextTemplate's parameter bindings list is empty.
Root cause location
mdl/backend/mpr/datagrid_builder.go → cloneAndUpdateColumnProperties → case "header": (around line 294):
case "header":
entry := columnPropertyIDs["header"]
result = append(result, buildColumnHeaderProperty(entry, caption))
buildColumnHeaderProperty receives the literal caption string but no parameter list. CaptionParams arrive at the column spec via child.Properties in the executor (see cmd_pages_builder_v3_widgets.go: buildDataGridV3 around line 110), but aren't propagated through DataGridColumnSpec to the backend.
Same issue likely applies to:
case "content": when ShowContentAs: dynamicText is set with Content + ContentParams
case "tooltip": if Tooltip is a TextTemplate
Acceptance
Out of scope
- TextTemplate parameter support outside DataGrid columns (likely already works for top-level widget properties via
SetTextTemplateWithParams — verify and document)
Priority
Medium. Cosmetic for end users (column headers can use plain text); blocks DESCRIBE/edit round-trip for projects that already have templated column captions (most production projects do — see LatoIntegrations.Products_Overview, Main.Product_Select etc. in test fixtures).
🤖 Generated with Claude Code
Discovered while cleaning up v0.10.0 fixture loose ends (commit 4069b601)
Symptom
MDL with a templated column caption + parameters silently loses
CaptionParams,ContentParams,ShowContentAs, andContentproperties on round-trip.Input MDL (mirrors Studio-Pro-generated
Main.Product_SelectfromLatoProductInventory):DESCRIBE output after
mxcli exec:CaptionParams,ShowContentAs, andContentare silently dropped.Studio Pro consequence
mx checkreports CE0720 "Place holder index 1 is greater than 0, the number of parameter(s)." — the BSON hasCaption: '{1}'set as a TextTemplate, but the TextTemplate's parameter bindings list is empty.Root cause location
mdl/backend/mpr/datagrid_builder.go→cloneAndUpdateColumnProperties→case "header":(around line 294):buildColumnHeaderPropertyreceives the literal caption string but no parameter list.CaptionParamsarrive at the column spec viachild.Propertiesin the executor (seecmd_pages_builder_v3_widgets.go: buildDataGridV3around line 110), but aren't propagated throughDataGridColumnSpecto the backend.Same issue likely applies to:
case "content":whenShowContentAs: dynamicTextis set withContent+ContentParamscase "tooltip":ifTooltipis a TextTemplateAcceptance
DataGridColumnSpeccarries optionalCaptionParams,ContentParams(map[string]string of placeholder → attribute path)buildColumnHeaderProperty(and equivalent forcontent,tooltip) build TextTemplate values with the parameter list populatedCaption: '{1}', CaptionParams: [{1} = Name]losslesslymx checkno longer reports CE0720 on the restored fixtureOut of scope
SetTextTemplateWithParams— verify and document)Priority
Medium. Cosmetic for end users (column headers can use plain text); blocks DESCRIBE/edit round-trip for projects that already have templated column captions (most production projects do — see
LatoIntegrations.Products_Overview,Main.Product_Selectetc. in test fixtures).🤖 Generated with Claude Code