Skip to content

Commit

Permalink
fix: remove reset properties from app menu
Browse files Browse the repository at this point in the history
  • Loading branch information
abdul99ahad authored and nikku committed Nov 18, 2024
1 parent 2fcfe9b commit 3962496
Show file tree
Hide file tree
Showing 13 changed files with 0 additions and 182 deletions.
11 changes: 0 additions & 11 deletions client/src/app/tabs/bpmn/BpmnEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -691,17 +691,6 @@ export class BpmnEditor extends CachedComponent {
return this.handleLayoutChange(newLayout);
}

if (action === 'resetProperties') {
const newLayout = {
propertiesPanel: {
...PROPERTIES_PANEL_DEFAULT_LAYOUT,
open: true
}
};

return this.handleLayoutChange(newLayout);
}

if (action === 'zoomIn') {
action = 'stepZoom';

Expand Down
23 changes: 0 additions & 23 deletions client/src/app/tabs/bpmn/__tests__/BpmnEditorSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1865,29 +1865,6 @@ describe('<BpmnEditor>', function() {
});
});


it('should reset properties panel', async function() {

// given
const onLayoutChangedSpy = sinon.spy();
const {
instance
} = await renderEditor(diagramXML, {
onLayoutChanged: onLayoutChangedSpy
});

// when
instance.triggerAction('resetProperties');

// then
expect(onLayoutChangedSpy).to.be.calledOnceWith({
propertiesPanel: {
open: true,
width: 280
}
});
});

});


Expand Down
4 changes: 0 additions & 4 deletions client/src/app/tabs/bpmn/getBpmnWindowMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,5 @@ function getPropertiesPanelEntries({ propertiesPanel }) {
label: 'Toggle Properties Panel',
accelerator: 'CommandOrControl+P',
action: 'toggleProperties'
}, {
label: 'Reset Properties Panel',
accelerator: 'CommandOrControl+Shift+P',
action: 'resetProperties'
} ] : [];
}
11 changes: 0 additions & 11 deletions client/src/app/tabs/cloud-bpmn/BpmnEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -654,17 +654,6 @@ export class BpmnEditor extends CachedComponent {
return this.handleLayoutChange(newLayout);
}

if (action === 'resetProperties') {
const newLayout = {
propertiesPanel: {
...PROPERTIES_PANEL_DEFAULT_LAYOUT,
open: true
}
};

return this.handleLayoutChange(newLayout);
}

if (action === 'zoomIn') {
action = 'stepZoom';

Expand Down
23 changes: 0 additions & 23 deletions client/src/app/tabs/cloud-bpmn/__tests__/BpmnEditorSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1787,29 +1787,6 @@ describe('cloud-bpmn - <BpmnEditor>', function() {
});
});


it('should reset properties panel', async function() {

// given
const onLayoutChangedSpy = sinon.spy();
const {
instance
} = await renderEditor(diagramXML, {
onLayoutChanged: onLayoutChangedSpy
});

// when
instance.triggerAction('resetProperties');

// then
expect(onLayoutChangedSpy).to.be.calledOnceWith({
propertiesPanel: {
open: true,
width: 280
}
});
});

});


Expand Down
11 changes: 0 additions & 11 deletions client/src/app/tabs/cloud-dmn/DmnEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -697,17 +697,6 @@ export class DmnEditor extends CachedComponent {
return handleLayoutChange(newLayout);
}

if (action === 'resetProperties') {
const newLayout = {
propertiesPanel: {
...PROPERTIES_PANEL_DEFAULT_LAYOUT,
open: true
}
};

return handleLayoutChange(newLayout);
}

if (action === 'zoomIn') {
action = 'stepZoom';

Expand Down
23 changes: 0 additions & 23 deletions client/src/app/tabs/cloud-dmn/__tests__/DmnEditorSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1852,29 +1852,6 @@ describe('<DmnEditor>', function() {
});
});


it('should reset properties panel', async function() {

// given
const onLayoutChangedSpy = sinon.spy();
const {
instance
} = await renderEditor(diagramXML, {
onLayoutChanged: onLayoutChangedSpy
});

// when
instance.triggerAction('resetProperties');

// then
expect(onLayoutChangedSpy).to.be.calledOnceWith({
propertiesPanel: {
open: true,
width: 280
}
});
});

});


Expand Down
11 changes: 0 additions & 11 deletions client/src/app/tabs/cmmn/CmmnEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,17 +406,6 @@ export class CmmnEditor extends CachedComponent {
return handleLayoutChange(newLayout);
}

if (action === 'resetProperties') {
const newLayout = {
propertiesPanel: {
width: 280,
open: true
}
};

return handleLayoutChange(newLayout);
}

if (action === 'zoomIn') {
action = 'stepZoom';

Expand Down
23 changes: 0 additions & 23 deletions client/src/app/tabs/cmmn/__tests__/CmmnEditorSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -832,29 +832,6 @@ describe('<CmmnEditor>', function() {
});
});


it('should reset properties panel', async function() {

// given
const onLayoutChangedSpy = sinon.spy();
const {
instance
} = await renderEditor(diagramXML, {
onLayoutChanged: onLayoutChangedSpy
});

// when
instance.triggerAction('resetProperties');

// then
expect(onLayoutChangedSpy).to.be.calledOnceWith({
propertiesPanel: {
open: true,
width: 280
}
});
});

});


Expand Down
4 changes: 0 additions & 4 deletions client/src/app/tabs/cmmn/getCmmnWindowMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,5 @@ function getPropertiesPanelEntries({ propertiesPanel }) {
label: 'Toggle Properties Panel',
accelerator: 'CommandOrControl+P',
action: 'toggleProperties'
}, {
label: 'Reset Properties Panel',
accelerator: 'CommandOrControl+Shift+P',
action: 'resetProperties'
} ] : [];
}
11 changes: 0 additions & 11 deletions client/src/app/tabs/dmn/DmnEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -698,17 +698,6 @@ export class DmnEditor extends CachedComponent {
return handleLayoutChange(newLayout);
}

if (action === 'resetProperties') {
const newLayout = {
propertiesPanel: {
...PROPERTIES_PANEL_DEFAULT_LAYOUT,
open: true
}
};

return handleLayoutChange(newLayout);
}

if (action === 'zoomIn') {
action = 'stepZoom';

Expand Down
23 changes: 0 additions & 23 deletions client/src/app/tabs/dmn/__tests__/DmnEditorSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1853,29 +1853,6 @@ describe('<DmnEditor>', function() {
});
});


it('should reset properties panel', async function() {

// given
const onLayoutChangedSpy = sinon.spy();
const {
instance
} = await renderEditor(diagramXML, {
onLayoutChanged: onLayoutChangedSpy
});

// when
instance.triggerAction('resetProperties');

// then
expect(onLayoutChangedSpy).to.be.calledOnceWith({
propertiesPanel: {
open: true,
width: 280
}
});
});

});


Expand Down
4 changes: 0 additions & 4 deletions client/src/app/tabs/dmn/getDmnWindowMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ function getPropertiesPanelEntries({ propertiesPanel }) {
label: 'Toggle Properties Panel',
accelerator: 'CommandOrControl+P',
action: 'toggleProperties'
}, {
label: 'Reset Properties Panel',
accelerator: 'CommandOrControl+Shift+P',
action: 'resetProperties'
} ] : [];
}

Expand Down

0 comments on commit 3962496

Please sign in to comment.