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.
This commit is contained in:
Charles Hacskaylo 2025-01-17 11:49:10 -08:00
parent f4f010ac4f
commit 3527e4e4a1
16 changed files with 93 additions and 97 deletions

View File

@ -224,7 +224,7 @@ export async function createTimelistWithPlanAndSetActivityInProgress(page, planJ
await page.getByRole('button', { name: 'Edit Object' }).click(); await page.getByRole('button', { name: 'Edit Object' }).click();
// Find the display properties section in the inspector // 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 // Switch to expanded view and save the setting
await page.getByLabel('Display Style').selectOption({ label: 'Expanded' }); await page.getByLabel('Display Style').selectOption({ label: 'Expanded' });

View File

@ -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(); await page.getByRole('button', { name: 'Edit Object' }).click();
// Find the display properties section in the inspector // 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 // Switch to expanded view and save the setting
await page.getByLabel('Display Style').selectOption({ label: 'Expanded' }); await page.getByLabel('Display Style').selectOption({ label: 'Expanded' });

View File

@ -53,7 +53,7 @@ test.describe('Testing LAD table configuration', () => {
test('in edit mode, LAD Tables provide ability to hide columns', async ({ page }) => { test('in edit mode, LAD Tables provide ability to hide columns', async ({ page }) => {
// Edit LAD table // Edit LAD table
await page.getByLabel('Edit Object').click(); 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 // make sure headers are visible initially
await expect(page.getByRole('columnheader', { name: 'Timestamp', exact: true })).toBeVisible(); await expect(page.getByRole('columnheader', { name: 'Timestamp', exact: true })).toBeVisible();
@ -114,7 +114,7 @@ test.describe('Testing LAD table configuration', () => {
// Edit LAD table // Edit LAD table
await page.getByLabel('Edit Object').click(); 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 // show timestamp column
await page.getByLabel('Timestamp', { exact: true }).check(); await page.getByLabel('Timestamp', { exact: true }).check();
@ -142,7 +142,7 @@ test.describe('Testing LAD table configuration', () => {
// Edit LAD table // Edit LAD table
await page.getByLabel('Edit Object').click(); 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 // show units, type, and WATCH columns
await page.getByLabel('Units').check(); await page.getByLabel('Units').check();
@ -182,7 +182,7 @@ test.describe('Testing LAD table configuration', () => {
// Edit LAD table // Edit LAD table
await page.getByLabel('Edit Object').click(); 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 // make sure Sine Wave headers are visible initially too
await expect(page.getByRole('columnheader', { name: 'Timestamp', exact: true })).toBeVisible(); await expect(page.getByRole('columnheader', { name: 'Timestamp', exact: true })).toBeVisible();

View File

@ -27,7 +27,7 @@ import LadTableConfiguration from './components/LadTableConfiguration.vue';
export default function LADTableConfigurationViewProvider(openmct) { export default function LADTableConfigurationViewProvider(openmct) {
return { return {
key: 'lad-table-configuration', key: 'lad-table-configuration',
name: 'LAD Table Configuration', name: 'Config',
canView(selection) { canView(selection) {
if (selection.length !== 1 || selection[0].length === 0) { if (selection.length !== 1 || selection[0].length === 0) {
return false; return false;
@ -61,7 +61,7 @@ export default function LADTableConfigurationViewProvider(openmct) {
_destroy = destroy; _destroy = destroy;
}, },
priority() { priority() {
return 1; return openmct.editor.isEditing() ? openmct.priority.HIGH + 1 : openmct.priority.DEFAULT;
}, },
destroy() { destroy() {
if (_destroy) { if (_destroy) {

View File

@ -22,7 +22,6 @@
<template> <template>
<div class="c-inspect-properties"> <div class="c-inspect-properties">
<template v-if="isEditing">
<div class="c-inspect-properties__header">Table Column Visibility</div> <div class="c-inspect-properties__header">Table Column Visibility</div>
<ul class="c-inspect-properties__section"> <ul class="c-inspect-properties__section">
<li v-for="(title, key) in headers" :key="key" class="c-inspect-properties__row"> <li v-for="(title, key) in headers" :key="key" class="c-inspect-properties__row">
@ -33,17 +32,14 @@
<input <input
:id="key + 'ColumnControl'" :id="key + 'ColumnControl'"
type="checkbox" type="checkbox"
v-if="isEditing"
:checked="configuration.hiddenColumns[key] !== true" :checked="configuration.hiddenColumns[key] !== true"
@change="toggleColumn(key)" @change="toggleColumn(key)"
/> />
<span v-if="!isEditing && configuration.hiddenColumns[key] !== true">Visible</span>
</div> </div>
</li> </li>
</ul> </ul>
</template>
<template v-else>
<div class="c-inspect-properties__header">LAD Table Configuration</div>
<div class="c-inspect-properties__row--span-all">Only available in edit mode.</div>
</template>
</div> </div>
</template> </template>

View File

@ -41,7 +41,7 @@ export default function BarGraphInspectorViewProvider(openmct) {
_destroy = destroy; _destroy = destroy;
}, },
priority: function () { priority: function () {
return openmct.priority.HIGH + 1; return openmct.editor.isEditing() ? openmct.priority.HIGH + 1 : openmct.priority.DEFAULT;
}, },
destroy: function () { destroy: function () {
if (_destroy) { if (_destroy) {

View File

@ -40,7 +40,7 @@ export default function ScatterPlotInspectorViewProvider(openmct) {
_destroy = destroy; _destroy = destroy;
}, },
priority: function () { priority: function () {
return openmct.priority.HIGH + 1; return openmct.editor.isEditing() ? openmct.priority.HIGH + 1 : openmct.priority.DEFAULT;
}, },
destroy: function () { destroy: function () {
if (_destroy) { if (_destroy) {

View File

@ -43,8 +43,6 @@ export default class FiltersInspectorViewProvider {
let openmct = this.openmct; let openmct = this.openmct;
let _destroy = null; let _destroy = null;
const domainObject = selection?.[0]?.[0]?.context?.item;
return { return {
show: function (element) { show: function (element) {
const { destroy } = mount( const { destroy } = mount(
@ -69,13 +67,6 @@ export default class FiltersInspectorViewProvider {
if (isEditing) { if (isEditing) {
return true; return true;
} }
const metadata = openmct.telemetry.getMetadata(domainObject);
const metadataWithFilters = metadata
? metadata.valueMetadatas.filter((value) => value.filters)
: [];
return metadataWithFilters.length;
}, },
priority: function () { priority: function () {
return openmct.priority.DEFAULT; return openmct.priority.DEFAULT;

View File

@ -38,6 +38,9 @@
@update-filters="persistFilters" @update-filters="persistFilters"
/> />
</ul> </ul>
<span v-else>
This view doesn't include any parameters that have configured filter criteria.
</span>
</template> </template>
<script> <script>

View File

@ -34,7 +34,7 @@ export default function AnnotationsViewProvider(openmct) {
const domainObject = selectionContext?.item; const domainObject = selectionContext?.item;
const isLayoutItem = selectionContext?.layoutItem; const isLayoutItem = selectionContext?.layoutItem;
if (availableTags.length < 1 || isLayoutItem || !domainObject) { if (availableTags.length < 1 || isLayoutItem || !domainObject || openmct.editor.isEditing()) {
return false; return false;
} }

View File

@ -97,7 +97,7 @@ export default function StylesInspectorViewProvider(openmct) {
_destroy = destroy; _destroy = destroy;
}, },
priority: function () { priority: function () {
return openmct.priority.DEFAULT; return openmct.editor.isEditing() ? openmct.priority.DEFAULT : openmct.priority.LOW;
}, },
destroy: function () { destroy: function () {
if (_destroy) { if (_destroy) {

View File

@ -50,7 +50,7 @@ export default function StackedPlotsInspectorViewProvider(openmct) {
_destroy = destroy; _destroy = destroy;
}, },
priority: function () { priority: function () {
return openmct.priority.HIGH + 1; return openmct.editor.isEditing() ? openmct.priority.HIGH + 1 : openmct.priority.DEFAULT;
}, },
destroy: function () { destroy: function () {
if (_destroy) { if (_destroy) {

View File

@ -42,7 +42,8 @@ export default function () {
domainObject.composition = []; domainObject.composition = [];
domainObject.configuration = { domainObject.configuration = {
//series is an array of objects of type: {identifier, series: {color...}, yAxis:{}} //series is an array of objects of type: {identifier, series: {color...}, yAxis:{}}
series: [] series: [],
objectStyles: {}
}; };
}, },
priority: 891 priority: 891
@ -60,7 +61,8 @@ export default function () {
domainObject.configuration = { domainObject.configuration = {
series: [], series: [],
yAxis: {}, yAxis: {},
xAxis: {} xAxis: {},
objectStyles: {}
}; };
}, },
priority: 890 priority: 890

View File

@ -66,10 +66,10 @@ export default function TableConfigurationViewProvider(openmct, options) {
_destroy = destroy; _destroy = destroy;
}, },
showTab: function (isEditing) { showTab: function (isEditing) {
return isEditing; return true;
}, },
priority: function () { priority: function () {
return 1; return openmct.editor.isEditing() ? openmct.priority.HIGH + 1 : openmct.priority.DEFAULT;
}, },
destroy: function () { destroy: function () {
if (_destroy) { if (_destroy) {

View File

@ -21,7 +21,6 @@
--> -->
<template> <template>
<div class="c-inspect-properties"> <div class="c-inspect-properties">
<template v-if="isEditing">
<div class="c-inspect-properties__header">Layout</div> <div class="c-inspect-properties__header">Layout</div>
<ul class="c-inspect-properties__section"> <ul class="c-inspect-properties__section">
<li class="c-inspect-properties__row"> <li class="c-inspect-properties__row">
@ -30,11 +29,13 @@
</div> </div>
<div class="c-inspect-properties__value"> <div class="c-inspect-properties__value">
<input <input
v-if="isEditing"
id="AutoSizeControl" id="AutoSizeControl"
type="checkbox" type="checkbox"
:checked="configuration.autosize !== false" :checked="configuration.autosize !== false"
@change="toggleAutosize()" @change="toggleAutosize()"
/> />
<span v-if="!isEditing && configuration.autosize !== false">Enabled</span>
</div> </div>
</li> </li>
<li class="c-inspect-properties__row"> <li class="c-inspect-properties__row">
@ -43,11 +44,13 @@
</div> </div>
<div class="c-inspect-properties__value"> <div class="c-inspect-properties__value">
<input <input
v-if="isEditing"
id="header-visibility" id="header-visibility"
type="checkbox" type="checkbox"
:checked="configuration.hideHeaders === true" :checked="configuration.hideHeaders === true"
@change="toggleHeaderVisibility" @change="toggleHeaderVisibility"
/> />
<span v-if="!isEditing && configuration.hideHeaders === true">True</span>
</div> </div>
</li> </li>
</ul> </ul>
@ -59,15 +62,16 @@
</div> </div>
<div class="c-inspect-properties__value"> <div class="c-inspect-properties__value">
<input <input
v-if="isEditing"
:id="key + 'ColumnControl'" :id="key + 'ColumnControl'"
type="checkbox" type="checkbox"
:checked="configuration.hiddenColumns[key] !== true" :checked="configuration.hiddenColumns[key] !== true"
@change="toggleColumn(key)" @change="toggleColumn(key)"
/> />
<span v-if="!isEditing && configuration.hiddenColumns[key] !== true">Visible</span>
</div> </div>
</li> </li>
</ul> </ul>
</template>
</div> </div>
</template> </template>

View File

@ -28,7 +28,7 @@ import TimelistPropertiesView from './TimelistPropertiesView.vue';
export default function TimeListInspectorViewProvider(openmct) { export default function TimeListInspectorViewProvider(openmct) {
return { return {
key: 'timelist-inspector', key: 'timelist-inspector',
name: 'View Properties', name: 'Config',
canView: function (selection) { canView: function (selection) {
if (selection.length === 0 || selection[0].length === 0) { if (selection.length === 0 || selection[0].length === 0) {
return false; return false;
@ -63,7 +63,7 @@ export default function TimeListInspectorViewProvider(openmct) {
_destroy = destroy; _destroy = destroy;
}, },
priority: function () { priority: function () {
return openmct.priority.HIGH + 1; return openmct.editor.isEditing() ? openmct.priority.HIGH + 1 : openmct.priority.DEFAULT;
}, },
destroy: function () { destroy: function () {
if (_destroy) { if (_destroy) {