Skip to content

Commit

Permalink
feat(variables-tab): added keyboard shortcut and tab in app-menu
Browse files Browse the repository at this point in the history
Closes #4516
  • Loading branch information
abdul99ahad committed Nov 12, 2024
1 parent 9daed74 commit ee53009
Show file tree
Hide file tree
Showing 3 changed files with 27 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 @@ -1946,6 +1946,11 @@ export class App extends PureComponent {
return this.emitWithTab(type, activeTab, payload);
}

if (action === 'toggleBottomPanel') {
const { panel } = this.state.layout;
return panel.open ? this.closePanel() : this.openPanel(panel.tab);
}

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),
...getBottomPanelEntries()
];
}

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

function getBottomPanelEntries() {
return [ {
label: 'Toggle Bottom Panel',
accelerator: 'CommandOrControl+B',
action: 'toggleBottomPanel'
}
];
}
12 changes: 11 additions & 1 deletion client/src/app/tabs/dmn/getDmnWindowMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export default function getBpmnWindowMenu(state) {
return [
...getZoomEntries(state),
...getPropertiesPanelEntries(state),
...getOverviewEntries(state)
...getOverviewEntries(state),
...getBottomPanelEntries()
];
}

Expand Down Expand Up @@ -63,4 +64,13 @@ function getOverviewEntries({ overview }) {
accelerator: 'CommandOrControl+Shift+P',
action: 'resetOverview'
} ] : [];
}

function getBottomPanelEntries() {
return [ {
label: 'Toggle Bottom Panel',
accelerator: 'CommandOrControl+B',
action: 'toggleBottomPanel'
}
];
}

0 comments on commit ee53009

Please sign in to comment.