fix(): Inspector View tab priority ()

* fix: inspector view tab priority

- fixes issue where inspector view priorities were not being passed to the view registry

* chore: run lint:fix

- eslint sez no danglin' commas! EVER!

* fix: update more viewProviders

---------

Co-authored-by: Shefali Joshi <simplyrender@gmail.com>
This commit is contained in:
Jesse Mazzella 2023-03-15 14:47:40 -07:00 committed by GitHub
parent 006fa0bcc7
commit 22cc28d733
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 53 additions and 52 deletions

@ -21,7 +21,7 @@
*****************************************************************************/
const { test, expect } = require('../../../../pluginFixtures');
const { createDomainObjectWithDefaults, setStartOffset, setFixedTimeMode, setRealTimeMode } = require('../../../../appActions');
const { createDomainObjectWithDefaults, setStartOffset, setFixedTimeMode, setRealTimeMode, selectInspectorTab } = require('../../../../appActions');
test.describe('Testing LAD table configuration', () => {
test.beforeEach(async ({ page }) => {
@ -48,7 +48,7 @@ test.describe('Testing LAD table configuration', () => {
// Add the Sine Wave Generator to the LAD table and save changes
await page.dragAndDrop('role=treeitem[name=/Test Sine Wave Generator/]', '.c-lad-table-wrapper');
// select configuration tab in inspector
await page.getByRole('tab', { name: 'LAD Table Configuration' }).getByText('LAD Table Configuration').click();
await selectInspectorTab(page, 'LAD Table Configuration');
// make sure headers are visible initially
await expect(page.getByRole('cell', { name: 'Timestamp' })).toBeVisible();
@ -78,7 +78,7 @@ test.describe('Testing LAD table configuration', () => {
// Edit LAD table
await page.locator('[title="Edit"]').click();
await page.getByRole('tab', { name: 'LAD Table Configuration' }).getByText('LAD Table Configuration').click();
await selectInspectorTab(page, 'LAD Table Configuration');
// show timestamp column
await page.getByLabel('Timestamp').check();
@ -96,7 +96,7 @@ test.describe('Testing LAD table configuration', () => {
// Edit LAD table
await page.locator('[title="Edit"]').click();
await page.getByRole('tab', { name: 'LAD Table Configuration' }).getByText('LAD Table Configuration').click();
await selectInspectorTab(page, 'LAD Table Configuration');
// show units and type columns
await page.getByLabel('Units').check();

@ -52,6 +52,9 @@ export default function LADTableConfigurationViewProvider(openmct) {
template: '<LADTableConfiguration />'
});
},
priority() {
return 1;
},
destroy() {
if (component) {
component.$destroy();
@ -59,9 +62,6 @@ export default function LADTableConfigurationViewProvider(openmct) {
}
}
};
},
priority() {
return 1;
}
};
}

@ -33,6 +33,9 @@ export default function BarGraphInspectorViewProvider(openmct) {
template: '<bar-graph-options></bar-graph-options>'
});
},
priority: function () {
return openmct.priority.HIGH + 1;
},
destroy: function () {
if (component) {
component.$destroy();
@ -40,9 +43,6 @@ export default function BarGraphInspectorViewProvider(openmct) {
}
}
};
},
priority: function () {
return openmct.priority.HIGH + 1;
}
};
}

@ -33,6 +33,9 @@ export default function ScatterPlotInspectorViewProvider(openmct) {
template: '<plot-options></plot-options>'
});
},
priority: function () {
return openmct.priority.HIGH + 1;
},
destroy: function () {
if (component) {
component.$destroy();
@ -40,9 +43,6 @@ export default function ScatterPlotInspectorViewProvider(openmct) {
}
}
};
},
priority: function () {
return openmct.priority.HIGH + 1;
}
};
}

@ -56,6 +56,10 @@ class AlphanumericFormatView {
return this.component.$refs.alphanumericFormat.getViewContext();
}
priority() {
return 1;
}
destroy() {
this.component.$destroy();
this.component = undefined;
@ -89,9 +93,6 @@ export default function AlphanumericFormatViewProvider(openmct, options) {
},
view: function (domainObject, objectPath) {
return new AlphanumericFormatView(openmct, domainObject, objectPath);
},
priority: function () {
return 1;
}
};
}

@ -56,6 +56,9 @@ export default function FaultManagementInspectorViewProvider(openmct) {
template: '<FaultManagementInspector></FaultManagementInspector>'
});
},
priority: function () {
return openmct.priority.HIGH + 1;
},
destroy: function () {
if (component) {
component.$destroy();
@ -63,9 +66,6 @@ export default function FaultManagementInspectorViewProvider(openmct) {
}
}
};
},
priority: function () {
return openmct.priority.HIGH + 1;
}
};
}

