From 3527e4e4a1b2d1165c70e5d40035722258e111ae Mon Sep 17 00:00:00 2001 From: Charles Hacskaylo Date: Fri, 17 Jan 2025 11:49:10 -0800 Subject: [PATCH] Changes for tabs visibility and priority - Priorities set for Graph, Lad Table, Scatter Plot, Telem Tables and Time List views. - Changed several Inspector tab names to 'Config'; tests and other code changed to target `key` instead of `name`: - LAD Table - Time List - will need regression testing for change noted re. `key` above. - Created browse mode read-only Inspector views: - LAD Table, Lad Table set. - Telemetry Table. and `showTab` functions; `showTab` has just been set to true for now. to prevent it from displaying when no filters can be set. - Changed AnnotationsViewProvider.js canView to return false if editor.isEditing. - Plot plugin.js now adds configuration.objectStyles {} for overlay and stacked plots on initialize. - FiltersView now displays a message for telem sources that don't have filter criteria available. - Code cleanup in FiltersInspectorViewProvider.js to remove metadata checks that never evaluated. - Annotations tab now set to never display when a view is being edited. --- e2e/helper/planningUtils.js | 2 +- .../functional/planning/timelist.e2e.spec.js | 2 +- .../functional/plugins/lad/lad.e2e.spec.js | 8 +- .../LADTableConfigurationViewProvider.js | 4 +- .../components/LadTableConfiguration.vue | 40 ++++---- .../BarGraphInspectorViewProvider.js | 2 +- .../ScatterPlotInspectorViewProvider.js | 2 +- .../filters/FiltersInspectorViewProvider.js | 9 -- .../filters/components/FiltersView.vue | 3 + .../annotations/AnnotationsViewProvider.js | 2 +- .../styles/StylesInspectorViewProvider.js | 2 +- .../StackedPlotsInspectorViewProvider.js | 2 +- src/plugins/plot/plugin.js | 6 +- .../TableConfigurationViewProvider.js | 4 +- .../components/TableConfiguration.vue | 98 ++++++++++--------- .../TimeListInspectorViewProvider.js | 4 +- 16 files changed, 93 insertions(+), 97 deletions(-) diff --git a/e2e/helper/planningUtils.js b/e2e/helper/planningUtils.js index 2e1d8a8a700..40e5e0193fd 100644 --- a/e2e/helper/planningUtils.js +++ b/e2e/helper/planningUtils.js @@ -224,7 +224,7 @@ export async function createTimelistWithPlanAndSetActivityInProgress(page, planJ await page.getByRole('button', { name: 'Edit Object' }).click(); // Find the display properties section in the inspector - await page.getByRole('tab', { name: 'View Properties' }).click(); + await page.getByRole('tab', { name: 'Config' }).click(); // Switch to expanded view and save the setting await page.getByLabel('Display Style').selectOption({ label: 'Expanded' }); diff --git a/e2e/tests/functional/planning/timelist.e2e.spec.js b/e2e/tests/functional/planning/timelist.e2e.spec.js index abfef4a5843..1e43a879192 100644 --- a/e2e/tests/functional/planning/timelist.e2e.spec.js +++ b/e2e/tests/functional/planning/timelist.e2e.spec.js @@ -132,7 +132,7 @@ test("View a timelist in expanded view, verify all the activities are displayed await page.getByRole('button', { name: 'Edit Object' }).click(); // Find the display properties section in the inspector - await page.getByRole('tab', { name: 'View Properties' }).click(); + await page.getByRole('tab', { name: 'Config' }).click(); // Switch to expanded view and save the setting await page.getByLabel('Display Style').selectOption({ label: 'Expanded' }); diff --git a/e2e/tests/functional/plugins/lad/lad.e2e.spec.js b/e2e/tests/functional/plugins/lad/lad.e2e.spec.js index fd2f385bd74..fd05e7d3618 100644 --- a/e2e/tests/functional/plugins/lad/lad.e2e.spec.js +++ b/e2e/tests/functional/plugins/lad/lad.e2e.spec.js @@ -53,7 +53,7 @@ test.describe('Testing LAD table configuration', () => { test('in edit mode, LAD Tables provide ability to hide columns', async ({ page }) => { // Edit LAD table await page.getByLabel('Edit Object').click(); - await page.getByRole('tab', { name: 'LAD Table Configuration' }).click(); + await page.getByRole('tab', { name: 'Config' }).click(); // make sure headers are visible initially await expect(page.getByRole('columnheader', { name: 'Timestamp', exact: true })).toBeVisible(); @@ -114,7 +114,7 @@ test.describe('Testing LAD table configuration', () => { // Edit LAD table await page.getByLabel('Edit Object').click(); - await page.getByRole('tab', { name: 'LAD Table Configuration' }).click(); + await page.getByRole('tab', { key: 'lad-table-configuration' }).click(); // show timestamp column await page.getByLabel('Timestamp', { exact: true }).check(); @@ -142,7 +142,7 @@ test.describe('Testing LAD table configuration', () => { // Edit LAD table await page.getByLabel('Edit Object').click(); - await page.getByRole('tab', { name: 'LAD Table Configuration' }).click(); + await page.getByRole('tab', { key: 'lad-table-configuration' }).click(); // show units, type, and WATCH columns await page.getByLabel('Units').check(); @@ -182,7 +182,7 @@ test.describe('Testing LAD table configuration', () => { // Edit LAD table await page.getByLabel('Edit Object').click(); - await page.getByRole('tab', { name: 'LAD Table Configuration' }).click(); + await page.getByRole('tab', { key: 'lad-table-configuration' }).click(); // make sure Sine Wave headers are visible initially too await expect(page.getByRole('columnheader', { name: 'Timestamp', exact: true })).toBeVisible(); diff --git a/src/plugins/LADTable/LADTableConfigurationViewProvider.js b/src/plugins/LADTable/LADTableConfigurationViewProvider.js index 143079d17e1..88f1f0be104 100644 --- a/src/plugins/LADTable/LADTableConfigurationViewProvider.js +++ b/src/plugins/LADTable/LADTableConfigurationViewProvider.js @@ -27,7 +27,7 @@ import LadTableConfiguration from './components/LadTableConfiguration.vue'; export default function LADTableConfigurationViewProvider(openmct) { return { key: 'lad-table-configuration', - name: 'LAD Table Configuration', + name: 'Config', canView(selection) { if (selection.length !== 1 || selection[0].length === 0) { return false; @@ -61,7 +61,7 @@ export default function LADTableConfigurationViewProvider(openmct) { _destroy = destroy; }, priority() { - return 1; + return openmct.editor.isEditing() ? openmct.priority.HIGH + 1 : openmct.priority.DEFAULT; }, destroy() { if (_destroy) { diff --git a/src/plugins/LADTable/components/LadTableConfiguration.vue b/src/plugins/LADTable/components/LadTableConfiguration.vue index 2c44f6e23b5..9635f89439a 100644 --- a/src/plugins/LADTable/components/LadTableConfiguration.vue +++ b/src/plugins/LADTable/components/LadTableConfiguration.vue @@ -22,28 +22,24 @@ diff --git a/src/plugins/charts/bar/inspector/BarGraphInspectorViewProvider.js b/src/plugins/charts/bar/inspector/BarGraphInspectorViewProvider.js index b081aaa1590..4fe766d0957 100644 --- a/src/plugins/charts/bar/inspector/BarGraphInspectorViewProvider.js +++ b/src/plugins/charts/bar/inspector/BarGraphInspectorViewProvider.js @@ -41,7 +41,7 @@ export default function BarGraphInspectorViewProvider(openmct) { _destroy = destroy; }, priority: function () { - return openmct.priority.HIGH + 1; + return openmct.editor.isEditing() ? openmct.priority.HIGH + 1 : openmct.priority.DEFAULT; }, destroy: function () { if (_destroy) { diff --git a/src/plugins/charts/scatter/inspector/ScatterPlotInspectorViewProvider.js b/src/plugins/charts/scatter/inspector/ScatterPlotInspectorViewProvider.js index a88ffee33a4..44bdff2ab7a 100644 --- a/src/plugins/charts/scatter/inspector/ScatterPlotInspectorViewProvider.js +++ b/src/plugins/charts/scatter/inspector/ScatterPlotInspectorViewProvider.js @@ -40,7 +40,7 @@ export default function ScatterPlotInspectorViewProvider(openmct) { _destroy = destroy; }, priority: function () { - return openmct.priority.HIGH + 1; + return openmct.editor.isEditing() ? openmct.priority.HIGH + 1 : openmct.priority.DEFAULT; }, destroy: function () { if (_destroy) { diff --git a/src/plugins/filters/FiltersInspectorViewProvider.js b/src/plugins/filters/FiltersInspectorViewProvider.js index ef98a017b4c..29bd53b5ddc 100644 --- a/src/plugins/filters/FiltersInspectorViewProvider.js +++ b/src/plugins/filters/FiltersInspectorViewProvider.js @@ -43,8 +43,6 @@ export default class FiltersInspectorViewProvider { let openmct = this.openmct; let _destroy = null; - const domainObject = selection?.[0]?.[0]?.context?.item; - return { show: function (element) { const { destroy } = mount( @@ -69,13 +67,6 @@ export default class FiltersInspectorViewProvider { if (isEditing) { return true; } - - const metadata = openmct.telemetry.getMetadata(domainObject); - const metadataWithFilters = metadata - ? metadata.valueMetadatas.filter((value) => value.filters) - : []; - - return metadataWithFilters.length; }, priority: function () { return openmct.priority.DEFAULT; diff --git a/src/plugins/filters/components/FiltersView.vue b/src/plugins/filters/components/FiltersView.vue index c903599337f..1df8b8ffbb4 100644 --- a/src/plugins/filters/components/FiltersView.vue +++ b/src/plugins/filters/components/FiltersView.vue @@ -38,6 +38,9 @@ @update-filters="persistFilters" /> + + This view doesn't include any parameters that have configured filter criteria. +