mirror of
https://github.com/nasa/openmct.git
synced 2025-04-13 22:23:13 +00:00
tweak priorities for inspector views, added new priority constants HIGHEST/LOWEST, update docs
This commit is contained in:
parent
6b6afbdead
commit
d4354e7e22
12
API.md
12
API.md
@ -31,6 +31,10 @@
|
||||
- [`latest` request strategy](#latest-request-strategy)
|
||||
- [`minmax` request strategy](#minmax-request-strategy)
|
||||
- [Telemetry Formats](#telemetry-formats)
|
||||
- [Built-in Formats](#built-in-formats)
|
||||
- [**Number Format (default):**](#number-format-default)
|
||||
- [**String Format**](#string-format)
|
||||
- [**Enum Format**](#enum-format)
|
||||
- [Registering Formats](#registering-formats)
|
||||
- [Telemetry Data](#telemetry-data)
|
||||
- [Telemetry Datums](#telemetry-datums)
|
||||
@ -59,6 +63,12 @@
|
||||
- [Custom Indicators](#custom-indicators)
|
||||
- [Priority API](#priority-api)
|
||||
- [Priority Types](#priority-types)
|
||||
- [User API](#user-api)
|
||||
- [Example](#example)
|
||||
- [Visibility-Based Rendering in View Providers](#visibility-based-rendering-in-view-providers)
|
||||
- [Overview](#overview)
|
||||
- [Implementing Visibility-Based Rendering](#implementing-visibility-based-rendering)
|
||||
- [Example](#example-1)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
@ -1301,9 +1311,11 @@ Open MCT provides some built-in priority values that can be used in the applicat
|
||||
|
||||
Currently, the Open MCT Priority API provides (type: numeric value):
|
||||
|
||||
- HIGHEST: Infinity
|
||||
- HIGH: 1000
|
||||
- Default: 0
|
||||
- LOW: -1000
|
||||
- LOWEST: -Infinity
|
||||
|
||||
View provider Example:
|
||||
|
||||
|
@ -65,9 +65,11 @@ test.describe('Tagging in Notebooks @addInit', () => {
|
||||
});
|
||||
test('Can add tags with blank entry', async ({ page }) => {
|
||||
await createDomainObjectWithDefaults(page, { type: 'Notebook' });
|
||||
await page.getByRole('tab', { name: 'Annotations' }).click();
|
||||
|
||||
await enterTextEntry(page, '');
|
||||
|
||||
await page.getByRole('tab', { name: 'Annotations' }).click();
|
||||
|
||||
await page.hover(`button:has-text("Add Tag")`);
|
||||
await page.locator(`button:has-text("Add Tag")`).click();
|
||||
|
||||
|
@ -21,8 +21,11 @@
|
||||
*****************************************************************************/
|
||||
|
||||
const PRIORITIES = Object.freeze({
|
||||
HIGHEST: Infinity,
|
||||
HIGH: 1000,
|
||||
DEFAULT: 0,
|
||||
LOW: -1000
|
||||
LOW: -1000,
|
||||
LOWEST: -Infinity
|
||||
});
|
||||
|
||||
export default PRIORITIES;
|
||||
|
@ -40,7 +40,7 @@ export default function ScatterPlotInspectorViewProvider(openmct) {
|
||||
_destroy = destroy;
|
||||
},
|
||||
priority: function () {
|
||||
return openmct.editor.isEditing() ? openmct.priority.HIGH + 1 : openmct.priority.DEFAULT;
|
||||
return openmct.editor.isEditing() ? openmct.priority.HIGH : openmct.priority.DEFAULT;
|
||||
},
|
||||
destroy: function () {
|
||||
if (_destroy) {
|
||||
|
@ -63,7 +63,7 @@ export default function FaultManagementInspectorViewProvider(openmct) {
|
||||
_destroy = destroy;
|
||||
},
|
||||
priority: function () {
|
||||
return openmct.priority.HIGH + 1;
|
||||
return openmct.priority.HIGH;
|
||||
},
|
||||
destroy: function () {
|
||||
if (_destroy) {
|
||||
|
@ -77,7 +77,7 @@ export default function AnnotationsViewProvider(openmct) {
|
||||
},
|
||||
priority: function () {
|
||||
if (isNotebookEntry) {
|
||||
return openmct.priority.HIGH + 1;
|
||||
return openmct.priority.HIGHEST;
|
||||
}
|
||||
|
||||
if (isConditionSet) {
|
||||
|
@ -58,7 +58,7 @@ export default function PropertiesViewProvider(openmct) {
|
||||
_destroy = destroy;
|
||||
},
|
||||
priority: function () {
|
||||
return openmct.editor.isEditing() ? openmct.priority.LOW : openmct.priority.HIGH + 2;
|
||||
return openmct.editor.isEditing() ? openmct.priority.LOW : openmct.priority.HIGH;
|
||||
},
|
||||
destroy: function () {
|
||||
if (_destroy) {
|
||||
|
@ -62,7 +62,7 @@ export default function ActivityInspectorViewProvider(openmct) {
|
||||
_destroy = destroy;
|
||||
},
|
||||
priority: function () {
|
||||
return openmct.priority.HIGH + 1;
|
||||
return openmct.priority.HIGH;
|
||||
},
|
||||
destroy: function () {
|
||||
if (_destroy) {
|
||||
|
@ -62,7 +62,7 @@ export default function GanttChartInspectorViewProvider(openmct) {
|
||||
_destroy = destroy;
|
||||
},
|
||||
priority: function () {
|
||||
return openmct.editor.isEditing() ? openmct.priority.HIGH + 1 : openmct.priority.DEFAULT;
|
||||
return openmct.editor.isEditing() ? openmct.priority.HIGH : openmct.priority.DEFAULT;
|
||||
},
|
||||
destroy: function () {
|
||||
if (_destroy) {
|
||||
|
@ -52,7 +52,7 @@ export default function PlotsInspectorViewProvider(openmct) {
|
||||
_destroy = destroy;
|
||||
},
|
||||
priority: function () {
|
||||
return openmct.priority.HIGH + 1;
|
||||
return openmct.priority.DEFAULT;
|
||||
},
|
||||
destroy: function () {
|
||||
if (_destroy) {
|
||||
|
@ -50,7 +50,7 @@ export default function StackedPlotsInspectorViewProvider(openmct) {
|
||||
_destroy = destroy;
|
||||
},
|
||||
priority: function () {
|
||||
return openmct.editor.isEditing() ? openmct.priority.HIGH + 1 : openmct.priority.DEFAULT;
|
||||
return openmct.editor.isEditing() ? openmct.priority.HIGH : openmct.priority.DEFAULT;
|
||||
},
|
||||
destroy: function () {
|
||||
if (_destroy) {
|
||||
|
@ -69,7 +69,7 @@ export default function TableConfigurationViewProvider(openmct, options) {
|
||||
return true;
|
||||
},
|
||||
priority: function () {
|
||||
return openmct.editor.isEditing() ? openmct.priority.HIGH + 1 : openmct.priority.DEFAULT;
|
||||
return openmct.editor.isEditing() ? openmct.priority.HIGH : openmct.priority.DEFAULT;
|
||||
},
|
||||
destroy: function () {
|
||||
if (_destroy) {
|
||||
|
@ -63,7 +63,7 @@ export default function TimeListInspectorViewProvider(openmct) {
|
||||
_destroy = destroy;
|
||||
},
|
||||
priority: function () {
|
||||
return openmct.editor.isEditing() ? openmct.priority.HIGH + 1 : openmct.priority.DEFAULT;
|
||||
return openmct.editor.isEditing() ? openmct.priority.HIGH : openmct.priority.DEFAULT;
|
||||
},
|
||||
destroy: function () {
|
||||
if (_destroy) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user