@ -61,6 +61,9 @@ define([
return hasPersistedFilters || hasGlobalFilters;
},
priority: function () {
return openmct.priority.DEFAULT;
},
destroy: function () {
if (component) {
component.$destroy();
@ -68,9 +71,6 @@ define([
}
}
};
},
priority: function () {
return openmct.priority.DEFAULT;
}
};
}

@ -49,14 +49,14 @@ export default function ElementsViewProvider(openmct) {
template: `<Annotations />`
});
},
priority: function () {
return openmct.priority.DEFAULT;
},
destroy: function () {
component.$destroy();
component = undefined;
}
};
},
priority: function () {
return this.openmct.priority.DEFAULT;
}
};
}

@ -57,14 +57,14 @@ export default function ElementsViewProvider(openmct) {
return hasComposition && isEditing;
},
priority: function () {
return openmct.priority.DEFAULT;
},
destroy: function () {
component.$destroy();
component = undefined;
}
};
},
priority: function () {
return this.openmct.priority.DEFAULT;
}
};
}

@ -54,14 +54,14 @@ export default function PlotElementsViewProvider(openmct) {
return hasComposition && isEditing;
},
priority: function () {
return openmct.priority.DEFAULT;
},
destroy: function () {
component.$destroy();
component = undefined;
}
};
},
priority: function () {
return this.openmct.priority.DEFAULT;
}
};
}

@ -47,14 +47,14 @@ export default function PropertiesViewProvider(openmct) {
template: `<Properties />`
});
},
priority: function () {
return openmct.priority.DEFAULT;
},
destroy: function () {
component.$destroy();
component = undefined;
}
};
},
priority: function () {
return this.openmct.priority.DEFAULT;
}
};
}

@ -76,14 +76,14 @@ export default function StylesInspectorViewProvider(openmct) {
template: `<StylesInspectorView />`
});
},
priority: function () {
return openmct.priority.DEFAULT;
},
destroy: function () {
component.$destroy();
component = undefined;
}
};
},
priority: function () {
return this.openmct.priority.DEFAULT;
}
};
}

@ -54,6 +54,9 @@ export default function PlanInspectorViewProvider(openmct) {
template: '<plan-activities-view></plan-activities-view>'
});
},
priority: function () {
return openmct.priority.HIGH + 1;
},
destroy: function () {
if (component) {
component.$destroy();
@ -61,9 +64,6 @@ export default function PlanInspectorViewProvider(openmct) {
}
}
};
},
priority: function () {
return openmct.priority.HIGH + 1;
}
};
}

@ -44,6 +44,9 @@ export default function PlotsInspectorViewProvider(openmct) {
template: '<plot-options></plot-options>'
});
},
priority: function () {
return openmct.priority.HIGH + 1;
},
destroy: function () {
if (component) {
component.$destroy();
@ -51,9 +54,6 @@ export default function PlotsInspectorViewProvider(openmct) {
}
}
};
},
priority: function () {
return openmct.priority.HIGH + 1;
}
};
}

@ -42,6 +42,9 @@ export default function StackedPlotsInspectorViewProvider(openmct) {
template: '<plot-options></plot-options>'
});
},
priority: function () {
return openmct.priority.HIGH + 1;
},
destroy: function () {
if (component) {
component.$destroy();
@ -49,9 +52,6 @@ export default function StackedPlotsInspectorViewProvider(openmct) {
}
}
};
},
priority: function () {
return openmct.priority.HIGH + 1;
}
};
}

@ -64,6 +64,9 @@ define([
template: '<table-configuration></table-configuration>'
});
},
priority: function () {
return 1;
},
destroy: function () {
if (component) {
component.$destroy();
@ -73,9 +76,6 @@ define([
tableConfiguration = undefined;
}
};
},
priority: function () {
return 1;
}
};
}

@ -55,6 +55,9 @@ export default function TimeListInspectorViewProvider(openmct) {
template: '<timelist-properties-view></timelist-properties-view>'
});
},
priority: function () {
return openmct.priority.HIGH + 1;
},
destroy: function () {
if (component) {
component.$destroy();
@ -62,9 +65,6 @@ export default function TimeListInspectorViewProvider(openmct) {
}
}
};
},
priority: function () {
return openmct.priority.HIGH + 1;
}
};
}