Skip to content

Commit bb6a668

Browse files
iobuhovclaude
andcommitted
feat: add widget properties documentation template and Data Grid 2 props
- Add widget-props.md template in .agents/templates/ with clear placeholders - Include instructions for documenting enumerations consistently - Generate comprehensive props.md for Data Grid 2 widget - Document all 60+ properties organized by Studio Pro groups Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent e71ee85 commit bb6a668

2 files changed

Lines changed: 359 additions & 0 deletions

File tree

.agents/templates/widget-props.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Widget Name Properties
2+
3+
## Property Group Name
4+
5+
### Sub-group Name (optional)
6+
7+
| Property | Type | Default | Required | Description |
8+
| ------------- | ---- | ------------------- | -------- | -------------------------------------- |
9+
| `propertyKey` | type | `defaultValue` or - | Yes/No | Description of what this property does |
10+
11+
**Instructions for enumeration properties:**
12+
13+
- Always document enum values below the table using the property key as header
14+
- Format: `enumKey` - Label: Description
15+
- Use the exact key from XML, the Studio Pro label, and explain what it does
16+
17+
**propertyKey values:** (for enumeration types)
18+
19+
- `enumKey` - Label: Description of what this value means
20+
21+
**propertyKey constraints:** (for attribute/expression types)
22+
23+
- Attribute types: List applicable types
24+
- Return type: Expected return type
25+
- Data source: Reference to parent data source if applicable
26+
27+
---
28+
29+
## Property Group Name 2
30+
31+
### Nested Object Properties
32+
33+
For properties of type `object (list)`, document nested properties in a sub-section:
34+
35+
#### Nested Property Group
36+
37+
| Property | Type | Default | Required | Description |
38+
| ---------------- | ---- | -------------- | -------- | ----------- |
39+
| `nestedProperty` | type | `defaultValue` | Yes/No | Description |
40+
41+
---
42+
43+
<!-- ============================================================================ -->
44+
<!-- EXAMPLE - Do not include this section in final documentation -->
45+
<!-- ============================================================================ -->
46+
47+
## Example (for reference only)
48+
49+
### General
50+
51+
| Property | Type | Default | Required | Description |
52+
| ----------------- | ----------------- | ------- | -------- | -------------------------- |
53+
| `datasource` | datasource (list) | - | Yes | Data source for the widget |
54+
| `refreshInterval` | integer | `0` | No | Refresh time in seconds |
55+
56+
### Selection
57+
58+
| Property | Type | Default | Required | Description |
59+
| --------------------- | ----------- | ---------- | -------- | ------------------------------ |
60+
| `itemSelection` | selection | - | Yes | Selection mode for grid rows |
61+
| `itemSelectionMethod` | enumeration | `checkbox` | No | How users select rows |
62+
| `autoSelect` | boolean | `false` | No | Automatically select first row |
63+
64+
**itemSelectionMethod values:**
65+
66+
- `checkbox` - Checkbox: Select via checkbox column
67+
- `rowClick` - Row click: Select by clicking the row
68+
69+
### Columns
70+
71+
| Property | Type | Default | Required | Description |
72+
| --------- | ------------- | ------- | -------- | -------------------- |
73+
| `columns` | object (list) | - | Yes | Column configuration |
74+
75+
#### Column Properties
76+
77+
| Property | Type | Default | Required | Description |
78+
| --------------- | ----------- | ----------- | -------- | ----------------------------- |
79+
| `showContentAs` | enumeration | `attribute` | No | How to display column content |
80+
| `attribute` | attribute | - | No | Attribute to display |
81+
| `sortable` | boolean | `true` | No | Whether column can be sorted |
82+
83+
**showContentAs values:**
84+
85+
- `attribute` - Attribute: Display bound attribute value
86+
- `dynamicText` - Dynamic text: Display text template
87+
- `customContent` - Custom content: Display nested widgets
88+
89+
**attribute constraints:**
90+
91+
- Attribute types: String, Boolean, DateTime, Integer
92+
- Associations: Reference, ReferenceSet
Lines changed: 267 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,267 @@
1+
# Data Grid 2 Properties
2+
3+
## General
4+
5+
### General
6+
7+
| Property | Type | Default | Required | Description |
8+
| ----------------- | ----------------- | ------- | -------- | ------------------------ |
9+
| `datasource` | datasource (list) | - | Yes | Data source for the grid |
10+
| `refreshInterval` | integer | `0` | No | Refresh time in seconds |
11+
12+
### Columns
13+
14+
| Property | Type | Default | Required | Description |
15+
| ------------------- | ------------- | ------- | -------- | -------------------- |
16+
| `columns` | object (list) | - | Yes | Column configuration |
17+
| `columnsFilterable` | boolean | `true` | No | Show column filters |
18+
19+
#### Column Properties
20+
21+
##### General
22+
23+
| Property | Type | Default | Required | Description |
24+
| -------------------- | ------------ | ----------- | -------- | ------------------------------------------------------ |
25+
| `showContentAs` | enumeration | `attribute` | No | How to display column content |
26+
| `attribute` | attribute | - | No | Attribute to display (required if sortable/filterable) |
27+
| `content` | widgets | - | No | Custom content widgets |
28+
| `dynamicText` | textTemplate | - | No | Dynamic text template |
29+
| `exportValue` | textTemplate | - | No | Value to export |
30+
| `exportType` | enumeration | `default` | No | Type for export formatting |
31+
| `exportNumberFormat` | expression | - | No | Excel number format (e.g. "#,##0.00") |
32+
| `exportDateFormat` | expression | - | No | Excel date format (e.g. "yyyy-mm-dd") |
33+
| `header` | textTemplate | - | No | Column caption |
34+
| `tooltip` | textTemplate | - | No | Tooltip text |
35+
| `filter` | widgets | - | No | Filter widget |
36+
| `visible` | expression | `true` | Yes | Whether column is visible |
37+
38+
**showContentAs values:**
39+
40+
- `attribute` - Attribute: Display bound attribute value
41+
- `dynamicText` - Dynamic text: Display text template
42+
- `customContent` - Custom content: Display nested widgets
43+
44+
**attribute types:**
45+
46+
- String, AutoNumber, Boolean, DateTime, Decimal, Enum, Integer, Long
47+
- Associations: Reference, ReferenceSet
48+
49+
**exportType values:**
50+
51+
- `default` - Default: Infer type from attribute
52+
- `number` - Number: Export as numeric cell
53+
- `date` - Date: Export as date cell
54+
- `boolean` - Boolean: Export as boolean cell
55+
56+
##### Column Capabilities
57+
58+
| Property | Type | Default | Required | Description |
59+
| ----------------------- | ----------- | ------- | -------- | ----------------------------------------------------- |
60+
| `sortable` | boolean | `true` | No | Whether column can be sorted |
61+
| `resizable` | boolean | `true` | No | Whether column can be resized |
62+
| `draggable` | boolean | `true` | No | Whether column can be reordered |
63+
| `hidable` | enumeration | `yes` | No | Whether column can be hidden |
64+
| `allowEventPropagation` | boolean | `true` | No | Allow row events when interacting with custom content |
65+
66+
**hidable values:**
67+
68+
- `yes` - Yes: Can be hidden, visible by default
69+
- `hidden` - Yes, hidden by default: Can be hidden, hidden by default
70+
- `no` - No: Cannot be hidden
71+
72+
##### Appearance
73+
74+
| Property | Type | Default | Required | Description |
75+
| --------------- | ----------- | ---------- | -------- | --------------------------------- |
76+
| `width` | enumeration | `autoFill` | No | Column width behavior |
77+
| `minWidth` | enumeration | `auto` | No | Minimum width behavior |
78+
| `minWidthLimit` | integer | `100` | No | Minimum width value in pixels |
79+
| `size` | integer | `1` | No | Column size (proportional weight) |
80+
| `alignment` | enumeration | `left` | No | Text alignment |
81+
| `columnClass` | expression | - | No | Dynamic CSS class for cells |
82+
| `wrapText` | boolean | `false` | No | Whether to wrap text |
83+
84+
**width values:**
85+
86+
- `autoFill` - Auto-fill: Column takes proportional space
87+
- `autoFit` - Auto-fit content: Column fits content width
88+
- `manual` - Manual: Fixed width set by user
89+
90+
**minWidth values:**
91+
92+
- `auto` - Auto: Automatic minimum width
93+
- `minContent` - Set by content: Minimum width based on content
94+
- `manual` - Manual: Use minWidthLimit value
95+
96+
**alignment values:**
97+
98+
- `left` - Left: Left-align content
99+
- `center` - Center: Center-align content
100+
- `right` - Right: Right-align content
101+
102+
### Events
103+
104+
| Property | Type | Default | Required | Description |
105+
| -------------------- | ----------- | -------- | -------- | ---------------------------------------- |
106+
| `onClickTrigger` | enumeration | `single` | No | What triggers the on click action |
107+
| `onClick` | action | - | No | Action to execute on row click |
108+
| `onSelectionChange` | action | - | No | Action to execute when selection changes |
109+
| `filtersPlaceholder` | widgets | - | No | Widgets to show in filters area |
110+
111+
**onClickTrigger values:**
112+
113+
- `single` - Single click: Trigger on single click
114+
- `double` - Double click: Trigger on double click
115+
116+
## Behavior
117+
118+
### Selection
119+
120+
| Property | Type | Default | Required | Description |
121+
| -------------------------- | ----------- | ---------- | -------- | ------------------------------------ |
122+
| `itemSelection` | selection | - | Yes | Selection mode |
123+
| `itemSelectionMethod` | enumeration | `checkbox` | No | How users select rows |
124+
| `autoSelect` | boolean | `false` | No | Automatically select first row |
125+
| `itemSelectionMode` | enumeration | `clear` | No | Toggle selection on click |
126+
| `showSelectAllToggle` | boolean | `true` | No | Show "Select all" checkbox in header |
127+
| `enableSelectAll` | boolean | `false` | No | Enable "Select all" across pages |
128+
| `keepSelection` | boolean | `false` | No | Keep selection when data refreshes |
129+
| `selectionCounterPosition` | enumeration | `bottom` | Yes | Where to show selection count |
130+
131+
**itemSelection values:**
132+
133+
- `None` - None: No selection
134+
- `Single` - Single: Single row selection
135+
- `Multi` - Multi: Multiple row selection
136+
137+
**itemSelectionMethod values:**
138+
139+
- `checkbox` - Checkbox: Select via checkbox column
140+
- `rowClick` - Row click: Select by clicking the row
141+
142+
**itemSelectionMode values:**
143+
144+
- `toggle` - Yes: Clicking selected row deselects it
145+
- `clear` - No: Clicking selected row keeps it selected
146+
147+
**selectionCounterPosition values:**
148+
149+
- `top` - Top: Show selection count above grid
150+
- `bottom` - Bottom: Show selection count below grid
151+
- `off` - Off: Don't show selection count
152+
153+
### Loading State
154+
155+
| Property | Type | Default | Required | Description |
156+
| ------------------ | ----------- | --------- | -------- | ------------------------------------- |
157+
| `loadingType` | enumeration | `spinner` | Yes | Type of loading indicator |
158+
| `refreshIndicator` | boolean | `false` | No | Show refresh indicator when reloading |
159+
160+
**loadingType values:**
161+
162+
- `spinner` - Spinner: Show spinner while loading
163+
- `skeleton` - Skeleton: Show skeleton placeholder while loading
164+
165+
### Pagination
166+
167+
| Property | Type | Default | Required | Description |
168+
| ----------------------- | ------------------- | ----------- | -------- | ------------------------------------------ |
169+
| `pageSize` | integer | `20` | No | Number of rows per page |
170+
| `pagination` | enumeration | `buttons` | No | Pagination style |
171+
| `useCustomPagination` | boolean | `false` | No | Use custom pagination widgets |
172+
| `customPagination` | widgets | - | No | Custom pagination widgets |
173+
| `showPagingButtons` | enumeration | `always` | No | When to show paging buttons |
174+
| `showNumberOfRows` | boolean | `false` | No | Show total number of rows |
175+
| `pagingPosition` | enumeration | `bottom` | No | Where to show pagination |
176+
| `loadMoreButtonCaption` | textTemplate | "Load More" | No | Caption for load more button |
177+
| `dynamicPageSize` | attribute (Integer) | - | No | Attribute to set page size dynamically |
178+
| `dynamicPage` | attribute (Integer) | - | No | Attribute to set current page dynamically |
179+
| `totalCountValue` | attribute (Integer) | - | No | Attribute to store total count |
180+
| `dynamicItemCount` | attribute (Integer) | - | No | Read-only attribute with loaded rows count |
181+
182+
**pagination values:**
183+
184+
- `buttons` - Paging buttons: Traditional page navigation buttons
185+
- `virtualScrolling` - Virtual scrolling: Load on scroll
186+
- `loadMore` - Load more: Load more button
187+
188+
**showPagingButtons values:**
189+
190+
- `always` - Always: Always show buttons
191+
- `auto` - Auto: Hide buttons when all rows fit on one page
192+
193+
**pagingPosition values:**
194+
195+
- `bottom` - Below grid: Show pagination below grid
196+
- `top` - Above grid: Show pagination above grid
197+
- `both` - Both: Show pagination above and below grid
198+
199+
### Appearance
200+
201+
| Property | Type | Default | Required | Description |
202+
| ---------------------- | ----------- | ------- | -------- | ------------------------------- |
203+
| `showEmptyPlaceholder` | enumeration | `none` | No | Show message when list is empty |
204+
| `emptyPlaceholder` | widgets | - | No | Widgets to show when empty |
205+
| `rowClass` | expression | - | No | Dynamic CSS class for rows |
206+
207+
**showEmptyPlaceholder values:**
208+
209+
- `none` - None: No empty message
210+
- `custom` - Custom: Show custom empty placeholder
211+
212+
### Advanced
213+
214+
| Property | Type | Default | Required | Description |
215+
| -------------- | ---------- | ------- | -------- | ---------------------------------------------- |
216+
| `customRowKey` | expression | - | No | Stable identifier for rows (for view entities) |
217+
218+
## Personalization
219+
220+
### Column Capabilities
221+
222+
| Property | Type | Default | Required | Description |
223+
| ------------------ | ------- | ------- | -------- | -------------------------------------------- |
224+
| `columnsSortable` | boolean | `true` | No | Enable sorting for all columns by default |
225+
| `columnsResizable` | boolean | `true` | No | Enable resizing for all columns by default |
226+
| `columnsDraggable` | boolean | `true` | No | Enable reordering for all columns by default |
227+
| `columnsHidable` | boolean | `true` | No | Enable hiding for all columns by default |
228+
229+
### Configuration
230+
231+
| Property | Type | Default | Required | Description |
232+
| ------------------------------- | ------------------ | ----------- | -------- | ---------------------------------------------------------------- |
233+
| `configurationStorageType` | enumeration | `attribute` | No | Where to store personalization settings |
234+
| `configurationAttribute` | attribute (String) | - | No | Attribute for personalization config (requires Unlimited String) |
235+
| `storeFiltersInPersonalization` | boolean | `true` | No | Store filter settings in personalization |
236+
| `onConfigurationChange` | action | - | No | Action to execute when configuration changes |
237+
238+
**configurationStorageType values:**
239+
240+
- `attribute` - Attribute: Store in Mendix attribute (user-specific)
241+
- `localStorage` - Browser local storage: Store in browser (profile-specific, not user-specific)
242+
243+
## Texts
244+
245+
### Aria Labels
246+
247+
| Property | Type | Default | Required | Description |
248+
| ---------------------------- | ------------ | ------------------------ | -------- | ---------------------------------------- |
249+
| `filterSectionTitle` | textTemplate | - | No | Label for filter/sorting section |
250+
| `exportDialogLabel` | textTemplate | "Export progress" | No | Label for export progress dialog |
251+
| `cancelExportLabel` | textTemplate | "Cancel data export" | No | Label for cancel export button |
252+
| `selectRowLabel` | textTemplate | "Select row" | No | Label for row selection checkbox |
253+
| `selectAllRowsLabel` | textTemplate | "Select all rows" | No | Label for select all checkbox |
254+
| `singleSelectionColumnLabel` | textTemplate | "Select single row" | No | Label for single selection column header |
255+
| `selectingAllLabel` | textTemplate | "Selecting all items..." | No | Label for select all progress dialog |
256+
| `cancelSelectionLabel` | textTemplate | "Cancel selection" | No | Label for cancel selection button |
257+
258+
### Captions
259+
260+
| Property | Type | Default | Required | Description |
261+
| ------------------------------- | ------------ | --------------------------------------- | -------- | ------------------------------------------------------- |
262+
| `selectedCountTemplateSingular` | textTemplate | "%d row selected" | No | Template for singular selection count (must include %d) |
263+
| `selectedCountTemplatePlural` | textTemplate | "%d rows selected" | No | Template for plural selection count (must include %d) |
264+
| `selectAllText` | textTemplate | "Select all rows in the data source" | No | Text for select all link |
265+
| `selectAllTemplate` | textTemplate | "Select all %d rows in the data source" | No | Template for select all with count (must include %d) |
266+
| `allSelectedText` | textTemplate | "All %d rows selected." | No | Template for all selected status (must include %d) |
267+
| `clearSelectionButtonLabel` | textTemplate | "Clear selection" | No | Label for clear selection button |

0 commit comments

Comments
 (0)