Skip to content

Commit c768a3a

Browse files
committed
Merge branch 'development' into pr/8740
2 parents d232796 + 56083c2 commit c768a3a

5,052 files changed

Lines changed: 120519 additions & 21787 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ env:
1515
global:
1616
# Global variables can go here, for example HUGO_VERSION if we were using Netlify to publish.
1717

18-
#add group: previous to see if this fixes the stalled npm build - 2025-04-14
19-
group: previous
18+
# add group: previous to see if this fixes the stalled npm build - 2025-04-14
19+
# remove again 2025-05-08 as builds started breaking again.
20+
# group: previous
2021

2122
branches:
2223
# build only development and production

assets/scss/_badge.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,10 @@
4040
background-color: $info-1;
4141
color: $info-7;
4242
}
43+
44+
.badge-company-approved {
45+
border: solid 1px $success-9;
46+
background-color: $company-approved;
47+
color: $success-9;
48+
padding: 2px 2px
49+
}

assets/scss/_variables_project.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ $white: #fff; // YL - Override the default color defined in _variables_forward.s
2020
$light: #99D0FF; // DB - Blue-3 from PDS
2121
$dark: #0A1325; // Gray-10 from PDS (MxDock color)
2222
$blue: #146FF4; // YL - Mendix Blue in SP 10; Override the default color defined in _variables_forward.scss
23+
$company-approved: #E0FAE1; // NC - Company approved Marketplace label
2324
$gray-100: #f7f7f7;
2425
$gray-200: #f2f2f3;
2526
$gray-light: $gray-200;

content/en/docs/apidocs-mxsdk/apidocs/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ aliases:
99
- /apidocs/
1010
- /apidocs-mxsdk/apidocs/authentication/
1111
- /apidocs/index.html
12+
- /apidocs-mxsdk/apidocs/runtime-api/
1213
#If moving or renaming this doc file, implement a temporary redirect and let the respective team know they should update the URL in the product. See Mapping to Products for more details.
1314
---
1415

content/en/docs/apidocs-mxsdk/apidocs/apps/epics-api.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,8 @@ To authenticate calls when using the Open API specification below, click **Autho
4343

4444
## API Reference
4545

46-
{{< swaggerui src="/openapi-spec/epics.yaml" >}}
46+
{{% alert color="warning" %}}
47+
You cannot call endpoints from the Epics API Swagger UI.
48+
{{% /alert %}}
49+
50+
{{< swaggerui-disable-try-it-out src="/openapi-spec/epics.yaml" >}}

content/en/docs/apidocs-mxsdk/apidocs/frontend/client-api.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

content/en/docs/apidocs-mxsdk/apidocs/frontend/design-properties.md

Lines changed: 0 additions & 777 deletions
This file was deleted.

content/en/docs/apidocs-mxsdk/apidocs/frontend/design-properties/_index.md

Lines changed: 771 additions & 0 deletions
Large diffs are not rendered by default.

content/en/docs/apidocs-mxsdk/apidocs/frontend/design-properties/design-properties-10.md

