Skip to content

Commit

Permalink
[Darkmatter] Create new darkmatter theme (#7682)
Browse files Browse the repository at this point in the history
* initial theme plugin setup, changes to layout frames

* update visual tests

* Changes to gauge, layout borders, and background

* Make background image a DIY theme variable. Fixes made to gauges. Deleted custom font.

* More changes to overall background colors. Added glass layer effect to menus

* changes to menu

* Fix to make theme easy to run

* Fix tab colors and add glass background to menus

* make highlightd corners longer

* Initial changes to font styles

* Add temporary numeric font style. Test numeric font in gauges.

* Initial changes to alphanumerics in layouts

* Updated variables

* update plugin.js file

* Fix highlighted corners on frames such that it uses outermost frame

* renaming theme plugin and rename branch

* fix button colors to be more readable

* change background image

* Fix bad merges from other theme files. Fix gauge and alphanumerics such that they dont have darkmatter borders

* more fixes

* Fix where mixin is used such that when an object's frame is hidden, highlgihts disappear

* remove blur from meter gauges

* Add comment about this theme being in beta mode

* Delete draft .scss file that is no longer needed

* Fix major accessibility issues

* Fix PR review comments

* ✨ fix: Correct import file name for DarkMatter theme.

* Fix other theme code that was failing e2e tests

* Revert index.html

* Fix linting error

* Fix for failing percy test regarding padding

* Fix for failing percy test regarding padding part 2

* Fix for failing percy test regarding padding part 3

* Remove mixin that may be causing percy issue

* Another fix to resolve percy issue

* Add back some code that was deleted during debugging, and create new variables for the object padding

* Fix gradient clipping in inspector

* Restructure all constants-.scss files

* Change bg image to be square and NASA official picture

* Final fixes to darkmatter variable layouts

* Address PR comments

* Change darkmatter to darkmatterTheme

---------

Co-authored-by: John Hill <john.c.hill@nasa.gov>
Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov>
  • Loading branch information
3 people committed Apr 25, 2024
1 parent fb0d74e commit b3d3465
Show file tree
Hide file tree
Showing 24 changed files with 846 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,8 @@
"checksnapshots",
"specced",
"composables",
"countup"
"countup",
"darkmatter"
],
"dictionaries": ["npm", "softwareTerms", "node", "html", "css", "bash", "en_US", "en-gb", "misc"],
"ignorePaths": [
Expand Down
3 changes: 2 additions & 1 deletion .webpack/webpack.common.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ const config = {
couchDBChangesFeed: './src/plugins/persistence/couch/CouchChangesFeed.js',
inMemorySearchWorker: './src/api/objects/InMemorySearchWorker.js',
espressoTheme: './src/plugins/themes/espresso-theme.scss',
snowTheme: './src/plugins/themes/snow-theme.scss'
snowTheme: './src/plugins/themes/snow-theme.scss',
darkmatterTheme: './src/plugins/themes/darkmatter-theme.scss'
},
output: {
globalObject: 'this',
Expand Down
7 changes: 7 additions & 0 deletions e2e/playwright-visual-a11y.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ const config = {
browserName: 'chromium',
theme: 'snow'
}
},
{
name: 'darkmatter-theme', //Runs the same visual tests but with darkmatter-theme
use: {
browserName: 'chromium',
theme: 'darkmatter-theme'
}
}
],
reporter: [
Expand Down
1 change: 1 addition & 0 deletions src/plugins/displayLayout/components/telemetry-view.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
}

&__value {
@include telemetryView();
@include isLimit();
}

Expand Down
11 changes: 7 additions & 4 deletions src/plugins/gauge/gauge.scss
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,12 @@ $meterNeedleBorderRadius: 5px;
fill: $colorGaugeValue;
}
&__needle-value {
fill: $colorGaugeValue;
fill: $colorGaugeNeedle;

}
&__current-value-text {
fill: $colorGaugeTextValue;
font-family: $heroFont;
font-family: $numericFont;
}

