Skip to content

Commit 8638a67

Browse files
committed
Reformat 2
1 parent 363b0c7 commit 8638a67

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

  • content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/pluggable-widgets

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/pluggable-widgets/_index.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ A prop value is often not just a primitive value, but an object whose structure
4343

4444
```ts
4545
export interface ActionValue {
46-
readonly canExecute: boolean;
47-
readonly isExecuting: boolean;
48-
execute(): void;
46+
readonly canExecute: boolean;
47+
readonly isExecuting: boolean;
48+
execute(): void;
4949
}
5050
```
5151

52-
The above interface could be used this way: a component uses a `canExecute` flag to decide whether it should be enabled, uses an `isExecuting` flag to show an inline progress indicator, and triggers `execute()` method in a reaction to user click. Normally, after `execute()` has been triggered, the component will be re-rendered with a new value that has the `isExecuting` flag set, and when an action, for example a microflow, completes, the component is re-rendered again without `isExecuting`.
52+
The above interface could be used this way: a component uses a `canExecute` flag to decide whether it should be enabled, uses an `isExecuting` flag to show an inline progress indicator, and triggers `execute()` method in a reaction to user click. Normally, after `execute()` has been triggered, the component will be re-rendered with a new value that has the `isExecuting` flag set, and when an action, for example a microflow, completes, the component is re-rendered again without `isExecuting`.
5353

5454
## Widget Package {#widget-package}
5555

@@ -61,17 +61,17 @@ A widget package file is just a ZIP archive containing the following things:
6161

6262
* A *package.xml* file describing the whole package
6363
* A widget definition XML file, preferably located in *{widgetName}.xml* where `widgetName` is the last part of widget [ID](#widget-id)
64-
* A client component of a widget located, for example, in *com/mendix/widget/MyProgressCircle.js* for a widget with the ID `com.mendix.widget.MyProgressCircle`
64+
* A client component of a widget located, for example, in *com/mendix/widget/MyProgressCircle.js* for a widget with the ID `com.mendix.widget.MyProgressCircle`
6565
* Optionally, a widget preview Studio Pro’s **Design mode** located in *{widgetName}.editorPreview.js*
6666
* Optionally, widget icons (which must be the PNG format):
67-
* *{widgetName}.icon.png* sets the widget icon inside the Studio Pro toolbox in list view (the ideal image size is 64x64 pixels, but other sizes will be resized to fit)
68-
* *{widgetName}.icon.dark.png* sets the dark-mode equivalent to *{widgetName}.icon.png*
69-
* *{widgetName}.tile.png* sets the tile image inside the Studio Pro toolbox in tile view (the ideal image size is 256x192 pixels, but other sizes will be resized to fit)
70-
* *{widgetName}.tile.dark.png* sets the dark-mode equivalent to *{widgetName}.tile.png*
67+
* *{widgetName}.icon.png* sets the widget icon inside the Studio Pro toolbox in list view (the ideal image size is 64x64 pixels, but other sizes will be resized to fit)
68+
* *{widgetName}.icon.dark.png* sets the dark-mode equivalent to *{widgetName}.icon.png*
69+
* *{widgetName}.tile.png* sets the tile image inside the Studio Pro toolbox in tile view (the ideal image size is 256x192 pixels, but other sizes will be resized to fit)
70+
* *{widgetName}.tile.dark.png* sets the dark-mode equivalent to *{widgetName}.tile.png*
7171
* Optionally, some widget-related resources, preferably located next to the file which contains the client component
72-
* Note that all CSS files you add (except the one located in the **lib** sub-directory) will automatically be loaded in an app via the widget
72+
* Note that all CSS files you add (except the one located in the **lib** sub-directory) will automatically be loaded in an app via the widget
7373

74-
Naming your widget package file after the `widgetName` is best practice. Also, a widget package can include multiple widgets by putting several of the above items in the same widget package. However, creating such packages is *not recommended*.
74+
Naming your widget package file after the `widgetName` is best practice. Also, a widget package can include multiple widgets by putting several of the above items in the same widget package. However, creating such packages is *not recommended*.
7575

7676
The *package.xml* file has the following structure:
7777

@@ -124,9 +124,9 @@ Here is an example of a widget’s attributes section:
124124
This section is generated based on options chosen while running the Mendix Pluggable Widget Generator. You will rarely need to modify it after it is generated. This sample widget features several widget attributes:
125125

126126
* `id`<a id="widget-id"></a> — This the fully qualified name of the widget called widget ID. Using widget ID, the Mendix Platform distinguishes widgets from each other. Widget ID should never be changed after a widget is used in an app or is published in the Marketplace. Reverse domain-style names, as in example above, are recommended.
127-
* `pluginWidget` — This should always be set to `true`. This way, the Mendix Platform can distinguish between the newer pluggable widgets and the older custom widgets.
127+
* `pluginWidget` — This should always be set to `true`. This way, the Mendix Platform can distinguish between the newer pluggable widgets and the older custom widgets.
128128
* `offlineCapable` — This shows if a widget can work while an app is offline. For more information on offline apps, see the [Offline-First](/refguide/offline-first/) guide. A widget that fetches information from a third-party API, for example a widget that fetches airline ticket prices, could not function without an internet connection. If a widget cannot work offline, Mendix Studio Pro will forbid its use on pages that must be available offline.
129-
* `supportedPlatform` — This shows the platforms a widget is compatible with. `Web` describes widgets that are only compatible with web and hybrid mobile apps. `Native` describes widgets that are compatible with native mobile apps.
129+
* `supportedPlatform` — This shows the platforms a widget is compatible with. `Web` describes widgets that are only compatible with web and hybrid mobile apps. `Native` describes widgets that are compatible with native mobile apps.
130130

131131
### Widget Description {#widget-description}
132132

@@ -387,7 +387,7 @@ Some properties can or must have more attributes or tags. This depends on the `t
387387

388388
* `key`<a id="key-attribute"></a> — This element is a property's unique, single-word identifier. The `key` elements are used internally to identify properties, so they should never change after a widget is used in an app or is published in the Marketplace. A `key` element also identifies a property value when it is passed to a pluggable widget’s client component.
389389
* `type`<a id="type-attribute"></a> — This element is a property's type. The `type` element defines which values can be configured for a property, which UI is used in the Mendix Studio Pro, and what type of value a pluggable widget’s client component receives.
390-
* `caption` — This element is a short label identifying a property to a modeling developer. The first letter of a caption should be capitalized.
390+
* `caption` This element is a short label identifying a property to a modeling developer. The first letter of a caption should be capitalized.
391391
* `description` — This element is a longer description of a property. A description should be capitalized and limited to one or two sentences.
392392

393393
Here is how a caption and description look in Studio Pro:

0 commit comments

Comments
 (0)