remove targeted plugin styling exclusion in browse mode

This commit is contained in:
Jamie V 2025-03-05 13:38:59 -08:00
parent 1a59b89ff2
commit 4c0791f04b
6 changed files with 13 additions and 29 deletions

View File

@ -59,7 +59,7 @@ const viewsTabsMatrix = {
Browse: ['Properties', 'Annotations']
},
'Flexible Layout': {
Browse: ['Properties', 'Elements'],
Browse: ['Properties', 'Elements', 'Styles'],
Edit: ['Elements', 'Styles', 'Properties']
},
Folder: {
@ -74,7 +74,7 @@ const viewsTabsMatrix = {
Edit: ['Elements', 'Styles', 'Properties']
},
Graph: {
Browse: ['Properties', 'Config', 'Elements'],
Browse: ['Properties', 'Config', 'Elements', 'Styles'],
Edit: ['Config', 'Elements', 'Styles', 'Properties']
},
Hyperlink: {
@ -85,29 +85,29 @@ const viewsTabsMatrix = {
}
},
'LAD Table': {
Browse: ['Properties', 'Config', 'Elements'],
Browse: ['Properties', 'Config', 'Elements', 'Styles'],
Edit: ['Config', 'Elements', 'Styles', 'Properties']
},
'LAD Table Set': {
Browse: ['Properties', 'Config', 'Elements'],
Browse: ['Properties', 'Config', 'Elements', 'Styles'],
Edit: ['Config', 'Elements', 'Styles', 'Properties']
},
Notebook: {
Browse: ['Properties']
},
'Overlay Plot': {
Browse: ['Properties', 'Config', 'Annotations'],
Browse: ['Properties', 'Config', 'Annotations', 'Styles'],
Edit: ['Config', 'Elements', 'Styles', 'Filters', 'Properties']
},
'Scatter Plot': {
Browse: ['Properties', 'Config', 'Elements'],
Browse: ['Properties', 'Config', 'Elements', 'Styles'],
Edit: ['Config', 'Elements', 'Styles', 'Properties']
},
'Sine Wave Generator': {
Browse: ['Properties', 'Annotations']
},
'Stacked Plot': {
Browse: ['Properties', 'Config', 'Annotations', 'Elements'],
Browse: ['Properties', 'Config', 'Annotations', 'Elements', 'Styles'],
Edit: ['Config', 'Elements', 'Styles', 'Properties']
},
'Tabs View': {
@ -115,7 +115,7 @@ const viewsTabsMatrix = {
Edit: ['Elements', 'Styles', 'Properties']
},
'Telemetry Table': {
Browse: ['Properties', 'Config', 'Elements'],
Browse: ['Properties', 'Config', 'Elements', 'Styles'],
Edit: ['Config', 'Elements', 'Styles', 'Filters', 'Properties']
},
'Time List': {

View File

@ -23,7 +23,7 @@
export default function conditionWidgetStylesInterceptor(openmct) {
return {
appliesTo: (identifier, domainObject) => {
return domainObject.type === 'conditionWidget' && !domainObject?.configuration?.objectStyles;
return domainObject?.type === 'conditionWidget' && !domainObject.configuration?.objectStyles;
},
invoke: (identifier, domainObject) => {
if (!domainObject.configuration) {

View File

@ -87,19 +87,6 @@ export default function StylesInspectorViewProvider(openmct) {
},
view: function (selection) {
let _destroy = null;
const objectSelection = selection?.[0];
const objectContext = objectSelection?.[0]?.context;
const domainObject = objectContext?.item;
const onlyEditMode = [
'flexible-layout',
'LadTable',
'LadTableSet',
'table',
'telemetry.plot.bar-graph',
'telemetry.plot.overlay',
'telemetry.plot.stacked',
'telemetry.plot.scatter-plot'
].includes(domainObject?.type);
return {
show: function (element) {
@ -124,10 +111,6 @@ export default function StylesInspectorViewProvider(openmct) {
_destroy = destroy;
},
showTab: function (isEditing) {
if (onlyEditMode && !isEditing) {
return false;
}
return true;
},
priority: function () {

View File

@ -24,7 +24,8 @@ export default function overlayPlotStylesInterceptor(openmct) {
return {
appliesTo: (identifier, domainObject) => {
return (
domainObject.type === 'telemetry.plot.overlay' && !domainObject?.configuration?.objectStyles
domainObject?.type === 'telemetry.plot.overlay' &&
!domainObject?.configuration?.objectStyles
);
},
invoke: (identifier, domainObject) => {

View File

@ -24,7 +24,7 @@ export default function stackedPlotConfigurationInterceptor(openmct) {
openmct.objects.addGetInterceptor({
appliesTo: (identifier, domainObject) => {
return (
domainObject.type === 'telemetry.plot.stacked' &&
domainObject?.type === 'telemetry.plot.stacked' &&
(!domainObject.configuration?.series || !domainObject.configuration?.objectStyles)
);
},

View File

@ -24,7 +24,7 @@ export default function telemetryTableStylesInterceptor(openmct) {
return {
appliesTo: (identifier, domainObject) => {
return (
domainObject.type === 'table' &&
domainObject?.type === 'table' &&
domainObject.configuration && // only applies to tables with existing configuration
!domainObject.configuration.objectStyles
);