Releases: elyra-ai/canvas
v13.13.0
Feature Enhancements
Common Canvas
#2266 Custom port images
The specification for the way ports are displayed has been changed in this release. The following fields in the node layout object (enableNodeLayout
in the canvas config object) have been removed:
- outputPortObject
- outputPortImage
- outputPortWidth
- outputPortHeight
They have been replaced with a field called outputPortDisplayObjects
. This contains an array with an element that corresponds to each output port specified for the nodes. The elements of the array can have different structures as follows:
Either:
{ type: “circle” } // Draws a circle to represent the port
Or:
{ type: “circleWithArrow” } // Draws a circle with an arrow head (shown when port is connected) to represent the port.
Or:
{ type: “image”, src: “path/picture.svg”, width: 10, height: 10 } // Displays an image for the port
Or:
{ type: “jsx”, src: (<FaceCool />), width: 10, height: 10 } // Displays a JSX object for the port
If the node has more output ports (outputs) than elements in the array the last element from the array will be used for the remaining ports. So if you want all ports to be displayed the same, just specify one element in the array.
The same change has been made for output ‘guide objects’. A Guide object is the image displayed at the end of the new link line as it is dragged away from the node. These fields have been removed:
- outputPortGuideObject
- outputPortGuideImage
They have been replaced with the field outputPortGuideObjects
which is an array with the same structure as for outputPortDisplayObjects
.
The same change has been made for input ports. These fields have been removed:
- inputPortObject
- inputPortImage
- inputPortWidth
- inputPortHeight
and have been replaced by inputPortDisplayObjects
.
And also these fields have been removed:
- inputPortGuideObject
- inputPortGuideImage
and have been replaced by the field inputPortGuideObjects
These changes allow something like this where each output port can have a different image:
Notes:
- The
Prompt
sample application has been altered to use this new approach. - The old fields will continue to work in the current release but will be removed in the next major release (which is not that far in the future). It is therefore strongly recommended, if your code is overriding any of the defaults for these fields, that you convert your code to use the new arrays. This will save having migration work in the future.
#2276 Allow click on a port to cause an action
The user can now click on a port which will cause the clickActionHandler
callback to be called with a source
parameter object that contains information about the node and port that was clicked.
The Prompt
sample application in the test harness has been updated to enable this, so the user can click a port to display a link and prompt for that port.
Common Properties
- Just bug fixes
Issues Resolved
- #2261 Properties sizing button hidden by bottom panel by @srikant-ch5 in #2262
- #2268 Jest tests broken in Elyra Canvas build by @tomlyn in #2269
- #2266 Custom port images by @tomlyn in #2267
- #2271 Use React Testing Library for common-properties tests - Part 2-… by @Jerinjk14 in #2272
- #2274 Document enableFocusOnMount config field by @tomlyn in #2275
- #2276 Allow click on a port to cause an action by @tomlyn in #2277
- #2279 Have a property not to display the context toolbar when the use… by @tomlyn in #2280
- #2270 Canvas palette not loading/displayed in Safari browser by @tomlyn in #2278
Full Changelog: v13.12.0...v13.13.0
v13.12.0
Feature Enhancements
Build
#2205 Upgrade @carbon/react to 1.71.0
Carbon react has been upgraded to 1.17.0
Common Canvas
#2137 Enable Common Properties Right Flyout resize using drag
The Right Flyout can now be resized horizontally by dragging its left border.
To enable this behavior, set the enableRightFlyoutDragToResize
canvas configuration field to true. The default value is false.
When hovering over the left border, the cursor will change to indicate that resizing is available. The flyout's width can then be adjusted by dragging the border, allowing it to expand or collapse. The maximum width the flyout can be dragged to is 70% of the total available width.
This shows the basic behavior for the right flyout in the test harness:
This shows the usage when Common Properties is used to provide the content in the right flyout:
When Common Properties provides the content, the user may also use the arrow buttons to size the flyout:
The resize button disappears as soon as flyout is resized by dragging. To restore the resize button flyout can be dragged back to its smallest possible width to interact with resize button to adjust as per width set in the paramDef.
#2252 Create a sample app that shows a prompt interface
A new sample application, called "Prompt", has been added to the test harness to display a prompt interface, where the user is prompted for the next node in the flow instead of having to drag nodes from the palette and create links. This uses the function in Common Canvas that allows the body of a node to be displayed as a React object.
#1438 Accessibility: Tabbing - Keyboard navigation of canvas objects (Part 2)
This feature implements extensive support for keyboard navigation with the flow editor and Common Canvas components in general. The keyboard user can now:
- Pan, zoom and zoom to fit the canvas
- Display a context menu or context toolbar for canvas object and the canvas background
- Move node and comments around on the canvas
- Size comments and node (when enabled)
- Add nodes to the canvas from the palette
- Create links between nodes
These functions are enabled when the enableKeyboardNavigation
canvas config field is set to true
. In the test harness this can be switched on in the 'Operational' section of the Common Canvas flyout in the test harness.
The shortcut keys used with Keyboard Navigation are documented in the Keyboard Support page of the documentation.
This feature can be thought of as a work in progress. The Design team will assess what has been implemented and feedback on any needed improvements or changes to keyboard shortcuts. Consequently, it is recommended that applications DO NOT enable this function for use by customers at this time.
Common Properties
- Just bug fixes
Issues Resolved
- Update docs with LFAI onboarding requirements by @akchinSTC in #1241
- #2232 Expression Builder: After editing in flyout, user needs to click icon twice to open Editor by @mikieyx in #2233
- #2235 Rtl panel migration-Part1 by @Jerinjk14 in #2217
- #2236 [SDG] Differential privacy ux issues - Fix font type for properties label by @veenas1 in #2237
- #2238 Write function to compare transform string in Cypress tests by @Jerinjk14 in #2225
- #2213 Table toolbar should not be shown for single select tables by @mikieyx in #2214
- #2205 Upgrade @carbon/react to 1.71.0 by @nmgokhale in #2243
- #2137 Resize Right Flyout using drag by @srikant-ch5 in #2224
- #2244 Dragging Bottom Panel beyond its max height hides Right Flyout Buttons by @srikant-ch5 in #2245
- #2246 Dragging Bottom Panel beyond its Max Height with Top Panel open hides Right Flyout Buttons by @srikant-ch5 in #2247
- #2252 Create a sample app that shows a prompt interface by @tomlyn in #2253
- #2250 Automatically show properties editor after choosing file from s… by @Jerinjk14 in #2251
- #2248 After table row is deleted, propertyListener callback has same … by @Jerinjk14 in #2249
- #2254 setPipelineFlow cannot work when only primary_pipeline changed by @tomlyn in #2255
- #1438 Accessibility: Tabbing - Keyboard navigation of canvas objects (Part 2) by @tomlyn in #2241
- #2257 Action Image alignment issue by @srikant-ch5 in #2258
- #2259 Common Properties Resize Button is not shown by @srikant-ch5 in #2260
New Contributors
- @Jerinjk14 made their first contribution in #2217
Full Changelog: v13.11.1...v13.12.0
v13.11.1
Just bug fixes
Issues Resolved
- #2220 SubAreas sample toolbar - 'Save' button should have a label by @mikieyx in #2221
- #2226 Fixed cypress tests in Actions by @nmgokhale in #2227
- #2222 Create Cypress test cases for WYSIWYG comments by @PRINCESANCHEZ in #2223
- #2230 Clicking cancel or close in the expression builder isn't resetting property values back to the original values by @mikieyx in #2231
- #2228 Fixed table header looks incorrect when table toolbar is not displayed by @nmgokhale in #2229
- #2203 Create test cases for new function to control contents of Left … by @PRINCESANCHEZ in #2204
Full Changelog: v13.11.0...v13.11.1
v13.11.0
Feature Enhancements
Common Canvas
#2215 Fix accessibility issues for palette search
Resolved an accessibility violation caused by duplicate id attributes (palette-flyout-search). The id was removed from the Search component, as it is not mandatory in Carbon. This change resolves the issue and ensures Hopscotch tours functions properly without conflicts from duplicate id’s.
Common Properties
#2120 Added icon support for dropdown menus
The behavior of dropdown menus has been enhanced to support an icon switch feature. When this feature is enabled, a user-defined icon can be displayed next to items in dropdown menus.
This new functionality uses a callback function that allows users to pass in custom icons for any dropdown or specific dropdown values. The icon will appear based on the return value of the callback, making it flexible to use different icons for different dropdown items.
An example of this has been added to the enum value orange
in the oneofselect
dropdown in oneofselect_paramDef
.
#2199 Allow expression text editor to be expandable
Expression Builder editor can be expanded by dragging vertically. Drag can enabled by hovering over bottom right corner and resize as per requirement.
Issues Resolved
- #1438 Accessibility: Tabbing - Keyboard navigation of canvas objects by @tomlyn in #2197
- #2186 Expression Builder: Operation symbols and add field buttons cannot add at the beginning of expression by @mikieyx in #2187
- #2199 Allow expression text editor to be expandable by @srikant-ch5 in #2200
- #2201 Cannot read properties of null (reading 'x') when opening right… by @tomlyn in #2202
- #2122 Expression builder - After expression validation, chars need to be entered twice to reflect by @mikieyx in #2123
- #2207 Scrollbar for WYSIWYG annotation note can not be clicked to scroll by @tomlyn in #2208
- #2209 Regression - Additional CSS formats for comment borders are not… by @tomlyn in #2210
- #2211 Fix Accessibility Issues for palette by @PRINCESANCHEZ in #2212
- #2215 Fix Accessibility Issues for palette search by @PRINCESANCHEZ in #2216
- #2218 Fix accessibility violations by @PRINCESANCHEZ in #2219
Full Changelog: v13.10.1...v13.11.0
v13.10.1
Fixpak
Issues Resolved
- #2189 Fixed actions image cypress test by @nmgokhale in #2190
- Bump rollup from 2.60.1 to 2.79.2 in /canvas_modules/common-canvas by @dependabot in #2188
- #2192 Added icon support for dropdown menus by @PRINCESANCHEZ in #2120
- #2193 Updated matching px/rem values to Carbon spacing tokens by @PRINCESANCHEZ in #2102
- #2194 Prevent canvas refresh when palette header is specified by @tomlyn in #2195
Full Changelog: v13.10.0...v13.10.1
v13.10.0
Feature Enhancements
Build
#2180 Upgrade to react-redux@8
Elyra Canvas has been upgraded to use react redux v8 . Please npm install
to pick up the latest.
Common Canvas
#2170 Toolbar to support Toggletip, and it should popup like tooltip
The behavior of toolbar tooltips has been changed. The mouse cursor can now be ‘hovered over’ the tooltip, and the tooltip will remain displayed until the mouse cursor is moved away from the tooltip.
This allows applications to display action items (such as buttons or links) within the body of the tooltip. The user can then hover the mouse over the tooltip and click the action item or even select text in the tooltip and copy it to the clipboard.
The body of the tooltip can be provided using the currently supported tooltip
field for the toolbar button — this can be either text or a JSX expression. An example of this has been added to the ‘SubAreas’ sample toolbar in the Test Harness. Here is the JSX expression and this is how it is included in the toolbar.
#2176 Add button to node palette
A new canvas config field called enablePaletteHeader
has been added in this release. This can be set to a JSX object which will be displayed in the palette, positioned below the Search bar and above the categories and nodes. This JSX can be used to display, say, a button for launching a data browser.
The palette header is only displayed when the palette is in its wide mode and it is not displayed when the user searches nodes using the search bar.
An example of this has been added to the Stages
sample application in the Test Harness:
#2172 Make automatic focus on CommonCanvas opt-out
The current behavior of Common Canvas is that keyboard focus is set on the flow editor when Common Canvas first appears to force keyboard shortcuts to go the the canvas without the user having to click on the canvas first. Some applications do not want that behavior.
A new canvas config field called enableFocusOnMount
has been added. This is a booelan
that default to true
which means the keyboard focus will automatically be set on the flow editor part of the UI when Common Canvas is first created. Setting it to false
disables this behavior.
const canvasConfig = {
enableFocusOnMount: false
};
#2132 Need ability to add custom icon to notificationConfig
and
#2151 Allow applications to customize the default toolbar buttons' icons, position in toolbar, etc.
Currently, Common Canvas automatically adds to the canvas toolbar:
- a palette icon (to the far left of the toolbar) when a palette is configured
- a notification icon (to the far right of the toolbar) when a notification panel has been configured
Previously the application could not customize these icons. In this release, the icon and other attributes that are used for the toolbar buttons can now be customized. This can be done by specifying an entry in the toolbar config (in either the leftBar
or rightBar
arrays) using the actions togglePalette
and toggleNotificationPanel
.
Here's an example showing a customized palette icon (with label) and a customized Notification Panel icon:
See the documentation
#2158 Update palette open/close icon in toolbar
As agreed by the Elyra Canvas design council the icons for opening and closing the palette have been changed to use icons with little arrows showing the direction.
#2146 Add a Configuration flag to allow a scroll bar for Annotations and Comments
In this release, comments (either regular or WYSIWYG), will become scrollable if their dimensions are too small to fit the contents. This is now the default behavior and cannot be turned off. When a comment is scrollable and the mouse is hovered over the comment the scroll gesture will scroll the text however if the comment is not scrollable (because its dimensions are big enough for the text) the scroll gesture will zoom the canvas, as before.
In addition, some applications do not want the auto-size feature which automatically increases the size of the comment to accommodate text as it is entered. The auto-size feature can be switched off by setting the commentAutoSize
in the canvasLayout
field, thus:
const canvasConfig = {
enableCanvasLayout: {
commentAutoSize: false
}
}
#2140 WYSIWYG comment should show current parameter selections
The toolbar for WYSIWYG comments now shows the current selections for the toolbar controls . For example, like this:
For colors and 'boolean' values like bold
like this:
Common Properties
Just bug fixes
Issues Resolved
- #2128 Toggle buttons controlling Notification Panel not working in Te… by @tomlyn in #2129
- #2132 Need ability to add custom icon to notificationConfig by @tomlyn in #2133
- #2130 Link hover styles aren't applied in Firefox when using Handles by @srikant-ch5 in #2131
- #2135 Fix clickOutside fuctions in Toolbar by @tomlyn in #2136
- Bump webpack from 5.91.0 to 5.94.0 in /canvas_modules/harness by @dependabot in #2134
- #2141 Latest version of Chrome debugger causing redux to run slowly i… by @tomlyn in #2142
- #2140 WYSIWYG comment should show current parameter selections by @tomlyn in #2143
- #2144 Animations for Properties Panel by @srikant-ch5 in #2145
- #2117 Use React Testing Library for common-properties tests - Part 1 - Controls + conditions by @mikieyx in #2118
- #2146 Add a Configuration flag to allow a scroll bar for Annotations … by @tomlyn in #2147
- #2154 Japanese translation in jobs UI by @PRINCESANCHEZ in #2155
- #2156 Scroll for comments should be 'auto' and not explicitley 'scroll' by @tomlyn in #2157
- #2151 Allow applications to customize the default toolbar buttons' ic… by @tomlyn in #2153
- #2158 Update palette open/close icon in toolbar by @tomlyn in #2159
- #2125 Enhanced visibility of highlighted text by @PRINCESANCHEZ in #2126
- #2166 Nodes with looped links crash the UI in the test harness by @tomlyn in #2167
- Bump body-parser from 1.20.2 to 1.20.3 in /canvas_modules/harness by @dependabot in #2165
- #2105 Parallax sample app does not look good in dark mode by @PRINCESANCHEZ in #2161
- #2172 Make automatic focus on CommonCanvas opt-out by @tomlyn in #2174
- #2168 Toolbar is cropped when expanding Accordion inside Common Properties by @srikant-ch5 in #2169
- Bump express from 4.19.2 to 4.20.0 in /canvas_modules/harness by @dependabot in #2164
- #2149 Action Button width Issue for Custom Editor Size by @srikant-ch5 in #2150
- #2176 Add button to node palette by @tomlyn in #2177
- #2178 Disable scroll in NumberField by @srikant-ch5 in #2179
- #2181 Enable Stages sample app to use palette header by @tomlyn in #2182
- #2162 Fix vertical links crossing over each other by @tomlyn in #2163
- #2170 Toolbar (toolbarConfig) to support Toggletip, and it should popup like tooltip (shows up when mouse hover on it) by @mikieyx in #2171
- #2180 Upgrade to react-redux@8 by @tomlyn in #2183
- #2184 Add JSX decoration example to Stages sample application by @tomlyn in #2185
Full Changelog: v13.9.1...v13.10.0
v13.9.1
v13.9.0
Common Canvas
#2115 Support collapsed super node resizingCollapsed supernodes can now be resized when the config field enableResizableNodes
is set to true
. This behavior is separate to the resizing behavior when the supernode is expanded to display the sub-flow in-place
.
Common Properties
#2108 Need shouldFilterItem support for oneofselect control
The Oneofselect Control now filters items by default based on the input text.
Issues Resolved
- #2106 Fix node editor resize button by @caritaou in #2107
- #2108 Need shouldFilterItem support for oneofselect control by @srikant-ch5 in #2109
- #2072 fix: added explicit check for react version by @sean-anderson-ibm in #2114
- #2115 Support collapsed super node resizing by @tomlyn in #2116
- #2110 Additional Text is appended to Node Tooltip heading in some nodes by @srikant-ch5 in #2111
- #2112 Title action buttons style updates by @caritaou in #2113
Full Changelog: v13.8.0...v13.9.0
v13.8.0
Common Canvas
Just bug fixes
Common Properties
#2088 Include actions in properties title editor
Parameter definitions now supports a title_info
section in the uihints
(elyra-ai/pipeline-schemas#148) where a list of actions can be specified to be displayed in the title section. These actionRefs will be mapped to actions defined in the action_info
section.
Issues Resolved
- #2088 Include actions in properties title editor by @caritaou in #2089
- #2088 Render actions in title outside of groups by @caritaou in #2097
- #2088 Title actions should not be displayed after form by @caritaou in #2098
- #2099 Palette overflow-y set to auto by @caritaou in #2100
- #2103 Fix build failure by @caritaou in #2104
- #2088 Title info doc updates by @caritaou in #2101
- #2020 expression editor allow for double click to add value by @veenas1 in #2021
Full Changelog: v13.7.0...v13.8.0
v13.7.0
Feature Enhancements
Common Canvas
#2090 Add new left side panel to allow toggling between palette and search panel
This requirement has two parts:
-
The application needs control over what is displayed in the left flyout. Based on the user clicking buttons in the toolbar, sometimes the Palette is displayed and sometimes a Search panel is displayed showing a sophisticated search UI.
-
The palette (or any replacement search panel) should be displayable underneath the toolbar rather that at the side of the toolbar.
Requirement 1
Common Canvas has default behavior for the palette. This is enabled when the canvas config field enablePaletteLayout
is set to “Flyout”. This default behavior involves:
- automatically displaying a palette icon as the left most button in the toolbar
- handling clicks on the button to control the opening and closing of the Palette in the left flyout
- allowing the application to specify whether the “closed” palette is shown as a narrow palette or hidden completely. (This is controlled by the
enableNarrowPalette
canvas config field).
This default behavior might conflict with any control the application is given over the contents and behavior of the left-flyout. Therefore, to implement this requirement, the default palette behavior and the ability to control the left flyout have been separated as follows.:
- When the default palette behavior is switched on (enablePaletteLayout === "Flyout") Common Canvas manages everything to do with the left flyout and the left flyout cannot be controlled by the application.
- When default palette behavior is switched off (enablePaletteLayout === "None") the application must handle all aspects of the left flyout.
Consequently, to implement this requirement with this Elyra Canvas release, the application must do these things:
- Disable the default Palette behavior by setting
enablePaletteLayout
to “None” - Add whatever buttons are required to the toolbar for opening the palette or search panels
- Control the display and contents of the left-flyout based on which toolbar buttons are clicked
To allow for the third item two new props have been added to <CommonCanvas>
called leftFlyoutContent
and showLeftFlyout
.
These work in the same way as these currently supported props:
rightFlyoutContent
andshowRightFlyout
topPanelContent
andshowTopPanel
bottomPanelContent
andshowBottomPanel
Notes
-
To allow the application to provide the Palette as content for the left flyout the Palette object is now exported from Elyra Canvas. To satisfy this requirement the application must import the Palette from Elyra Canvas and then specify it in the
leftFlyoutContent
prop of<CommonCanvas>
-
The width of the left flyout will expand to accommodate whatever contents that are specified in the
leftFlyoutContent
prop of<CommonCanvas>
-
The
Stages
sample application in the Test Harness has been updated to implement the steps mentioned above. To see this, open the Test Harness, click the Common Canvas button and then click the 'Stages' sample application. -
You can see the code that was added to the Stages sample app, as follow:
- The default behavior of the Palette has been switched off here
- The two buttons for the toolbar are specified here
- The editActionHandler has been updated to handle the click on each of these buttons here
- The render method has been updated to render the appropriate content into the left flyout here and here
-
For this work item a number of internal class names have been removed. These were not part of the documented API but are documented here for completeness:
common-canvas-items-container
common-canvas-right-side-items
common-canvas-right-side-items-under-toolbar
common-canvas-items-container-under-toolbar
common-canvas-with-top-and-bottom-panel
Requiremnt 2
The left flyout (whether it is displaying the default palette or the left flyout contents provided by the app) can be displayed underneath the toolbar by setting the enableLeftFlyoutUnderToolbar
config field to true. (This is the equivalent of the enableRightFlyoutUnderToolbar
config field). You can see this behavior if you view the Stages sample app where you will see the Palette/Search panel appearing below the toolbar. You can see it has been switched on in the Stages sample app code here
#2079 Add ability to adjust position of context toolbar for links
Two new Canvas Layout fields have been added called linkContextToolbarPosX
and linkContextToolbarPosY
. These are used as an offset for the bottom center position of the context toolbar for all links. Positive X is to the right, negative X is to the left, and positive Y is down, negative Y is up.
They can be specified like this:
const canvasConfig = {
enableCanvasLayout: {
linkContextToolbarPosX: 10,
linkContextToolbarPosY: -10
}
};
This behavior has been implemented in the Stages sample app. You can see it in the Test Harness. In the Test Harness click the “Common Canvas“ button and the “Stages” sample app. You can see the code for it here
#2095 Hide link Label with ... and decorations based on link length in Common Canvas
Two more new Canvas Layout fields have been added in this release called:
-
linkDistanceForAltDecorations — A distance in pixels between the start point and end point of the link below which the ‘alternative decorations’ will be displayed. This defaults to 150.
-
linkAltDecorations. — Should be set to an array of alternative decorations for the link. Each element of the array should follow the decoration specification just the same as the regular decorations. The default for this field is null, which means no alternative decorations will be displayed. They can be specified something like this:
const canvasConfig = {
enableCanvasLayout: {
linkDistanceForAltDecorations: 100,
linkAltDecorations: [
{ id: “alt-123”, label: “XXX” }
]
}
}
This will display a label “XXX” in the middle of the link when the distance from the start point to the end point of the link is below 100 pixels.
The Stages sample app in the Test Harness has been updated to use this feature. In the Test Harness click the “Common Canvas“ button and the “Stages” sample app. You can see the code here.
Common Properties
Just bug fixes
Issues Resolved
- #2079 Add ability to adjust position of context toolbar for links by @tomlyn in #2080
- #2083 With WYSIWYG comments IBM Plex Condensed font display incorrectly by @tomlyn in #2084
- #2085 Page crashes when mousing over node while submenu toolbaritem i… by @tomlyn in #2086
- #2093 Text decoration on a Link -- entry area closes when mouse cursor moved out (intermittent). by @srikant-ch5 in #2094
- #2081 Conditions + small portion of controls by @mikieyx in #2082
- #2090 Add new left side panel to allow toggling between palette and s… by @tomlyn in #2091
- #2095 Hide link Label with ... and decorations based on link length i… by @tomlyn in #2096
Full Changelog: v13.6.1...v13.7.0