Skip to content

Commit

Permalink
#1893 New common-canvas documentation required - final cleanup (#1934)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomlyn authored May 8, 2024
1 parent 2798c5a commit 8bda732
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion docs/pages/03-common-canvas.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ To control the canvas you'll need an instance of the canvas controller. Create a

### Step 4 : Set the palette data

Next you'll need to populate the palette data. This step is optional if you don't want to use the palette and just want to display a flow (step 5) instead.
Next you'll need to populate the palette data. This step is optional if you don't want to use the palette.

The palette data will specify the nodes (split into categories) that will appear in the palette. This is done by calling the canvas controller with:

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/03.06.01-node-customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ const canvasConfig = {
};
```

### Overriding the node layout fiels for individual nodes or groups of nodes
### Overriding the node layout fields for individual nodes or groups of nodes

If you want each node, or category of nodes, to have a different layout based on some criteria you can use the [layoutHandler callback method](03.03-callbacks.md#layouthandler). When you specify this callback method to Common Canvas, it will be called for each node on the canvas, during initialization and, occasionally, at other times.

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/03.06.02-comment-customization.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Comment Customizaiton
# Comment Customization

Comments can be customized by the application in the following ways:

Expand Down
36 changes: 18 additions & 18 deletions docs/pages/04-common-properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ Next, you'll need to populate propertiesInfo, which is a required prop, with:

```js
this.propertiesInfo = {
parameterDef: this.parameterDef, // Parameter definitions/hints/conditions [Required]
appData: "{user-defined}", // User data returned in applyPropertyChanges [Optional]
additionalComponents: "{components}", // Additional component(s) to display [Optional]
messages: "[node_messages]", // Node messages array [Optional]
expressionInfo: this.expressionInfo, // Information for expression builder [Optional],
initialEditorSize: "{size}", // This value will override the value of editor_size in
// uiHints. This can have a value of "small", "medium",
// "large", or null [Optional]
id: "{id}" // Unique parameter definition ID [Optional]
parameterDef: this.parameterDef, // Required - Parameter definitions/hints/conditions
appData: "{user-defined}", // Optional - User data returned in applyPropertyChanges
additionalComponents: "{components}", // Optional - Additional component(s) to display
messages: "[node_messages]", // Optional - Node messages array
expressionInfo: this.expressionInfo, // Optional - Information for expression builde
initialEditorSize: "{size}", // Optional - This value will override the value of
// editor_size in uiHints. This can have a value of
// "small", "medium", "large", or null
id: "{id}" // Optional - Unique parameter definition ID
}
```
See the Common Properties [Parameter Definition](04.01-parameter-definition.md) page for more details about 'paramDef'.
Expand All @@ -61,12 +61,12 @@ The optional messages attribute can be used to set validation messages associate
formData: this.formData,
appData: "{user data returned back in applyPropertyChanges}", // Optional
additionalComponents: "{additional control(s) to display}", // Optional
messages: "[node_messages]", // Node messages array [Optional]
expressionInfo: this.expressionInfo, // Information for expression builder [Optional]
initialEditorSize: "{size}", // This value will override the value of editor_size in
// uiHints. This can have a value of "small", "medium",
// "large", or null [Optional]
id: "{id}" // Unique parameter definition ID [Optional]
messages: "[node_messages]", // Optional - Node messages array
expressionInfo: this.expressionInfo, // Optional - Information for expression builder
initialEditorSize: "{size}", // Optional - This value will override the value of
// editor_size in uiHints. This can have a value of
// "small", "medium", "large", or null
id: "{id}" // Optional - Unique parameter definition ID
}
```
See the [formData schema](https://github.com/elyra-ai/pipeline-schemas/tree/master/common-canvas/form)
Expand Down Expand Up @@ -119,9 +119,9 @@ applyPropertiesEditing(closeEditor)

### Using CommonProperties in CommonCanvas right-flyout panel

[Common Canvas](03-common-canvas.md) has a [right-flyout panel](03-common-canvas.md#right-flyout-panel-parameters) that can render a React object. It can be used to render Common Properties in a flyout panel.
[Common Canvas](03-common-canvas.md) has a [right-flyout panel](03-common-canvas.md#right-flyout-panel-parameters) that can render a React object. It can be used to render Common Properties in the right-flyout as follows:

Create a CommonProperties object with containerType set to "Custom" and rightFlyout set to true.
Create a `<CommonProperties>` object with `containerType` set to `"Custom"` and `rightFlyout` set to `true`.
```html
const rightFlyoutContent = (
<CommonProperties
Expand All @@ -132,7 +132,7 @@ Create a CommonProperties object with containerType set to "Custom" and rightFly
);
```

Pass the CommonProperties object into CommonCanvas's `rightFlyoutContent` props. Also set the `showRightFlyout` boolean to tell CommonCanvas when the rightFlyout should be displayed (true) or hidden (false).
Pass the `<CommonProperties>` object into the `rightFlyoutContent` prop of Common Canvas. Also, set the `showRightFlyout` boolean to tell Common Canvas the rightFlyout should be displayed (true) or hidden (false).
```html
<CommonCanvas
canvasController={canvasController}
Expand Down

0 comments on commit 8bda732

Please sign in to comment.