&__units-text,
Expand Down Expand Up @@ -125,7 +126,8 @@ $meterNeedleBorderRadius: 5px;
// Filled area
position: absolute;
background: $colorGaugeValue;
z-index: 1;
box-shadow: $gaugeMeterValueShadow 0px 2px 10px 1px;
//z-index: 3;
}

&__value-needle {
Expand All @@ -135,6 +137,7 @@ $meterNeedleBorderRadius: 5px;
content: '';
display: block;
background: $colorGaugeValue;

}
}

Expand All @@ -158,7 +161,7 @@ $meterNeedleBorderRadius: 5px;

&__current-value-text {
fill: $colorGaugeTextValue;
font-family: $heroFont;
font-family: $numericFont;
}

.c-gauge__curval {
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ import SummaryWidget from './summaryWidget/plugin.js';
import Tabs from './tabs/plugin.js';
import TelemetryMean from './telemetryMean/plugin.js';
import TelemetryTablePlugin from './telemetryTable/plugin.js';
import DarkMatter from './themes/darkmatter.js';
import Espresso from './themes/espresso.js';
import Snow from './themes/snow.js';
import TimeConductorPlugin from './timeConductor/plugin.js';
Expand Down Expand Up @@ -125,7 +126,6 @@ plugins.Plot = PlotPlugin;
plugins.BarChart = BarChartPlugin;
plugins.ScatterPlot = ScatterPlotPlugin;
plugins.TelemetryTable = TelemetryTablePlugin;

plugins.SummaryWidget = SummaryWidget;
plugins.TelemetryMean = TelemetryMean;
plugins.URLIndicator = URLIndicatorPlugin;
Expand All @@ -145,6 +145,7 @@ plugins.OpenInNewTabAction = OpenInNewTabAction;
plugins.ReloadAction = ReloadAction;
plugins.ClearData = ClearData;
plugins.WebPage = WebPagePlugin;
plugins.DarkmatterTheme = DarkMatter;
plugins.Espresso = Espresso;
plugins.Snow = Snow;
plugins.Condition = ConditionPlugin;
Expand Down
44 changes: 44 additions & 0 deletions src/plugins/themes/darkmatter-theme.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/

@import '../../styles/vendor/normalize-min';
@import '../../styles/constants';
@import '../../styles/constants-mobile.scss';

@import '../../styles/constants-darkmatter';

@import '../../styles/mixins';
@import '../../styles/animations';
@import '../../styles/about';
@import '../../styles/glyphs';
@import '../../styles/global';
@import '../../styles/status';
@import '../../styles/limits';
@import '../../styles/controls';
@import '../../styles/forms';
@import '../../styles/table';
@import '../../styles/legacy';
@import '../../styles/legacy-plots';
@import '../../styles/plotly';
@import '../../styles/legacy-messages';

@import '../../styles/vue-styles.scss';
30 changes: 30 additions & 0 deletions src/plugins/themes/darkmatter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
// Note: This darkmatter theme is in Beta and is not yet ready for prime time. It needs some more tweaking.

import { installTheme } from './installTheme.js';

export default function plugin() {
return function install(openmct) {
installTheme(openmct, 'darkmatter');
};
}
22 changes: 22 additions & 0 deletions src/plugins/themes/espresso-theme.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/

@import '../../styles/vendor/normalize-min';
@import '../../styles/constants';
@import '../../styles/constants-mobile.scss';
Expand Down
22 changes: 22 additions & 0 deletions src/plugins/themes/espresso.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/

import { installTheme } from './installTheme.js';

export default function plugin() {
Expand Down
22 changes: 22 additions & 0 deletions src/plugins/themes/snow-theme.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/

@import '../../styles/vendor/normalize-min';
@import '../../styles/constants';
@import '../../styles/constants-mobile.scss';
Expand Down
22 changes: 22 additions & 0 deletions src/plugins/themes/snow.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/

import { installTheme } from './installTheme.js';

export default function plugin() {
Expand Down

0 comments on commit b3d3465

Please sign in to comment.