v12.46.0
Common-Canvas
#1865 Add dividers for the context toolbar
Dividers are now supported in the context toolbar. To add a divider, specify the following in the array returned by the contextMenuHandler callback:
<divider: true, toolbarItem: true />
See details here: https://elyra-ai.github.io/canvas/03.03.01-context-menu-handler/#return-array-for-context-toolbar
#1891 Enable multiple undo/redo button and panel
The common-canvas toolbar now supports a “dual-purpose” button. That is, a single button that has two parts, the left side of the button can be clicked to perform the action indicated by the button’s icon and the right side of the button, shown as a chevron, can be clicked to open a panel underneath the chevron that will allow what ever additional function the application developer wishes to present to the user that is connected with the action.
For example, this dual-purpose button, which can be seen in the ‘Stages’ sample app in the test harness, will perform the ‘undo’ action if clicked on the left-hand side:
and will display an additional panel when clicked on the right-hand side:
A dual-purpose button can be specified in the toolbar config like this:
const toolbarConfig = {
leftBar: [
{
action: "undo",
label: "Undo",
purpose: "dual",
subPanel: MultiUndoPanel,
subPanelData: { canvasController: this.canvasController }
}
],
rightBar: []
};
where:
purpose
can be either “single” (the default) or “dual”subPanel
is the React object to be inserted into the panelsubPanelData
is an object that is passed into the panel when it is created
#1888 Enable HTML code in Comments when Markdown is Enabled
When the enableMarkdownInComments
config field is set to true
, common-canvas allows the user to enter markdown syntax into the comment text which is used to format the text output.
The Markdown support in comments has been extended in this release, to allow the user to enter HTML into the markdown text. This is then run, when the comment is presented in display mode. HTML support allows the user more extensive customization capabilities including the specification of CSS for the text.
For example, specifying this will color the word Red:
Some <span style="color: red">Red</span> text
Issues Resolved
- Theses 6 commits get mkdocs back in sync with main: by @tomlyn in #1869
- #1865 Add dividers for the context toolbar (#1866) by @tomlyn in #1870
- More docs changes (#1871) by @tomlyn in #1874
- #1876 'Cannot read properties of null' errors in console using contex… by @tomlyn in #1880
- #1888 v12 Enable HTML in Markdown by @JesusGuerrero in #1890
- #1891 Enable multiple undo/redo button and panel (#1892) by @tomlyn in #1896
- #1893 New common-canvas documentation required (#1894) by @tomlyn in #1897
- Fix image URLs in docs (#1898) by @tomlyn in #1899
Full Changelog: v12.45.1...v12.46.0