Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
philippfromme committed Oct 17, 2024
1 parent 76fe6b2 commit 4042afe
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/render/BpmnPropertiesPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ import { PanelPlaceholderProvider } from './PanelPlaceholderProvider';
* @param {Object} props.layoutConfig
* @param {Object} props.descriptionConfig
* @param {Object} props.tooltipConfig
* @param {HTMLElement} props.feelPopupContainer
* @param {Function} props.getFeelPopupLinks
*/
export default function BpmnPropertiesPanel(props) {
const {
Expand All @@ -37,7 +39,8 @@ export default function BpmnPropertiesPanel(props) {
layoutConfig: initialLayoutConfig,
descriptionConfig,
tooltipConfig,
feelPopupContainer
feelPopupContainer,
getFeelPopupLinks
} = props;

const canvas = injector.get('canvas');
Expand Down Expand Up @@ -238,6 +241,7 @@ export default function BpmnPropertiesPanel(props) {
tooltipConfig={ tooltipConfig }
tooltipLoaded={ onTooltipLoaded }
feelPopupContainer={ feelPopupContainer }
getFeelPopupLinks={ getFeelPopupLinks }
eventBus={ eventBus } />
</BpmnPropertiesPanelContext.Provider>;
}
Expand Down
5 changes: 4 additions & 1 deletion src/render/BpmnPropertiesPanelRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export default class BpmnPropertiesPanelRenderer {
layout: layoutConfig,
description: descriptionConfig,
tooltip: tooltipConfig,
feelPopupContainer
feelPopupContainer,
getFeelPopupLinks
} = config || {};

this._eventBus = eventBus;
Expand All @@ -40,6 +41,7 @@ export default class BpmnPropertiesPanelRenderer {
this._descriptionConfig = descriptionConfig;
this._tooltipConfig = tooltipConfig;
this._feelPopupContainer = feelPopupContainer;
this._getFeelPopupLinks = getFeelPopupLinks;

this._container = domify(
'<div style="height: 100%" class="bio-properties-panel-container"></div>'
Expand Down Expand Up @@ -176,6 +178,7 @@ export default class BpmnPropertiesPanelRenderer {
descriptionConfig={ this._descriptionConfig }
tooltipConfig={ this._tooltipConfig }
feelPopupContainer={ this._feelPopupContainer }
getFeelPopupLinks={ this._getFeelPopupLinks }
/>,
this._container
);
Expand Down
21 changes: 21 additions & 0 deletions test/spec/BpmnPropertiesPanelRenderer.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,27 @@ describe('<BpmnPropertiesPanelRenderer>', function() {
propertiesPanel: {
parent: propertiesContainer,
feelTooltipContainer: container,
getFeelPopupLinks: (type) => {
if (type === 'feel') {
return [
{
label: 'Learn FEEL expressions',
url: 'https://docs.camunda.io/docs/components/modeler/feel/what-is-feel/'
},
{
label: 'Try FEEL Copilot',
url: 'https://feel-copilot.camunda.com/'
}
];
} else if (type === 'feelers') {
return [
{
label: 'Learn templating',
url: 'https://docs.camunda.io/docs/components/modeler/forms/configuration/forms-config-templating-syntax/'
}
];
}
},
description,
tooltip,
layout
Expand Down

0 comments on commit 4042afe

Please sign in to comment.