Skip to content

Commit

Permalink
Initial update for interactions flow API
Browse files Browse the repository at this point in the history
  • Loading branch information
krice-nw committed Sep 13, 2020
1 parent e44cd9e commit 77c467f
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
8 changes: 8 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Change Log

XD Release 33.0.12 (September 2020)
-------------------------------------

### New APIs

The [flows](./reference/interactions.md#module_interactions-flows) API Returns an array of [FlowInfo] for all flows across the entire document.


XD Release 32.0.12 (August 2020)
-------------------------------------

Expand Down
28 changes: 28 additions & 0 deletions reference/interactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,14 @@ See [Interaction documentation](#Interaction) below for an example of what an In

* [interactions](#module_interactions)
* [.homeArtboard](#module_interactions-homeArtboard) : <code>?Artboard</code>
* [.flows](#module_interactions-flows) : <code>!Array&lt;FlowInfo&gt;</code>
* [.allInteractions](#module_interactions-allInteractions) : <code>!Array&lt;!{triggerNode: !SceneNode, interactions: !Array&lt;!Interaction&gt;}&gt;</code>
* Typedefs:
* [Interaction](#Interaction)
* [Trigger](#Trigger)
* [Action](#Action)
* [Transition](#Transition)
* [FlowInfo](#FlowInfo)


## Typedefs
Expand Down Expand Up @@ -169,6 +171,18 @@ Animation style with which `"goToArtboard"` and `"overlay"` actions transition f
| duration | number | Length of animation in seconds. |
| easing | string | One of: `"linear"`, `"ease-in"`, `"ease-out"`, `"ease-in-out"`, `"wind-up"`, `"bounce"`, `"snap"` |

<a name="flowInfo" id="flowInfo"></a>

### Typedef flowInfo
A `flow` or a `design flow` can be defined as a series or set of artboards starting from one artboard (called a home artboard), which are connected to other artboards or screens via wires or interactions.

| Property | Type | Description |
| --- | --- | --- |
| name | string | User gesture or other event which will trigger the action. |
| homeArtboard | \![Artboard](./scenegraph.md#Artboard) | Artboard from which a particular flow or a prototype experience begins |
| url | string | URL is the latest published link associated with a particular flow and can be `null` in case no link is published for that flow |

NOTE: All `url` returned via {@link interactions#flows} are related to published flows and are usually a subset of the URLs returned via {@link cloud#getSharedArtifacts}. However, the reverse may or may not always hold true.

* * *

Expand All @@ -187,6 +201,20 @@ In case there are multiple interactive prototype experiences (flows), implying m
**See**: [`Artboard.isHomeArtboard`](./scenegraph.md#Artboard-isHomeArtboard)


* * *

<a name="module_interactions-flows"></a>

### *interactions.flows : <code>!Array&lt;flowInfo</code>*
Returns a collection of information on *all* flows across the entire document.

**Since**: XD 33

A document can have zero or multiple (one or more than one) flows and can therefore have zero or multiple home artboards. Each entry in the return array represents a `FlowInfo` object.

**Kind**: static property of [<code>interactions</code>](#FlowInfo)
**Read only**: true

* * *

<a name="module_interactions-allInteractions"></a>
Expand Down

0 comments on commit 77c467f

Please sign in to comment.