Skip to content

v12.46.0

Compare
Choose a tag to compare
@nmgokhale nmgokhale released this 23 Apr 21:03
· 4 commits to v12.x since this release
a3d8e44

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:
undo
and will display an additional panel when clicked on the right-hand side:
additional-panel

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 panel
  • subPanelData 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

html-markdown

Issues Resolved

Full Changelog: v12.45.1...v12.46.0