Repository navigation
Commit 2f330b5
fix(describe): tell a button's three icon elements apart (#1059)
`describe page` -> `create or replace page` rebuilt a button's icon as the
wrong element, or deleted it.
Mendix stores three icon elements and two of them put a qualified name under
the same BSON key:
Forms$IconCollectionIcon{Image} -> CustomIcons$CustomIcon
Forms$ImageIcon{Image} -> Images$Image (a different document)
Forms$GlyphIcon{Code} -> a font code point, no name at all
The page describer read `Image` off whichever element was there and discarded
the `$Type`, and the page builder writes Forms$IconCollectionIcon
unconditionally. So an image icon came out as a bare `Icon: '<qn>'` and went
back in as a custom-icon reference:
[error] [CE1613] "The selected custom icon
'DesignSystem.Icons_SVG.edit' no longer exists."
A glyph icon was worse: DESCRIBE emitted nothing for it at all, and since
CREATE OR REPLACE PAGE is a full replacement, replaying that output removed
the icon at exit 0 with a success message.
This is not a limit on third-party collections, as the report read it — a
third-party icon collection round-trips fine, and CE1613 naming the reference
is itself evidence the name was never a custom icon.
The same three-way split was already understood in navigation (#1008,
types.MenuIconKindOf); the page path never received it. That resolver is now
shared rather than duplicated. DESCRIBE emits `Icon:` only for the variant
mxcli can author and flags every other kind — the unrecognised `$Type`
included, so the next variant Mendix adds is reported rather than dropped —
with a `-- NOT re-executable` note naming the reference and its element.
Measured on the FeedbackModule pages of a stock marketplace project: three
glyph icons per page went from zero mentions in describe output to three
notes; icon-collection clauses are unchanged (10 on that project) and the
emitted script still parses (the one parse failure there is a pre-existing
nameless-statictext defect, confirmed identical against the base binary).
Authoring the other two variants (`Icon: image <qn>` / `Icon: glyph <n>`, as
navigation spells them) is not part of this: the loss is now visible, not yet
reversible. NavigationList item and DropDownButton icons are still not read at
all — noted in the finding.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017s476QkXr9CFMvKspVzcvu1 parent 41f5b70 commit 2f330b5
8 files changed
Lines changed: 267 additions & 21 deletions
File tree
- .claude/skills/fix-issue/findings
- cmd/mxcli/syntax
- mdl/executor
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
610 | 610 | | |
611 | 611 | | |
612 | 612 | | |
| 613 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
23 | 31 | | |
24 | 32 | | |
25 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
| 231 | + | |
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| |||
0 commit comments