From dbed9262c0032531d73019bbe85a963020dfcaef Mon Sep 17 00:00:00 2001 From: Charles Hacskaylo Date: Tue, 1 Jun 2021 15:47:21 -0700 Subject: [PATCH] Tree revert refactor (#3886) * Reverts object tree to expand/collapse tree model * Retains expanded/collapsed state * Adds collapse all feature --- src/api/composition/CompositionCollection.js | 4 +- .../folderView/components/grid-view.scss | 4 + src/styles/_constants-espresso.scss | 2 +- src/styles/_constants.scss | 1 + src/styles/_glyphs.scss | 1 + src/styles/fonts/Open MCT Symbols 16px.json | 119 ++- src/styles/fonts/Open-MCT-Symbols-16px.svg | 1 + src/styles/fonts/Open-MCT-Symbols-16px.ttf | Bin 23104 -> 23240 bytes src/styles/fonts/Open-MCT-Symbols-16px.woff | Bin 23180 -> 23316 bytes src/ui/layout/Layout.vue | 12 + src/ui/layout/layout.scss | 10 +- src/ui/layout/mct-tree.scss | 19 +- src/ui/layout/mct-tree.vue | 957 ++++++++---------- src/ui/layout/tree-item.vue | 89 +- 14 files changed, 578 insertions(+), 641 deletions(-) diff --git a/src/api/composition/CompositionCollection.js b/src/api/composition/CompositionCollection.js index 69b024548e..5a013fbe30 100644 --- a/src/api/composition/CompositionCollection.js +++ b/src/api/composition/CompositionCollection.js @@ -215,12 +215,12 @@ define([ * @memberof {module:openmct.CompositionCollection#} * @name load */ - CompositionCollection.prototype.load = function () { + CompositionCollection.prototype.load = function (abortSignal) { this.cleanUpMutables(); return this.provider.load(this.domainObject) .then(function (children) { - return Promise.all(children.map((c) => this.publicAPI.objects.get(c))); + return Promise.all(children.map((c) => this.publicAPI.objects.get(c, abortSignal))); }.bind(this)) .then(function (childObjects) { childObjects.forEach(c => this.add(c, true)); diff --git a/src/plugins/folderView/components/grid-view.scss b/src/plugins/folderView/components/grid-view.scss index 3e3a98bd86..72a4028946 100644 --- a/src/plugins/folderView/components/grid-view.scss +++ b/src/plugins/folderView/components/grid-view.scss @@ -19,6 +19,10 @@ margin: 0 $interiorMargin $interiorMargin 0; } } + + body.mobile & { + flex: 1 0 auto; + } } /******************************* GRID ITEMS */ diff --git a/src/styles/_constants-espresso.scss b/src/styles/_constants-espresso.scss index 5274932f6a..a169272d77 100644 --- a/src/styles/_constants-espresso.scss +++ b/src/styles/_constants-espresso.scss @@ -362,7 +362,7 @@ $legendTableHeadBg: $colorTabHeaderBg; // Tree $colorTreeBg: transparent; -$colorItemTreeHoverBg: rgba(#fff, 0.03); +$colorItemTreeHoverBg: rgba(#fff, 0.1); $colorItemTreeHoverFg: #fff; $colorItemTreeIcon: $colorKey; // Used $colorItemTreeIconHover: $colorItemTreeIcon; // Used diff --git a/src/styles/_constants.scss b/src/styles/_constants.scss index af7e37eb31..9fe2d78cd4 100755 --- a/src/styles/_constants.scss +++ b/src/styles/_constants.scss @@ -212,6 +212,7 @@ $glyph-icon-3-dots: '\ea37'; $glyph-icon-grid-on: '\ea38'; $glyph-icon-grid-off: '\ea39'; $glyph-icon-camera: '\ea3a'; +$glyph-icon-folders-collapse: '\ea3b'; $glyph-icon-activity: '\eb00'; $glyph-icon-activity-mode: '\eb01'; $glyph-icon-autoflow-tabular: '\eb02'; diff --git a/src/styles/_glyphs.scss b/src/styles/_glyphs.scss index e49ccd2925..0a4702b3a2 100755 --- a/src/styles/_glyphs.scss +++ b/src/styles/_glyphs.scss @@ -144,6 +144,7 @@ .icon-grid-on { @include glyphBefore($glyph-icon-grid-on); } .icon-grid-off { @include glyphBefore($glyph-icon-grid-off); } .icon-camera { @include glyphBefore($glyph-icon-camera); } +.icon-folders-collapse { @include glyphBefore($glyph-icon-folders-collapse); } .icon-activity { @include glyphBefore($glyph-icon-activity); } .icon-activity-mode { @include glyphBefore($glyph-icon-activity-mode); } .icon-autoflow-tabular { @include glyphBefore($glyph-icon-autoflow-tabular); } diff --git a/src/styles/fonts/Open MCT Symbols 16px.json b/src/styles/fonts/Open MCT Symbols 16px.json index 15e20d9d38..416ddff325 100755 --- a/src/styles/fonts/Open MCT Symbols 16px.json +++ b/src/styles/fonts/Open MCT Symbols 16px.json @@ -2,7 +2,7 @@ "metadata": { "name": "Open MCT Symbols 16px", "lastOpened": 0, - "created": 1602779919972 + "created": 1621648023886 }, "iconSets": [ { @@ -847,13 +847,21 @@ "code": 59962, "tempChar": "" }, + { + "order": 196, + "id": 168, + "name": "icon-folders-collapse", + "prevSize": 24, + "code": 59963, + "tempChar": "" + }, { "order": 144, "id": 97, "name": "icon-activity", "prevSize": 24, "code": 60160, - "tempChar": "" + "tempChar": "" }, { "order": 104, @@ -861,7 +869,7 @@ "name": "icon-activity-mode", "prevSize": 24, "code": 60161, - "tempChar": "" + "tempChar": "" }, { "order": 137, @@ -869,7 +877,7 @@ "name": "icon-autoflow-tabular", "prevSize": 24, "code": 60162, - "tempChar": "" + "tempChar": "" }, { "order": 115, @@ -877,7 +885,7 @@ "name": "icon-clock", "prevSize": 24, "code": 60163, - "tempChar": "" + "tempChar": "" }, { "order": 2, @@ -885,7 +893,7 @@ "name": "icon-database", "prevSize": 24, "code": 60164, - "tempChar": "" + "tempChar": "" }, { "order": 3, @@ -893,7 +901,7 @@ "name": "icon-database-query", "prevSize": 24, "code": 60165, - "tempChar": "" + "tempChar": "" }, { "order": 67, @@ -901,7 +909,7 @@ "name": "icon-dataset", "prevSize": 24, "code": 60166, - "tempChar": "" + "tempChar": "" }, { "order": 59, @@ -909,7 +917,7 @@ "name": "icon-datatable", "prevSize": 24, "code": 60167, - "tempChar": "" + "tempChar": "" }, { "order": 136, @@ -917,7 +925,7 @@ "name": "icon-dictionary", "prevSize": 24, "code": 60168, - "tempChar": "" + "tempChar": "" }, { "order": 51, @@ -925,7 +933,7 @@ "name": "icon-folder", "prevSize": 24, "code": 60169, - "tempChar": "" + "tempChar": "" }, { "order": 147, @@ -933,7 +941,7 @@ "name": "icon-image", "prevSize": 24, "code": 60170, - "tempChar": "" + "tempChar": "" }, { "order": 4, @@ -941,7 +949,7 @@ "name": "icon-layout", "prevSize": 24, "code": 60171, - "tempChar": "" + "tempChar": "" }, { "order": 24, @@ -949,7 +957,7 @@ "name": "icon-object", "prevSize": 24, "code": 60172, - "tempChar": "" + "tempChar": "" }, { "order": 52, @@ -957,7 +965,7 @@ "name": "icon-object-unknown", "prevSize": 24, "code": 60173, - "tempChar": "" + "tempChar": "" }, { "order": 105, @@ -965,7 +973,7 @@ "name": "icon-packet", "prevSize": 24, "code": 60174, - "tempChar": "" + "tempChar": "" }, { "order": 126, @@ -973,7 +981,7 @@ "name": "icon-page", "prevSize": 24, "code": 60175, - "tempChar": "" + "tempChar": "" }, { "order": 130, @@ -981,7 +989,7 @@ "name": "icon-plot-overlay", "prevSize": 24, "code": 60176, - "tempChar": "" + "tempChar": "" }, { "order": 80, @@ -989,7 +997,7 @@ "name": "icon-plot-stacked", "prevSize": 24, "code": 60177, - "tempChar": "" + "tempChar": "" }, { "order": 134, @@ -997,7 +1005,7 @@ "name": "icon-session", "prevSize": 24, "code": 60178, - "tempChar": "" + "tempChar": "" }, { "order": 109, @@ -1005,7 +1013,7 @@ "name": "icon-tabular", "prevSize": 24, "code": 60179, - "tempChar": "" + "tempChar": "" }, { "order": 107, @@ -1013,7 +1021,7 @@ "name": "icon-tabular-lad", "prevSize": 24, "code": 60180, - "tempChar": "" + "tempChar": "" }, { "order": 106, @@ -1021,7 +1029,7 @@ "name": "icon-tabular-lad-set", "prevSize": 24, "code": 60181, - "tempChar": "" + "tempChar": "" }, { "order": 70, @@ -1029,7 +1037,7 @@ "name": "icon-tabular-realtime", "prevSize": 24, "code": 60182, - "tempChar": "" + "tempChar": "" }, { "order": 60, @@ -1037,7 +1045,7 @@ "name": "icon-tabular-scrolling", "prevSize": 24, "code": 60183, - "tempChar": "" + "tempChar": "" }, { "order": 131, @@ -1045,7 +1053,7 @@ "name": "icon-telemetry", "prevSize": 24, "code": 60184, - "tempChar": "" + "tempChar": "" }, { "order": 108, @@ -1053,7 +1061,7 @@ "name": "icon-timeline", "prevSize": 24, "code": 60185, - "tempChar": "" + "tempChar": "" }, { "order": 81, @@ -1061,7 +1069,7 @@ "name": "icon-timer", "prevSize": 24, "code": 60186, - "tempChar": "" + "tempChar": "" }, { "order": 69, @@ -1069,7 +1077,7 @@ "name": "icon-topic", "prevSize": 24, "code": 60187, - "tempChar": "" + "tempChar": "" }, { "order": 79, @@ -1077,7 +1085,7 @@ "name": "icon-box-with-dashed-lines-v2", "prevSize": 24, "code": 60188, - "tempChar": "" + "tempChar": "" }, { "order": 90, @@ -1085,7 +1093,7 @@ "name": "icon-summary-widget", "prevSize": 24, "code": 60189, - "tempChar": "" + "tempChar": "" }, { "order": 92, @@ -1093,7 +1101,7 @@ "name": "icon-notebook", "prevSize": 24, "code": 60190, - "tempChar": "" + "tempChar": "" }, { "order": 168, @@ -1101,7 +1109,7 @@ "name": "icon-tabs-view", "prevSize": 24, "code": 60191, - "tempChar": "" + "tempChar": "" }, { "order": 117, @@ -1109,7 +1117,7 @@ "name": "icon-flexible-layout", "prevSize": 24, "code": 60192, - "tempChar": "" + "tempChar": "" }, { "order": 166, @@ -1117,7 +1125,7 @@ "name": "icon-generator-sine", "prevSize": 24, "code": 60193, - "tempChar": "" + "tempChar": "" }, { "order": 167, @@ -1125,7 +1133,7 @@ "name": "icon-generator-event", "prevSize": 24, "code": 60194, - "tempChar": "" + "tempChar": "" }, { "order": 165, @@ -1133,7 +1141,7 @@ "name": "icon-gauge-v2", "prevSize": 24, "code": 60195, - "tempChar": "" + "tempChar": "" }, { "order": 170, @@ -1141,7 +1149,7 @@ "name": "icon-spectra", "prevSize": 24, "code": 60196, - "tempChar": "" + "tempChar": "" }, { "order": 171, @@ -1149,7 +1157,7 @@ "name": "icon-telemetry-spectra", "prevSize": 24, "code": 60197, - "tempChar": "" + "tempChar": "" }, { "order": 172, @@ -1157,7 +1165,7 @@ "name": "icon-pushbutton", "prevSize": 24, "code": 60198, - "tempChar": "" + "tempChar": "" }, { "order": 174, @@ -1165,7 +1173,7 @@ "name": "icon-conditional", "prevSize": 24, "code": 60199, - "tempChar": "" + "tempChar": "" }, { "order": 178, @@ -1173,7 +1181,7 @@ "name": "icon-condition-widget", "prevSize": 24, "code": 60200, - "tempChar": "" + "tempChar": "" }, { "order": 180, @@ -1181,7 +1189,7 @@ "name": "icon-alphanumeric", "prevSize": 24, "code": 60201, - "tempChar": "" + "tempChar": "" }, { "order": 183, @@ -1189,7 +1197,7 @@ "name": "icon-image-telemetry", "prevSize": 24, "code": 60202, - "tempChar": "" + "tempChar": "" } ], "id": 0, @@ -2993,6 +3001,29 @@ ] } }, + { + "id": 168, + "paths": [ + "M896 320v448c-0.215 70.606-57.394 127.785-127.979 128l-0.021 0h-576c0.215 70.606 57.394 127.785 127.979 128l0.021 0h576c70.606-0.215 127.785-57.394 128-127.979l0-0.021v-448c-0.215-70.606-57.394-127.785-127.979-128l-0.021-0z", + "M832 704v-448c-0.215-70.606-57.394-127.785-127.979-128l-0.021-0h-192l-101.5-82.74c-24.88-24.9-74.040-45.26-109.24-45.26h-237.26c-35.305 0.102-63.898 28.695-64 63.99l-0 0.010v640c0.215 70.606 57.394 127.785 127.979 128l0.021 0h576c70.606-0.215 127.785-57.394 128-127.979l0-0.021zM128 644v-516l256 260z" + ], + "attrs": [ + {}, + {} + ], + "grid": 16, + "tags": [ + "icon-folders-collapse" + ], + "isMulticolor": false, + "isMulticolor2": false, + "colorPermutations": { + "12552552551": [ + {}, + {} + ] + } + }, { "id": 97, "paths": [ diff --git a/src/styles/fonts/Open-MCT-Symbols-16px.svg b/src/styles/fonts/Open-MCT-Symbols-16px.svg index a5ec213c76..0ce6df4786 100644 --- a/src/styles/fonts/Open-MCT-Symbols-16px.svg +++ b/src/styles/fonts/Open-MCT-Symbols-16px.svg @@ -112,6 +112,7 @@ + diff --git a/src/styles/fonts/Open-MCT-Symbols-16px.ttf b/src/styles/fonts/Open-MCT-Symbols-16px.ttf index bff958ea1783a8e0addea33951a027da9861bd63..162658da3231ead1aa639161e62cf1d8745541f9 100644 GIT binary patch delta 458 zcmX@Gh4I8z#tDk`tov0M7#L+37#LF06N?Lgv;dIb0Hit6b1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