Commit 0b366f5
fix: widget property validator respects MDL builtin property names
The validator landed in 1402742 was too strict — it rejected
properties like \`Label:\`, \`Caption:\`, \`DataSource:\` on any widget
whose \`.def.json\` didn't explicitly declare them. But these are
MDL-recognized builtin property keywords that the widget engine
routes via a dedicated path (\`isBuiltinPropName\` in
\`widget_engine.go\`), not via propertyMappings — they're applied to
the wrapper CustomWidget regardless of the widget's def.
Broke \`make check-mdl\` on three real fixtures that worked before:
- 17-custom-widget-examples.mdl: \`combobox cmbPriority (label: ...)\`
- 17-custom-widget-examples.mdl: \`combobox cmbCategory (label: ...)\`
- 33-alter-page-examples.mdl: \`combobox cbLifecycle (label: ...)\`
(\`Label:\` is legitimate on every pluggable widget — it becomes the
CustomWidget caption.)
Fix: \`validatePluggableWidgetProperties\` now skips any key for which
\`isBuiltinPropName\` returns true. Single source of truth — when the
widget engine adds a new MDL-recognized keyword, the validator picks
it up for free without a parallel list to maintain. The previously
hand-curated \`universalWidgetProperties\` shrinks to just two AST-only
keys (\`conditionalvisibility\`, \`conditionaleditability\`) that aren't
recognized by isBuiltinPropName.
Real typos still caught — verified \`optionsSourcType\` on combobox
still produces \"did you mean \`optionsSourceType\`?\" against
test5-app. All \`mxcli\` and \`mdl/executor\` tests still green.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent b07c75b commit 0b366f5
1 file changed
Lines changed: 15 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
34 | 29 | | |
35 | 30 | | |
36 | 31 | | |
| |||
122 | 117 | | |
123 | 118 | | |
124 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
125 | 128 | | |
126 | 129 | | |
127 | 130 | | |
| |||
186 | 189 | | |
187 | 190 | | |
188 | 191 | | |
189 | | - | |
| 192 | + | |
190 | 193 | | |
191 | 194 | | |
192 | 195 | | |
| |||
0 commit comments