Repository navigation
Catalog: widget parent/depth, class/style and primary action (mendixlabs/mxcli#1268) - #965
Merged
Merged
Conversation
…structure and the catalog (#963) list workflows and show structure recursed over outcome flows only and skipped boundary-event flows and event sub-processes, so TestApp Workflow1 listed 5 activities where the catalog counted 8. The catalog's walk moves to wfnames.WalkActivities/CountActivities and all three use it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…g create/change (#963) commit $Order on a loop variable wrote no refs row because refs had no commit kind. A commit action, or a create/change with commit Yes/YesWithoutEvents, now emits FLOW -> ENTITY 'commit', resolved through the same intra-flow variable map as change/delete. It stays out of the analysis graph and the caller kinds. The ref_kind skill test now reads every RefKind constant, so a new kind cannot ship undocumented. Catalog schema version 19. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tion widgets_data gains ParentWidgetId (nearest indexed ancestor, so skipped wrappers, layout grid rows/columns, tab pages and pluggable property / object-list items are transparent), Depth (0 at the page or snippet root; a list view template is a level), Class, Style, DynamicClasses, ActionType (raw $Type of Action, else OnClickAction, else ClickAction) and HasConfirmation (ConfirmationInfo on a microflow/nanoflow/workflow call). Catalog schema 19. Tested on hand-built shapes and on Studio Pro-authored TestApp pages. mendixlabs#1268 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gets() widgets() structs gain parent_widget_id, depth, class_name, style, dynamic_classes, action_type, has_confirmation and page_ref. mendixlabs#1268 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The widget table moves to write-lint-rules/catalog-tables.md (SKILL.md was over the 700-line bound) with an example rule for inline styles, a class allow-list and direct delete buttons. The vocabulary test scopes action_type per section (activity vs widget), holds documented widget action types to codec-registered storage names, and pins that only flow calls carry a ConfirmationInfo. mendixlabs#1268 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ction' into c24-965 # Conflicts: # CHANGELOG.md # mdl/catalog/tables.go
#963's commit refs and mendixlabs#1268's widget columns both bumped 18 -> 19 on parallel branches. A cache built at 19 by either alone would never rebuild for the other, the 15/16 collision again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Implements mendixlabs#1268 per the agreed design in the maintainer comment there.
What changed
Catalog (
widgets_data, schema 19): the walker now passes the parent through. New columns:ParentWidgetIdis the nearest indexed ancestor. Skipped wrappers (conditionalVisibilityWidget…), layout grid rows and columns, tab pages, and a pluggable widget's properties and object-list items are transparent, so a widget in a LayoutGrid column or a DataGrid2 column is parented to the grid.Depthis 0 at the page or snippet root. A list view template is indexed (Catalog: activities inside loops and their properties; CONV013/CONV014 read the action's error handling #940), so it counts as a level: list view d, template d+1, template content d+2. Depth does not cross a SnippetCallWidget (the snippet's widgets are its own rows, starting at 0).Class,StyleandDynamicClassescome fromForms$Appearance.ActionTypeis the raw$TypeofAction, elseOnClickAction, elseClickAction.HasConfirmationis set when there is aConfirmationInfo:MicroflowSettings.ConfirmationInfofor a microflow call, or directly on a nanoflow or workflow call.Forms$DeleteClientActionhas no confirmation property, and a test pins this against the generated metamodel.Starlark
widgets()gainsparent_widget_id,depth,class_name(classis a keyword),style,dynamic_classes,action_type,has_confirmationandpage_ref.Docs:
write-lint-rules/catalog-tables.md, because SKILL.md would have gone over the 700-line bound. It now includes an example rule: inline style, class allow-list, and delete button → call a microflow with a confirmation.widget.action_typeas the exception: it is the raw storage type.tools/catalog-tables.mdgets a newCATALOG.WIDGETSsection.internals/catalog-schema.mdhad a stale four-column WIDGETS block; it is replaced with the real schema.Vocabulary test:
docRowValuesreturned the firstaction_typerow in the file. The widget row would have shadowed the activity row and silently retargetedTestSkillDocumentsRealActionTypes, so a section-scopeddocSectionRowValueswas added. Documented widget action types must beForms$…Actionnames that the codec registry knows. The issue's own"DeleteAction"would fail this check.Values measured on TestApp:
Forms$NoAction,MicroflowAction(21 with confirmation),CallNanoflowClientAction,FormAction,CancelChangesClientAction,ClosePageClientAction,SaveChangesClientAction,DeleteClientAction,OpenUserTaskClientAction,OpenLinkClientAction,SetTaskOutcomeClientActionandCreateObjectClientAction.Test plan
make build,make lint,make check-conformance,make check-findingsgo test ./mdl/catalog/... ./mdl/linter/... ./mdl/executor/ ./cmd/mxcli/builder_pages_tree_test.go) cover: parent through a skipped wrapper, LayoutGrid + tab container, ListView template (a level of its own), DataGrid2 column and child slot (parented to the grid), snippet roots, appearance, and the primary-action priority and confirmation per action kind.builder_pages_tree_testapp_test.go):Administration.Account_Edit.label4has the right class and style.Account_Overview.actionButton4isForms$DeleteClientActionwith no confirmation.HasConfirmation = 1.widgets_projection_test.go).mxcli linton a copy of testdata/pedapp. I added a page through MDL with a styled container, a disallowed class, a delete button and a microflow button withConfirmation:. A.claude/lint-rules/widget_hygiene.starrule implementing the issue's three checks plus a depth check reported 7 issues, all expected. The skill's example rule, extracted verbatim, ran clean and reported 4 issues. The confirmed microflow button was not flagged as a delete.parent "" want dataView1, wrong depths).textBox1 parent id "wrap", depth 2.pb1/emptyText1parent"", and the TestApp chain collapses to[container5 actionButton5].MicroflowSettings.ConfirmationInfonot read:got (Forms$MicroflowAction, false).label4fail.has_confirmationdropped from the Starlark struct: projection test fails ("struct has no .has_confirmation")."DeleteAction": vocabulary test fails.mxclibinary built with action and parent extraction reverted reports only the 3 style/class issues. The DELETE and DEPTH findings disappear.Left open (follow-up)
WidgetValue.Action, e.g. a DataGrid2 or Gallery on-click), and a widget can have several, so there is no single "primary" one.action_typeis empty for those. This needs a design decision.🤖 Generated with Claude Code