Skip to content

Commit

Permalink
fix indentation for building documentation successfully
Browse files Browse the repository at this point in the history
  • Loading branch information
gsambrotta committed Nov 8, 2024
1 parent c12261a commit bae6ff1
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 110 deletions.
2 changes: 1 addition & 1 deletion docs/testing/tips.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Notes for Cypress testing
=========================

"https" not "http"
---------------
------------------

When tests are run within GitHub's environments, calls to external urls must be https, otherwise they will not run.
This applies even to fixtures that don't even make external requests.
Expand Down
14 changes: 6 additions & 8 deletions docs/workflow/blocks/actions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,9 @@ Supported properties

- **label** (string) - the text for the button label
- **id** (string) - the unique identifier for the button
- **color** (string) - passed as the “color” attribute to the material button. Use one of the supported
Material color values, such as “primary”, “warn”, “accent”. Leave as “default” to use the default button styling for a plain button.
- **enabledGetter** (string) - A value from the state or context. Based on this value, it generates an "enabled" property on the button.
The button will be shown as disabled (greyed out) or enabled accordingly. The default value of this property is `true`. After
the block is loaded, it will automatically add a property to the block json: `"enabled": true`.
If `enabledGetter` is set to `false` the automatic property will be then shown as `"enabled": false`.
- **valueGetters** (string) - A value that will be pass as context to whichever action is being executed.
This is a JMESPath mapping.
- **color** (string) - passed as the “color” attribute to the material button. Use one of the supportedMaterial color values, such as “primary”, “warn”, “accent”. Leave as “default” to use the default button styling for a plain button.
- **enabledGetter** (string) - A value from the state or context. Based on this value, it generates an "enabled" property on the button. The button will be shown as disabled (greyed out) or enabled accordingly. The default value of this property is `true`. After the block is loaded, it will automatically add a property to the block json: `"enabled": true`. If `enabledGetter` is set to `false` the automatic property will be then shown as `"enabled": false`.
- **valueGetters** (string) - A value that will be pass as context to whichever action is being executed. This is a JMESPath mapping.
- **blocks** (array) - the list of workflow items to run when this button is pressed.

Example
Expand All @@ -47,6 +42,7 @@ This example shows two buttons. The first one dispatches an asynchronous command
block in order to start the inner workflow so that it runs and signals completion to the outer workflow.

