-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add gauge 4896 #4919
Add gauge 4896 #4919
Conversation
- Copied WIP from maelstrom2-core branch; - Initial integration with current Open MCT codebase;
Codecov Report
@@ Coverage Diff @@
## master #4919 +/- ##
==========================================
- Coverage 49.95% 49.93% -0.02%
==========================================
Files 526 533 +7
Lines 19287 19480 +193
Branches 1734 1756 +22
==========================================
+ Hits 9634 9728 +94
- Misses 9221 9311 +90
- Partials 432 441 +9
Continue to review full report at Codecov.
|
- Added needle display style; - Tweaked form wording;
@nikhilmandlik Just pushed a needle display style: |
- WIP! - Added vertical and horizontal meter gauge types;
- WIP! - Major additions of vertical and horizontal meter gauge types; - Min and max range values now display based on properties settings; - Better color definitions, moving towards theme-based color vars; - Animation transition now applied to gauge value elements transforms;
- Better approach to clipping high and low values/ranges in meter;
- Tweaks to properties form text; - Enhanced GAUGE_TYPES const for better human-readable names;
- WIP: turn off transition for dial to avoid delay "flash" problem;
- Remove rotation angle clipping from needle dial gauge; - Reinstate transition for needle dial only; - Fix typo in props form;
- WIP! - Significant work: added lower limit to dial and meter; - Added limitLow, refactored limit to limitHigh; - Improved valToPercentMeter method;
- Handle case when high or low limit isn't defined;
- Current value implemented as size-relative SVG text in dial and meter; - Code cleanups; - TODO: cleanup and migrate colors to themes;
- Merging Nikhil's latest, resolve conflicts; - TODO: clip dial display when values are outside set min/max;
- Added check to suppress display of dial needle; - Moved filled dial display check in code; - Code cleanup;
- Color refinement; - Code cleanup;
- Properties form CSS cleanups and text tweaks;
…ime conductors start end values.
- Added gauge type `meter-vertical-inverted`; - CSS tightened up;
this.rangeLow = this.round(this.limitLow - Math.abs(this.limitLow * LIMIT_PADDING_IN_PERCENT / 100)); | ||
}, | ||
updateValue(datum) { | ||
if (this.isRendering) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will short-circuit out and result in a stale value being rendered. Read the previous comment on this. We always want to store the new value (on a non-reactive property), then shortcut out if there is a RAF already queued. If we shortcut out without storing the value then when the queued RAF eventually executes it will be with a stale value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh good catch, thanks 👍
src/plugins/gauge/GaugePlugin.js
Outdated
@@ -0,0 +1,199 @@ | |||
/***************************************************************************** | |||
* Open MCT, Copyright (c) 2014-2018, United States Government |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy should be 2022
@@ -0,0 +1,19 @@ | |||
export default { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would name this toggle-mixin or form-toggle-mixin as it is used by at least check box and switch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's file a followup for this and assign to @nikhilmandlik
import GaugeFormController from './components/GaugeFormController.vue'; | ||
import Vue from 'vue'; | ||
|
||
export const GAUGE_TYPES = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason we need tuples instead of standard key/val objects?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's file a followup for this and assign to @nikhilmandlik
src/plugins/gauge/GaugePluginSpec.js
Outdated
composition: [] | ||
}; | ||
|
||
describe('Gaugue plugin', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spelling error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Akshually that's the British spelling
src/plugins/gauge/GaugePluginSpec.js
Outdated
openmct = createOpenMct(); | ||
openmct.on('start', done); | ||
|
||
openmct.startHeadless(appHolder); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
startHeadless
will ignore appHolder
@@ -0,0 +1,65 @@ | |||
/***************************************************************************** | |||
* Open MCT, Copyright (c) 2014-2018, United States Government |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy should be 2022
:class="model.cssClass" | ||
> | ||
<ToggleSwitch | ||
id="isUseTelemetryLimits" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you need to use an id
over a vue ref
? is this for css selector?
<ToggleSwitch | ||
id="isUseTelemetryLimits" | ||
:checked="isUseTelemetryLimits" | ||
:label="`Use telemetry limits for minimum and maximum ranges`" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to bind to a static string
@@ -14,7 +14,7 @@ $elemBg: rgba(black, 0.7); | |||
position: absolute; | |||
left: 0; | |||
top: 0; | |||
z-index: 1; | |||
z-index: 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stealthy non-issue change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -222,7 +222,7 @@ | |||
.h-local-controls--overlay-content { | |||
position: absolute; | |||
left: $interiorMargin; top: $interiorMargin; | |||
z-index: 2; | |||
z-index: 70; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stealthy non-issue change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dismissing for merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still need to remove guage.e2eSpec.js unless we
This reverts commit a53a3a0.
Closes #4896
Describe your changes:
All Submissions:
Author Checklist
Reviewer Checklist