Skip to content

Commit

Permalink
feat(variables-tab): added tab in app-menu
Browse files Browse the repository at this point in the history
Closes #4516
  • Loading branch information
abdul99ahad committed Oct 28, 2024
1 parent 17812b1 commit fa25451
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
5 changes: 5 additions & 0 deletions client/src/app/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -1945,6 +1945,11 @@ export class App extends PureComponent {
return this.emitWithTab(type, activeTab, payload);
}

if (action === 'open-variables-panel') {
const { panel } = this.state.layout;
return panel.open ? this.closePanel() : this.openPanel('variable-outline');
}

const tab = this.tabRef.current;

return tab.triggerAction(action, options);
Expand Down
12 changes: 11 additions & 1 deletion client/src/app/tabs/bpmn/getBpmnWindowMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
export default function getBpmnWindowMenu(state) {
return [
...getZoomEntries(state),
...getPropertiesPanelEntries(state)
...getPropertiesPanelEntries(state),
...getVariableEntries(state)
];
}

Expand Down Expand Up @@ -51,3 +52,12 @@ function getPropertiesPanelEntries({ propertiesPanel }) {
action: 'resetProperties'
} ] : [];
}

function getVariableEntries({ variablePanel }) {
return variablePanel ? [ {
label: 'Variables Tab',
accelerator: 'CommandOrControl+Shift+V',
action: 'open-variables-panel'
}
] : [];
}
3 changes: 2 additions & 1 deletion client/src/app/tabs/cloud-bpmn/BpmnEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,8 @@ export class BpmnEditor extends CachedComponent {
setColor: !!selectionLength,
spaceTool: !inputActive,
undo: commandStack.canUndo(),
zoom: true
zoom: true,
variablePanel: true
};

// ensure backwards compatibility
Expand Down

0 comments on commit fa25451

Please sign in to comment.