.. code-block:: json
{
"type": "actions",
"buttons": [
Expand Down Expand Up @@ -77,6 +73,7 @@ In this example, we are specifying which flow to load when the button is clicked
You can find this example on the `Flow Cloud <https://app.kendra.io/workflowCloud/listWorkflows>`, in the list of workflows.

.. code-block:: json
{
"type": "actions",
"buttons": [
Expand Down Expand Up @@ -130,6 +127,7 @@ To do so we take values we have saved in the state and assign them to the `enabl
After the block as loaded, the `enabled` property will be set on the button:

.. code-block:: json
{
Expand Down
60 changes: 30 additions & 30 deletions docs/workflow/blocks/gosub.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,42 +42,42 @@ In this way the data will be passed down to the embedded Flow.
}
{
"type": "form",
"jsonSchema": {
"type": "object",
"properties": {
"asset_title": {
"title": "Asset",
"type": "string"
},
"type": "form",
"jsonSchema": {
"type": "object",
"properties": {
"asset_title": {
"title": "Asset",
"type": "string"
},
"location": {
"title": "Location",
"type": "string"
},
"asset_manager_id": {
"type": "string",
"title": "Asset Manager"
}
}
},
"uiSchema": {
"location": {
"title": "Location",
"type": "string"
"ui:widget": "remote-image"
},
"asset_manager_id": {
"type": "string",
"title": "Asset Manager"
}
}
},
"uiSchema": {
"location": {
"ui:widget": "remote-image"
},
"asset_manager_id": {
"ui:widget": "blocks",
"blocksConfig": {
"blocks": [
{
"type": "gosub",
"adapterName": "culturebanked",
"workflowId": "artist2-select-asset-manager"
}
]
"ui:widget": "blocks",
"blocksConfig": {
"blocks": [
{
"type": "gosub",
"adapterName": "culturebanked",
"workflowId": "artist2-select-asset-manager"
}
]
}
}
}
}
}
In the example above, there are two Flows: the primary Flow, where the above configuration is written, and a secondary Flow with the Adapter "culturebanked" and Workflow ID "artist2-select-asset-manager".
The "artist2-select-asset-manager" Flow is rendered as part of the parent Flow and is initiated with the data { "asset_manager_id": "1" }.
Expand Down
20 changes: 11 additions & 9 deletions docs/workflow/blocks/http.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,14 @@ Pagination
If a HTTP API returns paginated results with a standard link header, to fetch paginated API results, set the followPaginationLinksMerged option to true. This will fetch all pages of results and return the combined set of results from all the pages.

With a proxy:
```json
{
"type": "http",
"method": "GET",
"endpoint": "https://example.com/paginated",
"useProxy": true,
"followPaginationLinksMerged": true
}
```

.. code-block:: json
{
"type": "http",
"method": "GET",
"endpoint": "https://example.com/paginated",
"useProxy": true,
"followPaginationLinksMerged": true
}
8 changes: 4 additions & 4 deletions docs/workflow/blocks/mapping.rst
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ Examples:
replace(data.email, '.', '') // Output: "[email protected]"
8. replaceAll
-----------
-------------

Returns a string replacing all instances of a substring with another substring.

Expand All @@ -415,7 +415,7 @@ Examples:
trim(' John Doe ') // Output: "John Doe"
10. now
------
--------

Returns the current UTC timestamp in RFC 7231 format.

Expand All @@ -441,7 +441,7 @@ Examples:
12. omit
--------

Creates an object composed of enumerable properties from the input objects omitting the properties named in the *names array.
Creates an object composed of enumerable properties from the input objects omitting the properties named in the *names* array.

Examples:

Expand Down Expand Up @@ -622,7 +622,7 @@ Examples:
markdown('## Header') // Output: "<h2 id=\"header\">Header</h2>"
23. btoa
-------
---------

Encodes a string in base-64.

Expand Down
119 changes: 61 additions & 58 deletions docs/workflow/blocks/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ Default config
}
Supported properties
--------------------reference
--------------------

- **fieldLabel**: The label displayed above the select widget.
- **labelGetter**: A property used to specify the field in the data for display as labels in the select options.
**valueField**: Specifies the field in the data that holds the value for each option.
**outputGetter**: Defines how the selected option’s value is output.
- **valueField**: Specifies the field in the data that holds the value for each option.
- **outputGetter**: Defines how the selected option’s value is output.


Examples
Expand Down Expand Up @@ -65,70 +65,73 @@ The list must follow a specific data structure, as shown below.
// Output of the debug
data: {
"managerSelected": "John Smith"
}
context: {
"managers": {
"anyOf": [
{
"title":"Will Teather"
"const":1
},
{
"title":"John Smith"
"const":2
},
{
"title":"Ross Sullivan"
"const":3
}
]
{
"data": {
"managerSelected": "John Smith"
}
"context": {
"managers": {
"anyOf": [
{
"title":"Will Teather"
"const":1
},
{
"title":"John Smith"
"const":2
},
{
"title":"Ross Sullivan"
"const":3
}
]
}
}
}
{
"type": "form",
"hasSubmit": false,
"jsonSchema": {
"type": "object",
"properties": {
"managerSelected": {
"title": "Select an asset manager",
"$ref": "#/definitions/context/managers"
"type": "form",
"hasSubmit": false,
"jsonSchema": {
"type": "object",
"properties": {
"managerSelected": {
"title": "Select an asset manager",
"$ref": "#/definitions/context/managers"
}
}
}
},
"uiSchema": {}
}
},
"uiSchema": {}
}
TIP: Use this formula in a mapping block to transform an array into the "anyOf" data structure needed by the reference block:



```
// Example of incoming data
[
{
"name":"Will Teather"
"asset_manager_id":1
},
{
"name":"John Smith"
"asset_manager_id":2
},
{
"name":"Ross Sullivan"
"asset_manager_id":3
}
]
.. code-block:: json
// Example of incoming data
[
{
"name":"Will Teather"
"asset_manager_id":1
},
{
"name":"John Smith"
"asset_manager_id":2
},
{
"name":"Ross Sullivan"
"asset_manager_id":3
}
]
{
"anyOf": data[*].{
"title": name,
"const": asset_manager_id
}
}
```
{
"anyOf": data[*].{
"title": name,
"const": asset_manager_id
}
}

0 comments on commit bae6ff1

Please sign in to comment.