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

View File

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

View File

@ -87,19 +87,6 @@ export default function StylesInspectorViewProvider(openmct) {
}, },
view: function (selection) { view: function (selection) {
let _destroy = null; 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 { return {
show: function (element) { show: function (element) {
@ -124,10 +111,6 @@ export default function StylesInspectorViewProvider(openmct) {
_destroy = destroy; _destroy = destroy;
}, },
showTab: function (isEditing) { showTab: function (isEditing) {
if (onlyEditMode && !isEditing) {
return false;
}
return true; return true;
}, },
priority: function () { priority: function () {

View File

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

View File

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

View File

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