Lines changed: 779 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 242 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,242 @@
1+
---
2+
title: "Mendix 9"
3+
url: /apidocs-mxsdk/apidocs/design-properties-9/
4+
description: "This API guide outlines how design properties work in Atlas UI and can help you create custom design properties."
5+
weight: 70
6+
---
7+
8+
## 1 Introduction
9+
10+
The Mendix Design Properties API allows you to create or extend design properties for your Mendix apps.
11+
12+
To use the API, you need to alter the *design-properties.json* file of a specific module in your application's **themesource** folder. This process is described in the [Design Properties Definitions](#design-properties-definitions) section below.
13+
14+
This guide outlines how design properties work and can help you create custom design properties. Many apps can simply use the Atlas UI theme and its included set of design properties to satisfy their styling needs. Atlas UI provides design properties that are built on top of the functionality described in this guide. So while design properties from Atlas UI are used as examples below, design properties themselves are not only for the Atlas UI theme. In fact, if you want to customize your styling more deeply, you will have to create your own custom design properties.
15+
16+
Design properties are a special set of settings shipped together with a Mendix theme module. Design properties are shared among all the Mendix apps which use a specific theme module.
17+
18+
In Studio Pro, you can see which design properties are available for a widget either in the **Properties** pane or in the widget's settings dialog box under the **Appearance** tab.
19+
20+
## 2 Using Design Properties
21+
22+
While styling Mendix apps, users must often apply the same set of CSS or native styling classes to widgets on different pages again and again. This work is time consuming and vulnerable to human error as you edit text fields in order to apply classes to a widget.
23+
24+
Design properties can make this work easier and safer. By configuring your own custom design properties, a certain styling can be applied to a widget in a few clicks.
25+
26+
## 3 Design Property Types
27+
28+
There are two types of design properties: **Toggle** and **Dropdown**. By default design properties have no effect on widgets. Styling is only applied when a **Toggle** property is turned on for a widget, or when one of the options is selected for a **Dropdown** property.
29+
30+
A **Toggle** design property is a simple property which may be turned on for a widget. When this property is set, configured classes are applied to a widget automatically. For example, a **Toggle** property may be a **Full width** property for Atlas UI button widgets. When this property is set for a button, then the `btn-block` CSS class is applied. No additional classes are applied if property is not set.
31+
32+
A design property of type **Dropdown** defines a set of options with separate classes per option. When one of the options is selected, the respective classes are applied to a widget. For example, a **Dropdown** property may be an Atlas UI **Align self** property. It contains two options: **Left** and **Right**. When one of these options is selected, then either the `pull-left` or `pull-right` CSS class is applied.
33+
34+
## 4 Design Properties Definitions {#design-properties-definitions}
35+
36+
Design properties are defined on a module level in **JSON** format. They are located in the module specific *themesource* folders (for more information, see the [File and Folder Structure](/howto/front-end/customize-styling-new/#file-and-folder) section of *How to Customize Styling*). Since styling works differently for web and native platforms, each platform's design properties are different and defined in two separate folders. Web styling is defined in *web/design-properties.json* file. Native styling is defined in the *native/design-properties.json* file.
37+
38+
Here is a simplified example of a design properties file:
39+
40+
```js
41+
{
42+
"DivContainer": [
43+
{
44+
"name": "My Toggle Property",
45+
"type": "Toggle",
46+
"description": "Description of My Toggle Design Property",
47+
"class": "hereMyClass"
48+
},
49+
{
50+
"name": "My Dropdown Property",
51+
"type": "Dropdown",
52+
"description": "Description of My Dropdown Design Property",
53+
"options": [
54+
{
55+
"name": "Styling option 1",
56+
"class": "stylingClassOne"
57+
},
58+
{
59+
"name": "Styling option 2",
60+
"class": "stylingClassTwo"
61+
}
62+
]
63+
}
64+
],
65+
"Button": [
66+
...
67+
]
68+
}
69+
```
70+
71+
### 4.1 Design Property Structure
72+
73+
Use this code to further simplify the above example:
74+
75+
```js
76+
{
77+
"DivContainer": [
78+
{
79+
... property one
80+
},
81+
{
82+
... property two
83+
}
84+
],
85+
"Button": [
86+
...
87+
]
88+
}
89+
```
90+
91+
As you can see from the structure above, design properties are defined as a *JSON* object where keys (`DivContainer` and `Button` for example) are widget types and values are *JSON* arrays containing sets of design properties applicable for that widget type. To learn more about this subject, see the [Widget Types](#widget-types) section below. Note that you can add multiple class names in a property.
92+
93+
Every design property from the array is also represented as a *JSON* object. As described earlier there are two types of design properties: **Toggle** and **Dropdown**. Both types share common fields such as `name`, `type`, and `description`. Those names determine how a design property appears to a user in Mendix Studio Pro. Below you can look at examples of design properties of both types.
94+
95+
Here is an example of a **Toggle** design property:
96+
97+
```js
98+
{
99+
"name": "My Toggle Property",
100+
"type": "Toggle",
101+
"description": "Description of My Toggle Design Property",
102+
"class": "hereMyClass"
103+
}
104+
```
105+
106+
This is how the **Toggle** design property appears:
107+
108+
{{< figure src="/attachments/apidocs-mxsdk/apidocs/design-properties/toggle.png" alt="Toggle property in Studio Pro" >}}
109+
110+
Here is an example of a **Dropdown** design property:
111+
112+
```js
113+
{
114+
"name": "My Dropdown Property",
115+
"type": "Dropdown",
116+
"description": "Description of My Dropdown Design Property",
117+
"options": [
118+
{
119+
"name": "Styling option 1",
120+
"class": "stylingClassOne"
121+
},
122+
{
123+
"name": "Styling option 2",
124+
"class": "stylingClassTwo"
125+
}
126+
]
127+
}
128+
```
129+
130+
This is how the **Dropdown** design property appears:
131+
132+
{{< figure src="/attachments/apidocs-mxsdk/apidocs/design-properties/dropdown.png" alt="Dropdown property in Studio Pro" max-width=80% >}}
133+
134+
#### 4.1.1 Common Fields
135+
136+
The examples above show that the fields `name` and `description` define the UI, the name of a form control in Studio Pro, and the description under it. They are arbitrary string values naming and describing a design property.
137+
138+
Field `type` defines the type of a property and can only take one of the two string values: `Toggle` or `Dropdown`.
139+
140+
{{% alert color="warning" %}}
141+
Name your design property and its options carefully. Those names cannot be changed easily when there are apps already using them.
142+
143+
If you want to rename a design property which is already being used in an app, see the [Renaming Design Properties](#old-names) section below.
144+
{{% /alert %}}
145+
146+
#### 4.1.2 Toggle-Specific Fields
147+
148+
When a type of design property is **Toggle** it should contain a `class` field on the top level of its property definition. This field defines an arbitrary class name to be applied if the option is toggled on for a widget. In the example above, the class to be applied is `hereMyClass`.
149+
150+
#### 4.1.3 Dropdown-Specific Fields
151+
152+
When a type of design property is **Dropdown** it should contain an `options` field which is an array of possible options for the design property. Every option must be an object with `name` and `class` fields. In the example above there are two options named **Styling option 1** and **Styling option 2**. They have the `stylingClassOne` and `stylingClassTwo` classes respectively.
153+
154+
### 4.2 Extending or Overriding Design Properties of Other Modules {#extend-existing-design-properties}
155+
156+
Design properties can be extended or overridden in other modules. For example, you can add a custom drop-down option to an Atlas design property or override the applied CSS class of a toggle property.
157+
158+
Overriding a design property can be useful when creating a theme module that builds on top of Atlas styling. To do this, simply add a design property for the same widget type in *themesource/{YOURTHEMEMODULE}/{WEB|NATIVE}/design-properties.json* using the same name and property type.
159+
160+
The precedence of design properties is determined by this compilation order of modules:
161+
162+
1. Non-UI Marketplace modules, in alphabetical order.
163+
1. UI resources modules, ordered as in **App Settings** > **Theme**.
164+
1. Non-UI user modules, ordered as in the Studio Pro App Explorer.
165+
166+
If multiple modules have a definition of a **Dropdown** property with the same name, the options will be ordered from high to low precedence (highest on top). If multiple modules have definitions of a **Toggle** property with the same name, the CSS class name from the module with the highest precedence will be applied when using the property.
167+
168+
{{% alert color="warning" %}}
169+
Note that having multiple definitions with different types (for example **Toggle** and **Dropdown**) is an invalid configuration and will result in a failure to load any design properties.
170+
{{% /alert %}}
171+
172+
## 5 Widget Types{#widget-types}
173+
174+
When defining design properties in your *JSON* file, you must specify which widget your properties apply to, as some design properties may only work with certain widgets.
175+
176+
{{% alert color="info" %}}
177+
Having a property that applies a table appearance style like **Stripped**, **Bordered**, or **Lined** only makes sense for widgets that contain tables, for example a data grid widget.
178+
{{% /alert %}}
179+
180+
Widget types are types defined in the [Model SDK](https://apidocs.rnd.mendix.com/modelsdk/latest/modules/pages.html) documentation. Every type which is a direct or an indirect subtype of type [`Widget`](https://apidocs.rnd.mendix.com/modelsdk/latest/classes/pages.widget.html) can have design properties attached to it. If a property is defined on a widget, then every subtype of this widget will have that property. For example if a property is defined on a `Widget` type, which is it the highest type in the hierarchy, then every widget will have this design property available.
181+
182+
### 5.1 Widget Types for Pluggable Widgets
183+
184+
When creating design properties for [Pluggable Widgets](/apidocs-mxsdk/apidocs/pluggable-widgets/), their widget type is determined by [widget id](/apidocs-mxsdk/apidocs/pluggable-widgets/#widget-id).
185+
186+
## 6 Renaming Design Properties{#old-names}
187+
188+
Sometimes you must rename design properties or their options which are already in use. As design properties are identified by names internally, renaming one may be a breaking change for apps that are already using those design properties.
189+
190+
To prevent errors and offer users simple upgrade paths, use an `oldNames` field. This field must be of type array and contain old names, a particular property, or an option that was known and used before. The order of old names in an `oldNames` list does not matter. For instance, if a property was renamed twice, the `oldNames` field should contain both previous names.
191+
192+
Example of a property and options that were renamed:
193+
194+
```js
195+
{
196+
"name": "My Dropdown Property",
197+
"oldNames": ["my Dropdown Propery"],
198+
"type": "Dropdown",
199+
"description": "Description of My Dropdown Design Property",
200+
"options": [
201+
{
202+
"name": "Styling option one",
203+
"class": "stylingClassOne"
204+
},
205+
{
206+
"name": "Styling option two",
207+
"oldNames": ["Stling option 2", "Styling option 2"],
208+
"class": "stylingClassTwo"
209+
}
210+
]
211+
}
212+
```
213+
214+
The design property above was renamed from **my Dropdown Propery** to **My Dropdown Property**. Also **Styling option two** was renamed twice from the old names **Stling option 2** and **Styling option 2**.
215+
216+
### 6.1 Renaming a Dropdown Option to a Toggle Property
217+
218+
{{% alert color="info" %}}
219+
This feature was introduced in Mendix 9.
220+
{{% /alert %}}
221+
222+
It is also possible to rename an option of a **Dropdown** property to a separate **Toggle** property. In this case, the old name of the **Toggle** property consists of the **Dropdown** property's name and the option's name separated by two colons. It is not required for the **Dropdown** property to still exist — it may have been removed entirely.
223+
224+
Here is an example of a **Toggle** property that was renamed from a **Dropdown** option:
225+
226+
```js
227+
{
228+
"name": "Styling 3",
229+
"oldNames": ["My Dropdown Property::Styling option 3"],
230+
"type: "Toggle",
231+
"description": "Description of Styling 3 toggle property",
232+
"class": "stylingClassThree"
233+
}
234+
```
235+
236+
The design property above is a replacement for the removed option **Styling option 3** of **My Dropdown Property** and will be set to **Yes** if that option was selected. The value of **My Dropdown Property** will then be set to empty if that design property still exists.
237+
238+
## 7 Read More
239+
240+
* [Native Styling](/refguide/mobile/designing-mobile-user-interfaces/native-styling/)
241+
* [Native Mobile Styling Reference Guide](/refguide/native-styling-refguide/)
242+
* [How to Extend Design Properties](/howto/front-end/extend-design-properties/)

0 commit comments

Comments
 (0)