Repository navigation
fix(pages): ALTER PAGE/SNIPPET SET RenderMode on a dynamic text (port of mendixlabs/mxcli#1229) - #1382
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NDLRXjMy1B18Cj3nX5RuCX
Port of mendixlabs#1229 (closes mendixlabs#1228) onto current main. `alter page P { set (RenderMode: H2) on <dynamictext> }` was refused as "not a property of this built-in widget", although CREATE PAGE and REPLACE accept RenderMode on a dynamictext and the MCP backend's mutator already sets it. setRawWidgetPropertyMut had no case for it, so it fell through to the pluggable-property setter. Add a RenderMode case dispatched on the stored $Type (Forms$DynamicText): the value is validated case-insensitively against Text, Paragraph and H1-H6 and written in its canonical spelling; anything else is refused with the accepted list, leaving the document untouched. Other widgets keep the previous path. Changes against the upstream PR: - docs, syntax help and the bug-test script use `set (Key: value)` instead of the deprecated `set Key = value` (MDL-DEPR101); the bug-test script is upgraded to the `mdl 1;` form so the conformance gate accepts it - the finding is its own file under findings/mdl-backend/ instead of an append to the merged-back mdl-backend.jsonl - the quick reference no longer claims every other widget gets an error naming the allowed set; only a bad value on a dynamic text does Tested: the new pagemutator tests fail on unmodified main and pass with the change. Bug-test script against a copy of testdata/pedapp (Mendix 11.13.0): exec applies it and describe shows H2, Paragraph, H4; the unfixed binary refuses the first alter. H7 is refused by check and by --no-check exec, with nothing written. make test, make lint and make check-findings pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NDLRXjMy1B18Cj3nX5RuCX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports mendixlabs#1229 (fixes mendixlabs#1228) onto current
main. The upstream PR was cut from a months-old base and conflicts in 6 of its 8 files.The bug
alter page P { set (RenderMode: H2) on <dynamictext> }is refused with "not a property of this built-in widget". CREATE PAGE and REPLACE accept RenderMode on a dynamic text, and the MCP backend's mutator already sets it. The MPR mutator'ssetRawWidgetPropertyMuthad norendermodecase, so the key fell through to the pluggable-property setter.The fix (MendixMau's, unchanged)
The new
rendermodecase applies only when the stored$TypeisForms$DynamicText. The value is matched case-insensitively against Text, Paragraph and H1–H6 and stored in its canonical spelling. Any other value is refused, listing the accepted set, before the document is touched. Other widgets keep the previous route.Changes against the upstream PR
mxcli syntax page.alter, the alter-page skill and the bug-test script useset (Key: value), not the deprecatedset Key = value(MDL-DEPR101). The bug-test script is also upgraded to themdl 1;form (create or modify,Params: ( … ),ContentParams: ( … ), terminating;) soTestConformanceGateaccepts it.findings/mdl-backend/2026-10-15-alter-set-rendermode-dynamictext.json, instead of an append to the merged-backmdl-backend.jsonl./mxcli-dev:reviewRecurring Findings table, about upstream PRs cut from a stale base.Testing
pagemutatortests fail on unmodifiedmainand pass with the fix.testdata/pedapp(Mendix 11.13.0).execapplies it anddescribeshows H2, Paragraph and H4. The binary without the fix refuses the firstalterwith "not a property of this built-in widget".RenderMode: H7is refused with the accepted list under the reference check and under--no-check. Nothing is written to the project either way.make test,make lintandmake check-findingspass. After merging currentmain, the pagemutator, syntax and conformance tests were re-run.mx checkand the runtime check (no mxbuild in this environment). The upstream author reports, on 11.12.2: 0 errors frommx check, and an H5 heading rendering as<h5>.🤖 Generated with Claude Code
https://claude.ai/code/session_01NDLRXjMy1B18Cj3nX5RuCX