From 2bb2bb6a1ba7df4dfac322202f4cc76535200218 Mon Sep 17 00:00:00 2001 From: Shefali Joshi Date: Tue, 25 Feb 2020 10:41:58 -0800 Subject: [PATCH] Adds conditional style inspector provider (#2655) * resolved conflicts * Revert "Condition reorder" * Adds conditional style inspector provider Adds condition style tabbed view (this needs to be extended to allow more than one pane per tab in a separate issue) * Fixes linting issues * Merge from topic-conditionals * In order to accomodate two tab layout for the Conditionals feature, rename the following: - openmct.inspectorViews registry to openmct.propertiesInspector - InspectorViewRegistry.prototype.addProvider to InspectorViewRegistry.prototype.addViewProvider. Replace occurances of the same to the new names. In a subsequent commit expect a new view registry for the styles inspector view registry. * Use 'styles' property on domain objects to indicate that they should have a styles inspector tab - Note that this will not show up on existing objects but only ones that are created after this feature is added. Use 'styles' property on domain objects to determine if a styles view can be viewed Removed the TabbedInspectorView and repurposed the InspectorViews to show both a properties or a styles registry. Simplified markup in Inspector.vue * Addresses review comments: 1. Go back to using inspectorViews 2. Remove stylesInspector registry 3. Hardcode Styles Inspector component view 4. Styles tab can be viewed for all creatable objects except for the folders, webPages and conditionSets 5. ConditionalStylesInspectorViewProvider is no longer needed because we are hardcoding the styles view component. Co-authored-by: Joel McKinnon --- .../inspector/ConditionalStylesView.vue | 14 +++ src/plugins/condition/event | 0 src/ui/inspector/Inspector.vue | 103 ++++++++++++++---- src/ui/inspector/InspectorViews.vue | 3 +- src/ui/inspector/StylesInspectorView.vue | 52 +++++++++ src/ui/inspector/inspector.scss | 40 +++++++ 6 files changed, 189 insertions(+), 23 deletions(-) create mode 100644 src/plugins/condition/components/inspector/ConditionalStylesView.vue delete mode 100644 src/plugins/condition/event create mode 100644 src/ui/inspector/StylesInspectorView.vue diff --git a/src/plugins/condition/components/inspector/ConditionalStylesView.vue b/src/plugins/condition/components/inspector/ConditionalStylesView.vue new file mode 100644 index 0000000000..5a96b8a3d4 --- /dev/null +++ b/src/plugins/condition/components/inspector/ConditionalStylesView.vue @@ -0,0 +1,14 @@ + + + diff --git a/src/plugins/condition/event b/src/plugins/condition/event deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/ui/inspector/Inspector.vue b/src/ui/inspector/Inspector.vue index ad05a2674d..ff3a8d36e5 100644 --- a/src/ui/inspector/Inspector.vue +++ b/src/ui/inspector/Inspector.vue @@ -1,22 +1,46 @@ diff --git a/src/ui/inspector/inspector.scss b/src/ui/inspector/inspector.scss index 73e9316fd5..b6f9edb890 100644 --- a/src/ui/inspector/inspector.scss +++ b/src/ui/inspector/inspector.scss @@ -1,4 +1,6 @@ .c-inspector { + height: 100%; + > [class*="__"] { min-height: 50px; @@ -55,6 +57,44 @@ .c-tree .grid-properties { margin-left: $treeItemIndent; } + + &__tabs { + $h: 20px; + @include abs(); + display: flex; + flex-flow: column nowrap; + + > * + * { + margin-top: $interiorMargin; + } + + &__holder { + display: flex; + min-height: $h; + + &__header { + + &:before { + margin-right: $interiorMarginSm; + opacity: 0.7; + } + } + } + + &__contents { + flex: 1 1 auto; + display: flex; + flex-direction: column; + + &--hidden { + height: 1000px; + width: 1000px; + position: absolute; + left: -9999px; + top: -9999px; + } + } + } } .c-properties {